Remote Connections

CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2006
Marc Levoy

NOTE: We (the TAs) will periodically update this site with answers to common questions and issues. So check here first.

When working on assignment 1 and assignment 2, you need to make sure your program runs on the myth machines in room B08 of Gates. We recommend going to Gates B08 to test your programs in person, but for many of you that is not possible. Through the magic of Unix and the X Window system, one can develop and test from home!

Essentially, you'll be logging into one of the myth machines with X11 forwarding enabled. When your program runs remotely, it will forward its graphics to your machine at home. OpenGL calls are also forwarded over this connection using the GLX extension. There are various security issues with X11 forwarding, so please read Stanford's Secure Computing notes on X Window Security before attempting the connection. This page provides some detail on the underlying technologies as well as remote connection info for Windows and Mac. The page is a bit out-of-date, however, so we'll provide some tips below.

Also keep in mind that your program's graphics can run an order of magnitude more slowly when done this way, depending on your connection. be


Cygwin is probably the most convenient way to get a unix like environment on a windows machine. See the cygwin website to acquire it. It's free.

If you are using cygwin, make sure you have the ssh and X11 cygwin packages installed. They can be selected in cygwin's setup program. Assuming you have installed cygwin in the default location, you can then run C:\cygwin\usr\X11R6\bin\startxwin.bat to bring up X11 with a shell. Typing ssh -X will then connect you to an appropriate machine in Gates B08. You should now be able to open programs that use the display.

If you are using an X server other than cygwin's, such as exceed, googling for "ssh X11 forwarding exceed", or similar yields numerous instruction pages. Make sure your X server supports GLX extensions properly for assignment 2 to work.

Mac OS X

You'll use the X11 application to connect. If you have Mac OS 10.4, X11 is an optional package on the OS install disc. If you have Mac OS 10.0-10.3, you can download X11 from Apple's download site. In either case, you'll find X11 in /Applications or /Applications/Utilities.

Run X11, then set up an SSH X-window tunnel to the remote machine by typing the following into your xterm:

ssh -X

This is basically the same as a normal ssh session, except that both ends of the connection are 'tricked' into thinking your home display and your remote program are on the same machine.
Copyright © 2006 Marc Levoy
Last update: October 2, 2006 04:12:26 PM