15110 Principles of Computing

Remote Access Instructions

If you wish to work on your programming assignments from a physically remote location, we recommend that you use ssh and X11 to run python3, gedit, etc., on unix.andrew.cmu.edu.

Remote Access from a Windows PC Using XMing

In order to log in remotely and use programs that require graphics or windows from the Andrew UNIX machines, you will need to download a few applications.

  1. First, you will need an application so you can log in to the Andrew UNIX machines remotely. We recommend PuTTY which is free. Download the putty.exe file and put it somewhere on your computer where you can find it easily.
  2. You also have to download an application called Xming. This application allows you to see X11 windows on your personal machine. X11 is the windowing system used for UNIX/Linux machines. It's not the same as Microsoft Windows, but it does have similar features that you're used to with graphically based operating systems. You need to download the following two files: Each of these is a local copy on our own server which should work for now. You can always check online for later versions, but finding these tends to be hard to do. Install both of these using the default settings. Be sure that both applications install to the same directory (they should be default). Be sure to answer "yes" even if the directory exists.
  3. In your Start Menu, you should now have an item for Xming. Start it now. If you have a firewall, it may ask if you want to unblock it. You don't need to. Once you've done this, look for the "X" icon in your system tray (bottom right). If you hover over the icon, you should see something like "Xming Server:0.0". Make a note of what you see if it's different.
  4. Now using PuTTY, you should set up a "session" so you can log in easily. Start PuTTY. For host name, use unix.andrew.cmu.edu and make sure that SSH is selected as the Connection Type. In the Category menu section on the left side, expand the SSH menu option and select X11. Select the option Enable X11 Forwarding and for X display location, enter localhost:0.0 unless you didn't see 0.0 when you hovered over the "X" icon in the system tray. If you saw some other x.y, then enter localhost:x.y in that field, replacing x and y with the numbers you saw. Now, click the Session option in the main menu on the left, and underneath Saved Sessions enter a name for this "session" (e.g. Andrew with X Windows). Click Save. Now you can always Load these settings whenever you start PuTTY before logging in.
  5. Finally, in PuTTY, click Open to open the session you just set up. You should see a terminal window open up and ask you for your login name. Enter your Andrew ID and then when prompted, enter your password. After this, you should see a prompt. You are now logged into your home directory on the Andrew UNIX machine cluster remotely! To see that X windows applications run and display on your local machine, try to run the xeyes program by typing that command and hitting enter. You should see a pair of eyes that follow your mouse pointer around. Close that application and you should get your prompt back. You can run gedit and any other applications now remotely.
  6. If you want to hand in your files from your remote machine, you will need to copy them from Andrew to your machine. We recommend a program called WinSCP (for Windows Secure Copy). Install this. When you run it will ask for a hostname (unix.andrew.cmu.edu as before), your user name and password. When you click Login, it will connect with your Andrew account. You can then drag files back and forth, change directories, etc. So you can drag files from your Andrew account to your laptop, then zip (or compress) them, and hand in from your own laptop.
Adapted from http://www.cs.caltech.edu/courses/cs11/misc/xwindows.html.

Remote Access from a Mac

- REVISED

Terminal and Graphics

You will need to go to the following site to download XQuartz which is a replacement for the standard X11 that used to come with Mac OS. Once you download the install package, install it and reboot your Mac. Then,

  1. Start the Terminal program on your Mac.
  2. Use ssh to remotely connect to a CMU Andrew Linux Machine by typing
    ssh -X my_andrew_id@unix.andrew.cmu.edu
    
    (replacing my_andrew_id with your andrew user id) into the xterm/terminal. This should start XQuartz. If all works correctly, you can execute the following command to run a simple X program that runs on the Andrew server that display a set of eyes on your remote desktop/laptop:
    xeyes &
    The eyes will follow your mouse until you kill the program.
  3. cd to the directory you want
  4. start gedit by typing either gedit & or gedit filename.py &

File Transfer

To transfer files between your home Mac OS X machine and the CMU Linux environment, you may wish to install a program such as Fetch (documentation, download and installation instructons). You can also use the command-line scp program.