Setting the DISPLAY Environmental Variable
Many Unix applications need to open additional windows, generally for
graphics. They use the environmental variable DISPLAY to tell them on what
computer to open the window. If the environmental variable is not set,
you will get the following error:
% PLOT: Unable to open X Windows display:
Is your DEVICE environment variable set correctly?
% Execution halted at $MAIN$ (PLOT).
If the value of DISPLAY is set to someone else's computer, your window
will pop up on their computer screen!
The DISPLAY variable needs to be set to the IP address of your computer,
followed by a screen address, which can always be taken to be :0.0 .
Here are some examples corresponding to different situations.
PC in the Terminal Room
hodge:drodman% setenv DISPLAY th123-13.sfsu.edu:0.0
The last three digits of the computer name are different for each PC in
PC in Faculty Office
hodge:bland% setenv DISPLAY ingrid.sfsu.edu:0.0
Using XWIN over PPP Modem Connection
hodge:bland% setenv DISPLAY 184.108.40.206:0.0
The number 220.127.116.11 is the temporary IP address assigned to you
when you establish a PPP connection. You can find it in the TRUMPET
SETUP window, if you are using the WINSOCK provided by the University.
It is different every time you connect.
Running from a GraphOn terminal in the Terminal Room
hodge:bland% setenv DISPLAY unix0:0.0
Actually I am not too sure about this one. The name could be unix1,
unix2, unix3, etc., and is assigned when you log on. It might be better
to log directly onto the machine you are going to run on, in which case
the DISPLAY variable will be set correctly by the system.