Javascript Menu by Deluxe-Menu.com
Cygwin Setup

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://cygwin.com/setup.exe and download the installer. After successfully downloading the setup.exe file, you will need to run it and perform the following steps.

  1. You should see the screen below upon launching setup.exe. Click Next to continue.

  2. If this is the first time you are installing Cygwin on this machine, you will need an active Internet connection in order to download the files required for the installation. After they are downloaded, they will remain in a directory specified by you in step 4 for later use, namely addition, removal, or modification of packages. Click Next to continue.

  3. The default directory is C:\cygwin for the installer, and is recommended unless you have reason not to install there. Click Next to continue.

  4. Note: The directory shown in this example is not* the default for the installer. While you can use the default, it may be helpful for you to store the installation files along with the rest of the cygwin installation. Click Next to continue.

  5. Here the type of internet connection needs to be specified. Unless you are using a proxy server, Direct Connection is what you will want to use. This includes those connected via a wireless or wired network to a broadband connection, as well as those on dialup. Click Next to continue.

  6. You may pick any of the sites listed here, using ftp or http to transfer the data. Note: The basic packages required by Cygwin should be available at any of the sites in the list. However, not all sites have the exact same package list. Some have additional games, libraries, etc. Click Next when you have finished choosing a download site.

  7. The Default install should be sufficient, but feel free to add whichever packages you would like in addition to those already selected. Click Next when you have settled on the packages to add.

    Note: Some of the packages you have added may have dependencies (additional packages that are required to make the one you selected work) that you were not aware of. If this is the case, after clicking Next, the installer will provide a list of the additional packages it needs to install in order to comply with the list of packages you requested. It is recommended that you click Next again. Otherwise, some installed packages will not function correctly.

    This is a sipmple example of the "Select Package" screen.

  8. After Cygwin installs, which can be a lenghty process, there are still steps that need to be taken to cause X display forwarding to take effect. Please visit http://www.math.rutgers.edu/help/software/cygwinxstart.zip in order to download a zip archive containing a very useful file that will be referenced in the next step.

  9. Now that you have the zip archive downloaded, you will need to unpack it to a location of your chosing, preferably one that is easy to reference. Inside will be a single file: startxwin.bat. Right-click on your Start button and select Open from the list. A window should open up on your desktop, which will contain a folder called "Programs". Double-left-click the folder to go into it. Now double-left-click the folder called "Startup". It is here that you want to move startxwin.bat. This is easily done by left-clicking the file from the place you unpacked it, and dragging it into the window where you are in the "Startup" folder. Now, just double-left-click the startxwin.bat file while you are there. This will start the X display forwarding in the background. (You should see a black 'X' appear in the toolbar on the bottom right of your screen). From now on, however, this file will be run every time you login, and will not need to be run manually again, as was just done.

  10. There is but one step more, which is the only one you will need to know for the purpose of repetition. Left-click your Start button and select All Programs. Then select Cygwin-X, and finally, xterm. This will open up an xterm window on your screen. At the prompt in the xterm window, you need to type the following command: ssh -X username@servername (i.e. ssh -X mathuser@ra.rutgers.edu)

    Note: You can also use other programs you may be more familiar with like PuTTy or SSH. It is essential, however, that you look through the configuration options for the session and enable "X-Tunneling". This is the same as the '-X' command line option to ssh as shown in the example previous. Without it, even with X-display forwarding going on in the background, you will still receive display error messages when attempting to run remote graphical applications.

  11. At the propmt you can type any command, just as you would with a text-based interface, with the wonderful exception that any commands that execute an applicaion employing a GUI will now display on your Windows machine!
This page was last updated on June 15, 2008 at 08:39 pm and is maintained by webmaster@math.rutgers.edu.
For questions or comments about this site, please contact help@math.rutgers.edu.
© 2009 Rutgers, The State University of New Jersey. All rights reserved.