Setting up Cygwin for the purpose of X11 forwarding
This is meant for users wishing to setup their personal computers running the Windows operating systems to foward
X11 display information from remote machines back to them. Those running Linux already have this kind of support built in.
Installing Cygwin on a Windows system is a way to allow programs on a remote machine that utilize a graphical user interface
(or GUI for short) to run locally. Otherwise, you might see an error like "Error: Can't open display:".
This software will allow you to interact graphically with applications on a remote machine, instead of being confined to strictly
text-based programs. An example of this would be running matlab from ra.rutgers.edu graphically on your own Windows XP
machine at home.
The first thing you need to do is go to http://www.math.rutgers.edu/help/software/cygwin.zip and download the installer that we have created. This will be a minimal install of Cygwin packages essential to basic file editing, shells, and of course, the X windows environment. If you would like the chance to install additional packages for Cygwin and create your own custom install, please review and follow the instructions here. After successfully downloading the cygwin.zip file, you will need to perform the following steps.
-
You will need to unpack the zip file to any location of your choosing, typically the default is to the same directory
that the zip file itself is in. This is easily done by right-clicking on the zip file and selecting "Extract".
-
Now that you have the files extracted (it should be a folder called 'cygwin'), double-left-click on the folder to
go inside it. There you will find 3 files and a directory. Double-left-click on cygwinSetup.bat to start the setup
process. This will install everything where it needs to be without the need for any interaction on your part.
-
When it is done, you will be presented with a window containing two check boxes. You can select either, or both,
of these options. The "Desktop Shortcut" it refers to is a shortcut for cygwin.bat, which launches a bash shell,
effectively the same shell that you use on the Linux machines here.
-
If you double-left-click on the shortcut, you will get a terminal window. From here you can simply type ssh -X username@machinename
(where machinename is the name of the remote machine on which the graphical application you would like to use is run, and
username is your username on that machine. If you are connecting to a math Department server, this would be your Math username, i.e.
ssh -X mathuser@ra.rutgers.edu)
-
After providing your password, you will be provided with a prompt at which you would type the command to start the graphical
application you wished to use, i.e. ra% matlab.
Note: You can also use other applications, like PuTTy or SSH, or the xterm provided with the installation of Cygwin (accessed via the Start Menu shortcuts for Cygwin), to achieve the same result. It is imperative, when using PuTTy or SSH, that you check the configuration option for the session to enable "X-Tunneling". This is the same as the '-X' option given to ssh on the command line. Without it, all the X-display forwarding done by Cygwin will be for naught.



