Windows and Unix


There are two techniques for using a machine in your room (or house) to connect to Unix machines used in CPS 01, 06, 100, 104, 108, and so on.

One technique involves connecting to a Unix machine such as godzilla, teerXX, carrXX, bioXX and so on. You log on to one of these Unix machines but display the login session (xterm, xemacs, etc) back to your Windows or Macintosh machine.

The other technique is to install a Unix like environment, including xemacs onto your Windows machine. Then you can work on your own machine in the same environment that the Unix machines used.

The advantage of the second approach is that you use your own machine, so you're not competing with other users of the Unix machines. Also, for many programs running them on your own machine is much faster than running on a remote machine and displaying the results back to your machine. This is especially true of graphically intensive programs e.g., Java programs that use GUIs.

Connect to a Unix machine, display back to your machine

You need two software programs to connect to a Unix machine but display the session back to your machine.

  1. You need an X-server. This is typically X-Win32 for Windows machines and eXodus for Macintosh machines. These are accessible from the OIT site license page (http://www.oit.duke.edu/site/software.html). Duke has a site license for X-Win32. If you are off-campus you can download a trial version from the Starnet website. The trial version lasts for 30 days, then reverts to a version that only runs for two hours at a time. This is still very useful.

  2. You need a secure-shell (SSH) terminal program. These are also accessible from the OIT web page. Duke has a site license for F-Secure SSH client. Additional documentation for this program can be found on the F-secure website. F-Secure will also install a FTP program for transferring files from your machine to your acpub account.

X-server

You should download and install the X-Win32 X-server. When you install X-Win32 you may be asked for information and a machine when it first starts up. You can most likely just ignore these. If the X-server starts successfully you'll see a blue X icon in the task bar at the bottom of the screen.

SSH terminal program

Download and install the F-Secure SSH program.

You can specify godzilla.acpub.duke.edu as a Host when connecting. Godzilla actually cycles through several different machines depending on load. You can also specify a specific machine such as teer13.acpub.duke.edu or carr15.acpub.duke.edu. You can substitute other numbers for machines, check in the clusters to see what legal numbers are.

After you specify a host you'll need to enter your login and your password. Then you should have a terminal window logged into a Unix machine.

X-11 Tunneling

To make xemacs and other applications display on your machine, you need to enable X-11 tunneling. To do this, select Edit->Settings from your SSH window. Click on Tunneling, and check the box Tunnel X11 connections. Click the OK button.

Save Settings

To save the settings so you won't need to do this again, select File->Save Settings from your SSH window. Your settings should now be saved, you can quit F-Secure and restart it to verify that this worked.

Displaying xemacs and other applications

If you enabled X-11 tunneling as described above, you should be able to login and have xemacs (and other applications) displayed back to your machines.

To see if this will work, after you login to a Unix machine type

   echo $DISPLAY

You should see something like teer12.acpub.duke.edu:14.0. If you see something about an UNDEFINED VARIABLE, then your setup stuff didn't work. Try again once to turn on X-11 forwarding, then ask for help. If you do see the DISPLAY environment variable then you can simply type

  xemacs &
to have xemacs run and display on your machine. The ampersand & runs xemacs in background so that your shell still functions.

FTP

FTP (File Transfer Protocol) is a program that you can use to transfer files between your acpub account and the computer you are working on. To use F-Secure FTP to transfer files, follow these steps:

  1. Start FTP from your F-Secure SSH (xterm) window by selecting Window->New File Transfer (there is also a shortcut icon at the top of your F-Secure SSH window - a yellow folder). You can also start the F-secure SSH File Transfer program from the icon on your desktop or from the start menu, but you will need to go through the login procedure.

  2. A window will pop up.

  3. The left frame of the FTP window should contain the folders in your acpub account. The right frame contains the files in the selected folder.

  4. Click your cps001 directory, and select the folder you want to upload your files to.

  5. Select Operation->Upload (there is also a shortcut icon - an arrow pointing up).

  6. In a new window, the files in your local disk drive (C:) should show up.

  7. Locate the file you want to upload by clicking through directories. Double-clicking the file name will upload automatically.

  8. This file should now appear in the right frame of your FTP window.

  9. To exit FTP, select File->Disconnect (there is also a shortcut icon - a computer with a red line through it). Close the FTP window.

Pico

If you need a simple text editor (you don't need to compile programs, etc.), you can use the Unix text editor Pico. Pico will run right in your xterm window and save you the trouble of FTP-ing your files. A few things to know are

You can find more information about Pico in OIT's Unix Manual.


Jeff Forbes
Last modified: Mon Sep 9 10:16:16 EDT 2002