Running Graphical Applications (GUI) on Supercomputers

Unlike personal computers running operating systems such as Windows, MacOS or Ubuntu, our systems do not provide a graphical windowing environment. Nevertheless, some of the tools provided on Pawsey systems do have Graphical User Interfaces (GUIs). GUI applications on Pawsey supercomputers are typically based on the X Window System (external site), also known as X11 or simply shortened to X. Typical examples of these applications are debuggers and profilers. Here we explain how to use the X11 forwarding option of SSH to view and control these applications remotely.

On this page:

Preliminaries

Although X can be used remotely without SSH, it is insecure and blocked by most firewalls. SSH X11 forwarding fixes both these issues and also automatically sets the DISPLAY environment variable.

As an alternative to X over SSH, you can use the higher performance VNC over SSH, which performs faster for long-distance connections. See the separate documentation for details.

Even when running with a GUI, use compute nodes for memory-intensive or cpu-intensive operations

Preparation for macOS

Current macOS operating systems do not have the X windows system. Mac users should install the XQuartz (external site) package to use SSH with X11 forwarding.

After the installation, users may also need to indicate the path where the xauth program is. To do so, users must edit the ~/.ssh/config file and add the path under The Host * entry, as shown in listing 1.

Listing 1. Contents of the ~/.ssh/config file.
Host *
 XAuthLocation /opt/X11/bin/xauth

Enabling SSH X11 Forwarding

For Linux, macOS and Windows (MobaXterm), the user opens a local terminal window and executes ssh with the X forwarding option -X.

$ ssh -X <username>@<remotehost>

Some sites recommend using the -Y flag instead. While this can fix some compatibility issues, the -X flag is more secure.

Within the terminal shell on the remote host (eg, Setonix), you can check to see that the DISPLAY Environment Variable has been set for you, by typing

username@setonix> echo $DISPLAY
localhost:34.0
username@setonix>

NOTE: The first number in the output may be different

You should now be able to invoke your graphical application, and have any windows it opens appear on you local desktop.

Improved Performance

X11 forwarding over SSH does not perform well over long distances. The user can try to improve performance over long distances with SSH compression. This can be activated by using the -C option in the ssh command line:

$ ssh -X -C <username>@<remotehost>

As an alternative to the command-line option, the user can add the following line to the ~/.ssh/config file on the local machine.

Compression=yes


SSH compression will not make too much difference for short distances.

Related pages