Having an MS Windows desktop forced upon you is dreadful. You can only take it so long before you want to throw it out of the window. While at times the Windows desktop is a necessary evil, or at least an inevitable one, there are ways to ease your suffering.
Cygwin offers the tools to hide the embarrassing fact that you are using the "wrong" sort of system and can help a great deal in refurbishing your workstation.
This article glues together the odds and ends that you need to know about to make your life more comfortable.
Cygwin does not convert your Windows machine into a UNIX-compatible one. It does not make it understand UNIX signals, PTYs and such, it only provides mapping of UNIX actions onto the Windows platform. I is not a way to make native Linux applications run on Windows. If you want an application to run on your Windows workstation, and it is not yet in the Cygwin suite, then you will have to compile the source. Another solution is to run the application, if it is a graphical one, remote using X functionality, we will discuss the setup for remote display in this article.
You can freely download the Cygwin tools from the Cygwin website. Click on the "Install Cygwin now" icon and save the setup.exe tool somewhere on your disk.
Then double click to install the Cygwin base configuration. You can either directly install everything, or first download in a directory on your local system and then install from that directory.
When the installation procedure asks to specify the Root Install Directory, it is best to change the default C:\cygwin to some other path in order to keep Cygwin files separated from your native Windows files. There have been problems with this in the past, and even though Cygwin developers are 99% sure that no conflicts can happen any more, it is wise not to take risks. I installed Cygwin in D:\cygwin.
You can install the Cygwin programs just for your own usage or system wide. If you are not too deeply involved with development on Windows, select the UNIX text file type. If you need text files from your Windows machine, in some cases it is necessary to use DOS file types. In any case, the CYGWIN variable can be set to explicitly specify the text file type that you want to work with. Compatibility with DOS text files is built in. Details about this and other UNIX to Windows mapping specifics can be found in the user guides on the Cygwin website.
Next, specify the package directory that will be used for downloading. With Firefox installed on my machine, this was C:\Program Files\Mozilla Firefoxw by default. For connecting to the Internet I have to pass an ISA proxy/firewall server (runs on Windows), which does not agree with the normal standards. So I had setup.exe import the MS IE5 settings in order to download through the proxy server. This worked, at least partially, I will explain more about the ISA proxy/firewall troubles later.
Usage of a mirror is required. If you try to download directly from the Cygwin site you will get errors, so select a mirror near you. A minimal installation requires the base packages, which include the DLL, a Bash shell, the coreutils, findutils, diffutils, documentation, libraries and a couple of basic UNIX tools like tar and grep. Select these basic packages and let the setup.exe tool do the rest.
The X server, which is most important to me because I want to be able to do remote display, is not included in the base package. I could install most packages using the setup.exe tool, however the company proxy/firewall settings prevented me from downloading the bigger packages, such as the 75 dpi fonts, using this method. I tried playing with the proxy settings in the setup tool for a while, but to no effect. In the end I manually downloaded the necessary packages from the mirror into a local directory, using HTTP in my browser, and instructed setup.exe to use that local repository. After installing all the packages necessary for running X, you can start the server from the bash shell using several methods:
Example batch files and scripts are included in the Cygwin package. When the X server is started successfully, the X logo is displayed in the task bar of your Windows desktop.
From this moment on, your Windows workstation can display UNIX graphical applications. For testing, log in to a UNIX or Linux host and use a simple and small program like xclock or xlogo. When everything proves to work as it should, you can start the applications you need.
Use the X11 forwarding feature of SSH to get rid of the export DISPLAY routine that is inherent to XDMCP. When I was trying to install SSH, the proxy server was making a mess of it again, so I did it manually and got errors because a cryptographic library which is in the SSL package was not installed yet.
When installing SSH, don't forget to add SSL. If you use the setup.exe tool, dependencies are satisfied automatically.
There is no default SSH configuration present. You will need to go through these steps to set up SSH decently:
sshd:*:74:74:SSH Privilege Separation User:/var/empty/sshd:/sbin/nologin
For enabling remote display, first set the DISPLAY variable locally in a Cygwin Bash window:
Then start ssh with the -Y option:
ssh -Y user@remote_host
Check the DISPLAY variable when you are logged in to the remote server, it should say something like remote_host:14.0. You can now start any graphical UNIX application, it will be displayed on your Windows desktop.
While testing the graphical applications, I noticed that quite a lot of Gnome applications are included in the package list. All the libraries that you need to run Gnome programs are already ported, however a full-blown desktop is not yet available - unless you do some compilation yourself, of course. As a workaround, use the standard -query option to the X server to display a complete remote desktop:
/usr/X11R6/bin/XWin.exe -query remote_host
On Solaris, the XDMCP feature (X Display Manager Control Protocol) is still enabled by default. On Linux, you will need to change your XDM configuration, preferably serve fonts and change your Gnome or KDE configuration. On my Fedora box, I did the following:
Then from the Windows station, make sure that the X server is stopped before entering the X -query command.
NOTE: This is for exercising only. There are better alternatives for remote display of entire desktops, for instance VNC.
More information can be found here: