Cygwin Install Notes (updated Aug 21, 2007)
Kevin O'Kane, okane@cs.uni.edu

Cygwin gives you the ability to do Linux-like development in a WinXP window without installing Linux as a seprate operating system. It is very compatible with Linux (although Linux apps must be recompiled). There is only a small performance penalty.

Getting the distribution: www.cygwin.com.

  1. At the site above, click on the Install or Update now link in the middle of the page. It will bring up a box and offer to save the file. Save the file (named setup.exe) to your Desktop.

  2. Make a tmp directory (folder) on your desktop to hold the intermediate files.

  3. Close your browser and double click on the setup.exe icon.

    This step above involves selecting a temporary directory into which the intermediate downloaded files will go. Whent he installation is finished, this directory can be deleted. Click Browse and find your tmp folder and click on it. When a a directory from the desktop is referenced, it appears to be in \Documents and Settings\user which is normal. This is the real location of your desktop.

    Now you can delete the tmp folder.

  4. The basic installation is done. You may now alter the colors and default screen size and profile.

    Right click this line and save the link (MSIE calls it a target) in C:\cygwin\etc replacing the existing file named profile.

  5. Colors

    Start cygwin.

    Right click on the title bar and then click "Properties".

    Click Colors tab

    Select a screen background color (you can adjust the color by playing with the Red Blue and Green "Selected Color Values"

    Repeat above for "Screen Text".

    Click OK

    Click "Modify Shortcut ..." button and then click OK.

    exit and restart - your colors should be set. If not, try again.

    Window size

    Right click the cygwin title bar.

    Click "Properties"

    Click "Layout" tab

    Adjust the "Window Size" as desired. The small picture will show how much of your screen will be the cygwin window (it can be minimized). Also use the "Window Position" adjustments (after clicking the "Let system position window" box off). Don't make the window too big or it will exceed your screen size.

    The "Screen Buffer" adjustments determine how many prior lines can be scrolled back to. You probably want to leave this alone.

  6. Try entering and compiling a program:

    nano prog1.c

    Type the "Hello World" program. Use the arrows, delete and backspace to navigate. Hit Control-O to write the file out (^O). Hit "enter" when nano asks: "File name to write". Hit Control-X (^X) to exit nano.

    compile the program:

    gcc prog1.c

    run the program:

    ./a

    or

    ./a.exe

  7. Exiting

    You can exit Cygwin by typing exit or clicking the X box in the upper left hand corner of the window. Sometimes, when you type exit, it will ask if you want to exit the batch job. Type Y.

  8. X Windows

    After you have successfully installed cygwin on your MS WinXP system, you may want to run X Windows. This can be done as follows:

    1. save the file xw.tar to:

      c:\cygwin\home\user

      (assumes you installed to the C: drive).

    2. start cygwin.

    3. type:

      tar xvf xw.tar

    4. type:

      xinit

    X Windows should now start and you should see something that looks like:

    This is the fvwm2 window manager. An xterm window is opened by default. You may exit X Windows by hitting the control-alt-backspace keys simultaneously.

    Note there are four desktops (see lower left box). You may switch from one to another by clicking the appropriate box.

    If you move your cursor to the MS Windows command bar, X Windows sometimes interpretes this as a command to move to a lower desk top (see display in lower right corner). Return to the correct desktop by clicking in its window.

    To bring up applications, right click in an unused window area and select from the menu or enter the application command and any parameters into a command window. For example, type:

    xeyes &

    Focus follows Mouse!!! That is, the window under the mouse is the active window. Move the mouse to another window, and it becomes active.

    You may drag windows by holding down the righ mouse botton over the menu bar and dragging. Resize and application by moving the mouse to a corner and, when the cursor changes, hold the right button down and drag.

    If you are using a firewall, you may be asked several times for permission to access the internet. This is normal and represents internal communication between modules.

  9. Toys

    xearth

    1. start cygwin.

    2. download the xearth distribution with the following commands to cygwin:

      wget http://www.cs.uni.edu/~okane/cygwin/xearth-1.1.tar.gz

    3. unzip/tar the file:

      tar xvzf xearth-1.1.tar.gz

    4. enter the directory created:

      cd xearth-1.1

    5. build the program:

      xmkmf
      make all

      you will see many messages. this is compiling and building the program.

    6. start X Windows:

      xinit

    7. from the command window, move to the xearth-1.1 directory if you are not already there (check where you are by typing pwd) and run the program:

      xearth &

    The background of your X Window display will be a globe of the earth that will update and rotate:

    xearth.1.1.tar.gz