Cygwin/X: Quick Installation Instructions

Cygwin/X provides an X server for Windows clients, similar to Xming, which allows you to run X programs on remote hosts (generally Unix systems, such as the University's Strauss system) and route the display to your Windows desktop. The software is supported for all recent versions of the Windows operating system. Cygwin/X is a free software package. For more information, refer to the Cygwin/X homepage. To install Cygwin/X:

  1. Log in as an administrative user.

  2. Download and run "setup.exe" from http://cygwin.com.

  3. Accept all of the defaults and click Next until you get to "Choose a Download Site." (The default settings should be OK for most installations. The default Cygwin installation directory is C:\cygwin.)

  4. Choose a download site.

  5. The installer will download a list of packages and then present you with a package selection screen. Expand the window (click-and-drag any corner of the window outwards) so that you can see better.

  6. If all you want is to use Cygwin/X to run X programs under Windows, scroll down to "X11" in the "Category" column and click the word Default, which should then change to Install.

  7. It is recommended (but not required) that you also install openssh.

    1. Click the + next to Net in the Category column.
       
    2. Scroll down until you see openssh in the Package column.
       
    3. Click once on Skip in the New column. Skip will be replaced by the version number of the most current version. The openssl package will be automatically selected, since it is required for openssh. 
  8. Click Next. The Installer will download the necessary files and install them. Click Finish.

  9. Log out of the administrative user account (if it is not the account you normally work in) and log into your usual user account.

  10. Open C:/cygwin (the Cygwin installation root folder) and go to the /usr/X11R6/bin folder.

  11. Right-click on startxwin (it might appear as "startxwin.bat," depending on your settings), select Create Shortcut, and drag the resulting icon to your desktop (or someplace else convenient).

To use Cygwin/X

  1. To start the Cygwin/X server, double-click the startxwin shortcut that you created. After a few seconds, the "X" icon appears in the system tray, and an Xterm window opens. This Xterm window starts with a local shell on your Windows machine. To run programs on a remote host, such as Strauss, you must first log into that host.

  2. If you are running Windows XP and have installed Service Pack 2 (highly recommended): the first time you run Cygwin/X, Windows will prompt you that an unknown program (XWin) is attempting to access the Internet. Click "Keep Blocking," unless you know that you will use Cygwin/X with remote servers that do not support SSH login.

  3. At this point, you can use an ssh client to run programs on remote hosts.

    1. Using openssh, if you installed it with Cygwin:

      From the Xterm window that opened when you started the Cygwin/X server (or any Cygwin shell window), the general command format is:

      ssh -fX username@machine_name application_name

      For example:

      ssh -fX johndoe@strauss.udel.edu xterm

      will open an Xterm on Strauss using the account associated with the UDelNet ID "johndoe." (The "X" switch in the command above is necessary because, by default, the openssh client doesn't forward X connections. Alternately, create the file C:/cygwin/home/your_windows_username/.ssh/config and add the line "ForwardX11 yes" to it. First run the ssh client at least once, to ensure that the .ssh directory gets created with the correct permissions. The "f" switch tells the client to run in the background after prompting for your login credentials, instead of opening a shell.) Alternately, simply log into the remote host:

      ssh -X username@machine_name

      and run programs from the shell.

    2. Using the UD-distributed SSH client (http://udeploy.udel.edu):

      You must first configure the client to forward X connections.

      1. Open the client, click  the Edit menu.

      2. Choose Settings.

      3. Click the Tunneling sub-heading under Profile Settings (if there is a "+" next to "Profile Settings," click it to expand the sub-headings).

      4. Select the box next to "Tunnel X11 connections."

      Now simply connect to the remote server (e.g. Strauss) and type the name of the application you wish to run (xterm, maple, etc.)

  4. To shut down the Cygwin/X server, right-click on the "X" icon in the system tray and click "Exit".

  5. For more configuration information, refer to the Cygwin/X home page.

Note: Do not run Xming (or any other X server software) and Cygwin/X simultaneously. Also, on a multi-user machine, you must close the Cygwin/X server running under one user's account before you can run it as another user. (It is possible to run multiple instances simultaneously, but the configuration issues involved go beyond the scope of this document).