LogoPhly, boy, phly
the weblog and site of Matthew Weier O'Phinney

Thursday, January 5. 2006

XP + Cygwin + coLinux == Productivity

I wrote earlier of my experiences using Windows XP, a move I've considered somewhat unfortunate but necessary. I've added a couple more tools to my toolbox since that have made the environment even better.

A co-worker told me about coLinux, a port of the linux kernel that allows it to run side-by-side with Windows on the same machine. It's kind of like vmware, only more optimized, and free. I'd looked at it, but was a bit daunted as I wanted to try and use my existing Ubuntu install with it, and was worried about messing up the machine.

I finally came to the realization, however, that I simply won't be using linux as my day-to-day OS until some of my tools are ported. So, I blew away my ubuntu install and made room for coLinux.

I'd heard that it was difficult to setup, but I found it fairly easy -- download the coLinux tools, get a filesystem image, add the service, fire it up. You then need to do a few other things -- bridge your network interface with the coLinux network interface, set your network IP for the coLinux install, setup your root password and any new users you want -- but then it's running. You can then use Cygwin to SSH into the install.

The basic coLinux filesystem is Debian, and based on an old Sid version. It is very stripped down, and has no developer tools. I had to apt-get a ton of stuff -- gcc, cpp, cvs, subversion, darcs, libtool, some development libraries, etc -- so I could start compiling things. I compiled Vim by hand, because if you want Vim with perl support in Debian, it insists on installing a ton of X related stuff. I then compiled Apache2, PHP4, and PHP5 by hand (and needed to get additional development libraries for some features I wanted). But the compiles worked flawlessly, and I now have coLinux running on the machine with a flexible development environment that I control.

(I've also figured out a way to run PHP4 and PHP5 seemingly on the same Apache install, side-by-side, but that's a topic for another day.)

While you can access the system via SSH, I find that's not terribly convenient for doing simple things like editing files. So I installed Samba in my coLinux install, and set it up with a few shares. With that in place, I can now access files directly from Windows -- editing them in gVim, etc.

I setup Exim via cygwin. However, I noticed when I'd try and send emails from my coLinux install via the cygwin exim, exim typically errored -- usually an inability to fork a process. So I installed it via coLinux instead, and all is hunky dory -- my PHP scripts can now send mail, and I have a local SMTP server for queuing and sending mail instead of having to rely on the company or personal mail server.

In reading on the coLinux site, I discovered that you can setup programs that utilize esd, and run esd off of cygwin. This has allowed me to once again use mpd as my preferred music player.

Since I'm constantly going into my coLinux install, I created a copy of the cygwin.bat script that adds a '-c "ssh myname@myCoLinuxInstall"' to the bash command; this allows me to click on a single icon in order to SSH into coLinux -- very handy.

All-in-all, I now have what I consider to be the best of both worlds -- access to the work programs I need, ease of configuration for a variety of tools (wireless, bluetooth, USB devices), and a robust server/development environment -- all on the same box.

Posted by Matthew Weier O'Phinney in PHP, Programming, Linux at 16:57 | Comments (11) | Trackbacks (2)

Trackbacks
Trackback specific URI for this entry

coLinux Recovery
As I've written previously, I use coLinux in order to have a Linux virtual machine running on my Windows XP install. It runs Debian unstable (SID), which gives me all apt-geet love I could want. Except when an apt-get based i
Weblog: phly, boy, phly
Tracked: Sep 25, 09:28
Back on Linux Again
A little over a year ago, I stopped using Linux as my primary desktop due to the fact that a number of programs we were using were Windows dependent. Despite getting coLinux running, I've never been completely satisfied with th
Weblog: phly, boy, phly
Tracked: Feb 17, 15:06

Comments
Display comments as (Linear | Threaded)

You mention vmware in this article, but I missed in your last one.. - why not just run windows+those odd little app's in vmware? - seems like a more common setup, and a little more predictable?

I've installed linux here for my kids and run vmware for their games, I spend a hell of alot less time fixing their pc now, and they keep finding new applications all the time to play with...;-)
#1 Alan Knowles (Link) on 2006-01-05 19:55 (Reply)
That was going to be my initial solution. However, I had a few stumbling blocks:

(1) I only have an OEM copy of Windows XP -- basically only the recover discs for the machine I'm using; I couldn't use those to install WinXP in vmware.

(2) I had difficulty getting vmware to work with Ubuntu -- I couldn't get it to load other OSes at all, including Linux.

(3) I was trying to do this as cheaply as possible -- to use vmware, I would need to purchase vmware and a full WinXP license -- and based on my problems getting vmware setup on ubuntu, I wasn't willing to commit money to a solution I wasn't sure would work.

(4) Some of the utilities I use in WinXP are either persistent (I'd need vmware open all the time), or require the full desktop (which would make switching between applications in linux and the vmware WinXP more difficult).

All in all, the solution I've come up with manages to combine the best of both worlds fairly well.
#1.1 Matthew Weier O'Phinney (Link) on 2006-01-06 09:43 (Reply)
You mention vmware in this article, but I missed in your last one.. - why not just run windows+those odd little app's in vmware?

colinux isn't emulating a virtual machine, so you can run heavy apps in it too.
#1.2 bohan on 2006-05-02 14:33 (Reply)
"why not just run windows+those odd little app's in vmware?"

For several reasons. (1) I already had Windows installed on the machine, and don't have ready access to the restore discs (I work *very* remotely). Getting vmware to work with an already installed Windows is a nightmare. (2) I'm cheap, and didn't want to fork out the money for vmware, particularly when I couldn't guarantee it would work with my setup. (3) One of the apps I use for work does desktop sharing, but via ActiveX widgets. If most of my desktop is in linux, vmware wouldn't be able to capture that information to share.

All in all, coLinux better suited my needs.
#1.2.1 Matthew Weier O'Phinney (Link) on 2006-05-03 09:26 (Reply)
This indeed looks very useful, I'm gonna try this here at work. At home I can use linux without a problem, the only computer with windows is the dualboot of my wife, but here at work I'm forced to use windows, and this will ensure a more useful development environment.
#2 Stefan (Link) on 2006-01-06 02:47 (Reply)
I was a fairly avid user of coLinux about a year ago or so when I still had a windows box to contend with. It is fantastic -- especially since you can run multiple instances of linux as startable services. At the time I had a tiny slackware based system that I crafted and cloned. Each clone had specific servers installed and coupled with local static IPs, autostart services and proxying/forwarding from the host, it made for an interesting and seemless way to manage my development needs.

That said, I'm happier to be away from using windows as a host. FWIW, it also works on linux hosts (and is faster than, say, UML) but I'm waiting for xen.
#3 boots on 2006-01-06 14:10 (Reply)
How come no matter how convoluted and non-standard your setup is I still find myself a little envious?

I think I'll stay with straight ubuntu for now - since I think that you imply that would be your preference if you didn't *have* to use Winders.

Nice job!
#4 Rob Riggen on 2006-01-11 14:54 (Reply)
Straight linux would definitely be my preference, but this is a nice setup, and does give me some flexibility in terms of testing on other platforms that I hadn't had before.

As for envy... I can't control that :-)
#4.1 Matthew Weier O'Phinney (Link) on 2006-01-11 14:58 (Reply)
i'd recommend using cygwin's rxvt.exe instead of microsoft's terminal.

also, don't hesistate installing graphical apps on colinux. you can display them either with cygwin's X server of by running a Xvnc server in colinux.
#5 bohan on 2006-05-02 14:30 (Reply)
I'm actually using rxvt now; just hadn't updated the entry. I'm also using XMing now instead of Cygwin/X, as the latter was behaving somewhat flakily for me.

Currently, I typically run mrxvt off of coLinux, having it connect to XMing on windows. I sometimes run other GUI apps from linux (gvim in particular), but I tend to shy from it as I can do most of the GUI stuff in windows, and thus keep the resource usage down that way.
#5.1 Matthew Weier O'Phinney (Link) on 2006-05-03 09:22 (Reply)
Very nice setup, I'm so jealous, SSh can be a productivity killer when you development webhost is lagging!

-Q
#6 WealthHack.com (Link) on 2008-10-19 12:59 (Reply)

Add Comment

Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

 
 
  • Home
  • Resume
  • Blog
  • Phly PEAR Channel
  • Contact Me
  • About this site

ZCE

Zend Education Advisory Board Member

Add to Technorati Favorites

Calendar

Back March '10 Forward
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        

Quicksearch

Links

  • PHLY - PHp LibrarY
  • Paul M. Jones
  • Mike Naberezny
  • Shahar Evron
  • Planet PHP
  • Zend Where I now work
  • Garden.org Where I once worked

Archives

March 2010
February 2010
January 2010
Recent...
Older...

Categories

XML Linux
XML Personal
XML Aikido
XML Family
XML Programming
XML Dojo
XML Perl
XML PHP

All categories

Syndicate This Blog

XML RSS 0.91 feed
XML RSS 1.0 feed
XML RSS 2.0 feed
ATOM/XML ATOM 0.3 feed
ATOM/XML ATOM 1.0 feed
XML RSS 2.0 Comments

Show tagged entries

xml best practices
xml books
xml conferences
xml cw09
xml decorators
xml dojo
xml dpc08
xml file_fortune
xml git
xml linux
xml mvc
xml oop
xml pear
xml perl
xml personal
xml php
xml phpworks08
xml programming
xml rest
xml ubuntu
xml vim
xml webinar
xml zendcon
xml zendcon08
xml zendcon09
xml zend framework
© 2004 - present, Matthew Weier O'Phinney
matthew-web <at> weierophinney.net