Install and Run Cygwin on a Windows Computer

Cygwin Description

Cygwin is a program for Microsoft Windows that executes Unix commands under Windows, including X Window clients (programs) on a remote computer that displays output on a local PC.

You don't want to install all the Cygwin stuff as it is very large and there isn't much sense in running Unix emulations under Windows if one can install Unix/Linux directly on their computer (another topic not covered here). A minimal install will allow Windows to display X (graphics) applications from a remote host (such as linux.unm.edu) by "tunneling" the Unix graphics through Windows to your local computer (local host).

PC requirements include a Microsoft Windows operating system, at least 300 MB (0.3 GB) of disk space and a fast modem. Download and execution times depend on connection and processing speeds.

Install X/Cygwin on your local host (Cf. The Cygwin/X User's Guide Installing Cygwin/X page)

  1. Connect to the Internet (using a high-speed connection) and start a web browser (such as MS Explorer).
  2. To download Cywin, go to the X/Cygwin site (http://x.cygwin.com) and select the setup.exe link. Choose the Open option in the download window. It's ok to accept the default/suggested values.
  3. In the Select Packages window, click on the +Net category (left side of window) and click the Skip icon to the left of inetutils. (You may have to expand the window to see the information on the right side.) Click the box under the Bi(nary) column to select the executable version of this package. Also select openssh and openssl in the +Net category and the X-startup-scripts under the +X11 category.
  4. Finally, click on Next to begin the download. This will download the basic packages and the others you have selected. When the download is complete, a shortcut icon with the name Cygwin should appear on your Windows desktop.

    Note that you can add packages (features and programs) at a later time by restarting setup.exe (selecting the same options in the questions/suggestions windows previous to the Select Packages window). A neat feature is that the Cygwin downloader knows what you have already installed (denoted Keep in the Select Packages window) and installs new packages incrementally. You may also uninstall packages by clicking the Keep icon until it says Uninstall. In this way you can customize the Unix emulation on your Windows computer dynamically.

Connect to a remote host and display X clients on your local host. (Cf. The Cygwin/X User's Guide Using Cygwin/X page)

  1. Start the Cygwin program. A terminal window should come up. (If it doesn't, something is wrong with the basic Cygwin install - try reinstalling it.)
  2. You need to get the X server running on the local host. Do this by executing the Unix command startxwin.bat. This should bring up an new terminal window running bash. Commands in this window will appear in yellow. If this window doesn't come up, you probably need some Cygwin package(s) that were not included with the basic install packages (see the previous section). You can show that X is running by executing some X application (client), such as xclock or xterm in either terminal. (You can close either terminal window at this point.)
  3. If your computer is connected to the Internet, you may start a terminal session at UNM with the Unix command ssh -Y user@linux.unm.edu, where user is replaced with your UNM Unix account name. (The -Y tells the local host to forward trusted X environment information to the remote host; see the ssh man page.) If the ssh connection goes through, you should be prompted for a password to your account. If you have successfully logged in you are now at UNM. You may show that X is running ok by executing some X command, such as xclock or xterm. If it works, you are ready to run the X clients (applications) of your choice at UNM.
  4. When finished, close your Cygwin windows by entering exit in your terminal windows. Even after you close the Cygwin program, the X server will actually continue to run until you reboot your computer. This means you don't have to run startxwin.bat again until you reboot.

Enjoy!

Last Modified