Skip to content

X Forwarding

If you need to use a tool that has a GUI (Graphical User Interface), you can use X forwarding. X forwarding is a mechanism that allows you to start up remote applications but forward the application display to your local desktop machine. When using trusted X forwarding, the remote machine is treated as a trusted client. A program with access to the display is trusted with access to the entire display.

Note, using X11 forwarding over long-distance networks can be slow. This is because the computer rendering the X11 windows is sending rendering commands to your local desktop which then renders them. More details are available in this informative posting: https://superuser.com/questions/1217280/why-is-x11-forwarding-so-inefficient.

For certain applications, Jupyter Notebooks may be a good alternative.

Required software

In order to use X forwarding, your desktop system needs to run an X server. If your desktop system is a Linux system, you're all set.  However, if you have a Mac or a Windows desktop, you'll need to install some software.

For Mac, install XQuartz. You can find XQuartz at https://www.xquartz.org/.

For Windows, we recommend using MobaXterm. You can find MobaXterm here: https://mobaxterm.mobatek.net/.

Running your application

If you have a GUI based application that you want to run on the SuperCloud system, you can start the application on a compute node and display the GUI back to your desktop. In order to do this, you must use the -Y option (this provides trusted X11 forwarding) of the ssh command when accessing the SuperCloud login node from your desktop:

ssh -Y USERNAME@txe1-login.mit.edu

Note: For users with a Windows 10 desktop, instead of using the Windows Command Prompt to ssh to the login node, we recommend connecting using MobaXterm.

Once you're logged on to the login node, execute the following command to obtain a compute node through Slurm allocation and create the ssh tunnel between the login node and the compute nodes.

LLsub -i --x11

Note: --x11 uses a lowercase x.

From this terminal, you can launch your GUI application and it will be displayed on your local desktop.  For a quick test of X11 forwarding, try running xeyes, which puts a couple of eyes on your screen that follow your mouse.