Versions Compared

Key

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

...

Section


Panel
titleOn this page:

Table of Contents


Preliminaries

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

...

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 X 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


Running a GUI application over SSH

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

...


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

Improved Performance

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

...

Column


Info

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


Related pages

...