NERSC logo National Energy Research Scientific Computing Center
  A DOE Office of Science User Facility
  at Lawrence Berkeley National Laboratory
 

Using X Applications at NERSC

The X Window System is a network-transparent standard window system which runs on a wide range of computing and graphics machines. With X-Windows, you can display remote applications on your local computer screen.

UNIX Workstations

If you are using a UNIX workstation with a graphical user interface, it is almost certainly X-Windows compatible and ready.

Use ssh to connect to the NERSC production computers. If you log in using the usual default setting of SSH, the software will perform X authentication forwarding and X applications will connect to your workstation's X display server automatically. The information will be encrypted, however, and you may notice some degradation in performance. If you wish to bypass the SSH encryption when displaying X applications, follow the instructions below.

In order to make X-Windows applications display on your screen, do the following. This will also defeat SSH encryption of the data:

SSH is the only supported method of connecting to NERSC machines. See the Secure Shell (SSH) web page and the brief page on Secure Connections from a Unix System using SSH for more information on this topic.

Displaying X on a Mac or PC

If you want to display X-Windows applications on a Mac (pre-OS X) or PC, you may need to obtain third-party X-display software and install it on your machine.

Some software packages are listed below. NERSC does not necessarily support, endorse, nor recommend any of these packages.

In any of the above cases, the X11 application must be launched before an ssh connection is made to a NERSC computer. SSH connections will work without X11, but X11-based windows will not open on your workstation.

Setting the DISPLAY environment variable

When you connect via SSH, your X11 environment should be automatically configured. If it is not, you may have to connect using the -X (upper-case X) or -Y (upper-case Y) option on the ssh command line.

If your X11 display still does not work, check that the DISPLAY environment variable has been set properly. This variable is used by the X application to determine the internet address of your local screen. You can check by typing this command at the NERSC machine prompt:

 %  echo $DISPLAY

The system should respond with something like

localhost:13.0

If the echo $DISPLAY command produces a blank response you can configure it manually. This method will bypass SSH encryption. At the prompt, type

% setenv DISPLAY hostname:0   (csh)

or
% export DISPLAY=hostname:0   (ksh)

where hostname is the internet name of the machine you are using for your display. If you do not know your machine name, you can probably find it with the command

% who | grep username

where username is your user name. For example:

franklin% who | grep aaa 
aaa  ttyp007      Jan  7 08:36  (generic.lbl.gov)

The hostname is in parentheses (it might be a set of numbers formatted like this: 128.55.200.24).

Note: Explicitly setting the DISPLAY environment variable will not work on Franklin; xterms originating on that system MUST use the DISPLAY setting provided by SSH during initial login. Other systems are also likely to be configured to disallow unencrypted connections.

Authorizing Access

If you are bypassing SSH X-forwarding you may have to tell your display that it is OK for the NERSC machine to open a window. If you are using a UNIX workstation, open a shell window on your local machine and type this command

% xhost +x.nersc.gov

where x is replaced by the name of the machine you are logged into

Once the remote application has opened a window, you may want to remove authorization for more windows. Otherwise, someone else could potentially open a window on your display, or even "steal" your display and view it. You remove authorization with the command

% xhost -x.nersc.gov

Note: Using the "xhost" command can cause security problems, and should generally be avoided. If you are considering this action, contact the NERSC Consultants first for advice.

If you are using a personal computer, there will probably be a menu selection that says something about authorizing remote hosts. Check the documentation for your software package.


LBNL Home
Page last modified: Sat, 09 Feb 2008 01:25:59 GMT
Page URL: http://www.nersc.gov/nusers/help/access/xsetup.php
Web contact: webmaster@nersc.gov
Computing questions: consult@nersc.gov

Privacy and Security Notice
DOE Office of Science