Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Excerpt

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 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 X X11 forwarding option of SSH to view and control these applications remotely.

...

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

...

Current macOS operating systems do not have the X windows system. Mac users should install the XQuartz (external site) package to use SSH with X 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.

Column
width900px


Code Block
languagebash
themeEmacs
titleListing 1. Contents of the ~/.ssh/config file.
linenumberstrue
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>@<hostname><remotehost>

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

The user can test this option by running the xclock command, that shows an analogical clock with the current time, on the remote host. This is shown in terminal 2.

...

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

Code Block
language
bash
themeDJango
titleTerminal 2. Execute xclock for X.
$ ssh -X <username>@setonix.pawsey.org.au
##############################################################################
#                    Pawsey Supercomputing Centre                            #
#        Empowering cutting-edge research for Australia's future             #
#                                                                            #
#     This service is for authorised clients only.                           #
#     It is a criminal offence to:                                           #
#          - Obtain access to data without permission                        #
#          - Damage, delete, alter or insert data without permission         #
#                                                                            #
##############################################################################
.
.
.
===============================================================================
<username>@setonix:~> xclock

The graphical clock running on the supercomputer should be displayed as shown in figure 1.

Image Removed
Figure 1. xclock running as an example of X applications.

Improved Performance

...

text
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:

...