Remote Connections

CS 248 - Introduction to Computer Graphics
Autumn Quarter, 2005
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 on the 2nd floor of Sweet Hall. We recommend going to Sweet Hall 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. 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.

Windows

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 username@myth.stanford.edu will then connect you to an appropriate machine at sweet hall. 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.

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 as follows:

ssh -X username@myth.stanford.edu

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.


levoy@cs.stanford.edu
Copyright © 2005 Marc Levoy
Last update: October 4, 2005 01:20:51 PM