Department of
Physics & Astronomy


Main Page
  • Computer System
    • Remote Graphics Configuration

Remote Graphics Configuration

Running Graphics Client Programs

If you are logging into the P&A network from a Unix or Linux platform running a graphics interface, your local X-Windows server can display the graphics from an X-Windows application running on a remote host. Often, the SSH connection will automatically configure the connection to work. Otherwise, the connection must be configured as follows.

In order to run graphical applications like IDL, Matlab, Mathematica, xv, etc. on a remote Unix (or Linux) machine, the client application needs to know where to open the display window, which will be located on your local machine. On the remote system there is an environmental variable, DISPLAY, which must be set to the IP address of the computer on which the window is to be displayed (the graphics server, e.g. your home system). This configuration will happen automatically for most Unix and Linux systems, including Apple's OS/X. Your computer (the server) must be running an X-Windows server program.

MS-Windows and older MacIntoshes require special software, an X-Windows graphic server program; see below.

Configuring the DISPLAY variable

To see if the DISPLAY variable is properly configured, run the application xclock from a command line on the remote (P&A) system:
	th123-22:bland% xclock
A clock face should appear on your screen. If this happens, your DISPLAY variable and your X-Windows host program are all working. If not, here is how to set the DISPLAY variable. First look for it in the environment:
	th123-22:bland% setenv | grep DISPLAY
If you see something like
the DISPLAY variable is set. If the value matches the name or IP address of your home (or local) system this variable is probably not the problem; check your X-Windows host. (It should not match the address of the remote system.) If the DISPLAY variable is not listed, or if you suspect that it is wrong, set it as follows:
	th123-22:bland% setenv DISPLAY
	th123-22:bland% setenv DISPLAY
The format is your local machine's IP address (either the name format or the number) followed by :0 (which selects the default graphics screen on the given host). Note that if you are running a Bourne-shell style shell, the syntax will resemble
	th123-22:bland$ DISPLAY= export DISPLAY

You may also need to configure the local host graphics server to accept a remote connection. Type:

	th123-22:bland$ xhost
If your [Unix-like] system does not support the xhost command ("command not found"), you probably don't need it. If the command succeeds, but the remote machine is not listed, you need to add the remote machine to your server's list of clients:
	th123-22:bland$ xhost being added to access control list

Now try xclock again. If you still can't get it to work, ask for help. .

Remote X-Window hosting on MS-Windows

The X-Windows graphics interface standard used by Unix/Linux applications and the P&A tools is not supported by Microsoft, which uses a proprietary interface. In order to interface with P&A graphics programs, your home computer must run an X-terminal emulator. There is one which is used quite a bit in the SFSU College of Engineering and Science: Xwin32 from Starnet. Refer to Getting XWIN32 for more information. Here are the steps to get this going.
  • Download xwin32, install it, and run it before connecting with SSH.
  • Run SshClient or another ssh client application. It should set the environmental variable DISPLAY when the connection is made. You can repeat the above test to verify.