Cygwin HOWTO
From Wasteland
Contents |
Introduction
Cygwin is a UNIX environment, developed by RedHat, for Microsoft® Windows®. It consists of two parts (from Cygwin's site):
- A DLL (cygwin1.dll) which acts as a Linux emulation layer providing substantial Linux API functionality.
- A collection of tools, which provide Linux look and feel.
This means that it is possible to port programs originally developed for Linux to Windows in an easy way, and also that your favorite linux tools (e.g. grep) are available to you: It is possible to boot from Windows, login, and launch a bash with the most common GNU/Linux commands. In these notes some of the features will be shown, from a plain bash to a complete KDE desktop environment. This is not real documentation, but a collection of links and some screenshots (all screenshots have been taken with The Gimp).
The basic cygwin and a bash
So the first thing to do is boot a computer from Windows. I myself did this with a laptop Dell Latitude C640 Mobile P4 2.2GHz with 1GB of RAM and Windows®XP.
The first thing that needs to be installed is cygwin's DLL and linux tools. There is a setup.exe installer in cygwin's site that takes care of this (v2.340.2.5 as of this writting).
The setup program allows you to select from a big list of packages which ones you need, and then will do some automatic configuration. If you have been fooling around with your screen resolution in Windows, and have changed the DPI, then you may not be able to see all the options in the list; the workaround is to change back to a default resolution.
You don't need to install everything in the beginning, the setup program will allow you to add or remove packages at a later stage. What you get is basically a cygwin icon
on your desktop and/or start menu that launches a bash running C:\cygwin\cygwin.bat (if you decided to install cygwin to C:\cygwin\ in the setup program). You can see the result in the next screenshot:
Your root system / is mounted in C:\cygwin\, and you can in fact see that the typical directories (bin, etc, etc) are subfolders of it.
In my case, my login in the laptop is ramon.casero; this is not a local user, but a user in a Windows domain where my home directory is in a share that in Windows is mapped to unit M:. This was correctly detected, so it is possible to have a M:\.bashrc that will work for all bashes.
The X Windows Manager
It is also possible to run a X Window System (XFree86) with TWM as window manager. The Window Manager can be launched with startx. Notice Windows' tool bar at the bottom of next screenshot, and that what you get is a maximized window with TWM.
KDE 3.1
If you are thinking that cygwin only works with simple programs, or you don't like TWM, then have a look at the KDE on Cygwin project. I have installed KDE3.1 (it's beta) --KDE 1 and KDE 2 are also available.
First you must make sure that all dependencies are fulfilled, what you can do with cygwin's setup program, adding http://kde-cygwin.sourceforge.net/install as a source for packages. Installing the dummy package kdecygwinrequired_3 from this source will take care of the dependencies.
Then you have to download and run the KDE 3.1.1 installer utility, and probably the KDE 3.1.1 Beta 1 Update 1. After the installation is complete, you will be able to launch KDE from your Windows program menu, or a desktop icon. In the next screenshot you can see konqueror displaying barrapunto, a konsole and KDE's menu.
Gnome
It seems that there's also a Gnome + Cygwin project, although I have not tested it myself.



