Monday, 21 November 2011

Cygwin - Get that Linux feeling - on Windows!

Ever get frustrated about the limitations of CMD?

Many companies enforce a SOE installation of Windows to keep all client systems alike. For the company it isusually a good strategy, but for IT professionals it can sometimes be somewhat challanging.

From the day I started working in companies where it wasn't suitable running a *NIX flavour on the PC, I have used Cygwin.

As it states on their homepage ( "Get that Linux feeling - on Windows!"... That's exactly what it does.

Here's a quick guide to get Cygwin installed with X server and xterm.

  1. Download and run setup.exe from
  2. Follow the on-screen instructions up until the dialog Select Packages.
    To find packages, enter the name in the Search box.

    1. First select the package X-start-menu-icons

    2. Then select patchutils

    3. Click Next to install the packages
    4. (If you have 7GB to spare, you could of course just select everything to install)
  3. The next screen will automatically select all dependencies. Just click Next to start the installation phase.
Running Cygwin - XWin Server
During installation, start menu icons is created by default. To use the XWin Server (and xterm), click on the Start icon:
At startup an xterm session is started as well:
 The default look is quite plain and straining on the eye, so I tend to make it a bit more retro as described in the next section...

To start additional xterm sessions, find the X icon next to the clock and click Applications > xterm:

At startup, a new xterm window will appear, use this window to patch the system.XWinrc:
  1. Execute the following, which will create a new config file for XTerm:
    echo 'XTerm*Background: black
    XTerm*Foreground: white
    XTerm*toolBar: false
    XTerm*geometry: 160x40' > ~/XTerm
As a result, you will end up with a much nicer look and feel: