NCSA Home
Contact Us Intranet

Using the X Window System

User Information Home
Data
Security
Allocations
Consulting
Training

NCSA's Help Desk is available 24 hours a day, seven days a week, 365 days a year:
help.ncsa.illinois.edu
217-244-0710
help@ncsa.illinois.edu

 
  1. Introduction
  2. X Forwarding/Tunneling
  3. X Window Software
  4. Testing 3D capability
  5. X Windows and interactive batch jobs
    1. Abe/Lincoln
    2. Ember

1. Introduction

Various tools (programs) on NCSA's high performance computers use the X Window System (also called X11). Originally developed for Unix, the X Window System allows a program on one computer to open windows on another computer's screen (usually your desktop computer). The program that runs on the remote computer is called the client. The program that runs on your desktop computer is called the server. X Window servers are available for Microsoft Windows, Apple Mac, and Unix/Linux.

2. X Forwarding/Tunneling.

Before running an X Window client tool on an NCSA machine, you need to securely connect to the target machine to open a window. Back in the old days, you might have used telnet, and set your DISPLAY environment variable after logging in. That method is too much of a security risk nowadays. To keep your X Window traffic secure, use an SSH client like Putty, Secure Shell SSH, or similar package. Most graphical user interface packages will have an option you can check in the preferences to allow X11 forwarding. Once that's set, you can login with ssh and use X applications (good test applications on most systems are: xclock or xterm).

Here are the instructions for setting up X11 forwarding for some popular applications and systems:

  • Windows & Putty
  • Windows & SSH Secure Shell
  • Unix/Linux prompt (example: Mac OS X terminal, Linux shell window)
    	ssh -Y -l mylogin ember.ncsa.illinois.edu
    
    (-Y is equivalent to ForwardX11Trusted=yes in your $HOME/.ssh/config)

    Unix X11 forwarding and the -Y option are explained in further detail here: HOWTO_X-forwarding.

3. X Windows Software

Since the X Window System is not normally installed on Microsoft Windows systems, you must find a product and install it on your system. Below is a partial list of X Window servers available for Microsoft Windows and older Mac systems. Mac systems with OS X 10.4 and newer ship with an X11 application - start it and ssh from one of its xterms to use ssh and X11 forwarding.

None of the X Window servers below has been tested with all NCSA X Window client tools. If possible, get a demo version and test it with the tool before you purchase it.

Vendor Product Microsoft Windows Apple Mac
Xming

Xming/Xming-mesa

free n/a
Cygwin

cygwin/x

free n/a
MicroImages, Inc.

MI/X

$ free
OroborOSX

OroborOSX

n/a free
Hummingbird Communications Ltd.

Exceed

$ n/a
Attachmate Reflection X $ n/a
RealVNC

RealVNC

free $

There is a more extensive list of X Window System products available for Microsoft Windows, Apple Mac, and other systems.

4. Testing 3D capability

To test remote 3-dimensional graphics capability with X Windows, glxgears may be used from NCSA login hosts. It should draw a box with 3 rotating gears showing your local frame refresh rate for 3-d work in frames per second (FPS). If the box doesn't draw, your X display doesn't support the GLX OpenGL extension and you would need to look into that.

Example display output:




Xming-mesa X server for Windows supports 3D and openGL.

To check a local Linux system for OpenGL support, the xdpyinfo command should show GLX listed as in this example:

$ xdpyinfo | grep GL
    GLX
    SGI-GLX

5. X Windows and interactive batch jobs

There are two common methods to run X Window applications on a compute host. The NCSA resource you are using will determine what method is available.

5.1 Abe/Lincoln (X11 Forwarding/Tunneling)

Because our Linux clusters (Abe, Lincoln) are configured to allocate whole nodes to your batch jobs (the compute nodes are not shared by multiple jobs), ssh access is allowed to compute nodes assigned to your job. As such, you can forward your X11 application through the ssh session from a compute node.

  1. Login to the cluster with ssh, start an xterm to verify your X11 tunneling is working correctly:
    
           xterm &
    
    
  2. In that xterm, submit an interactive batch job and wait for it to start and note the execution host in the prompt name when the job starts
     
           qsub -I -V -lnodes=1:ppn=8,walltime=00:30:00 -q lincoln_debug
    
    
  3. Login to the cluster again with ssh, and from the login node ssh to the compute node running your job from step 2.
    
           ssh -Y clusterhost123
    
    
  4. Start your X Windows application on the cluster machine
    
           clusterhost123% my_GUI_application
    
5.2 Ember (VNC)

Our SMP system (Ember) does not allow ssh access to the compute hosts so an alternative method, VNC (Virtual Network Computing), must be used to display an X11 application running on the compute host on your local system.

  1. Submit an interactive batch job. When the interactive batch job starts on, say, ember-cmp4, run vncserver:
    
           qsub -I -V -l walltime=00:30:00,ncpus=6,mem=20gb 
    
    
    The first time a user runs this, they will be asked to enter a password:
    	
           username@ember-cmp4:~> vncserver
    
           You will require a password to access your desktops.
    
           Password: 
           Verify:   
           Would you like to enter a view-only password (y/n)? n
    
           New 'X' desktop is ember-cmp4:1
    
           Creating default startup script /u/ac/username/.vnc/xstartup
           Starting applications specified in /u/ac/username/.vnc/xstartup
           Log file is /u/ncsa/username/.vnc/ember-cmp4:1.log
    
           username@ember-cmp4:~>
    
    

    The password entered will be needed when the vnc client is started, as described below. One can ignore the offer to set a "view-only" password.

    One may encounter a warning message regarding left over lock files; these should be removed, when convenient (before the end of the interactive session), but will not prevent the server from starting.

    The important line to note is:

    
           New 'X' desktop is ember-cmp4:1
    
    

    Depending on the compute host obtained, the number of other users running servers, and the aforementioned lock files, this may read "ember-cmp2:3", "ember-cmp1:7", etc.

  2. Now log in to ember from your desktop with X11 forwarding enabled and start the client; in the case described here,
    
           vncviewer ember-cmp4:1
    
    
  3. You will be prompted for the password set as above (NOT your NCSA password), after which an X window will appear on your desktop, containing an open xterm running on the compute node. Computations may then be started, with display directed to the X window.
  4. To shut down, first kill the X window on your desktop by clicking the close button in the upper corner, then, from within the interactive job on the compute node, run
    
           vncserver -kill :1
    
    
    where, again, the number ":1" corresponds to the display "ember-cmp4:1".

The X Window System is supported by X.Org, a consortium of computer hardware and software vendors.