In normal circumstance, we recommend user to use CLI (Command Line Interface), however, for some software we may need GUI (Graphical User Interface). Therefore, we need X11 server.

PS: the GUI provided by X11 server, therefore, please do not use it when the network is not good, since the operation through the interface of X11 forwarding is obviously stuck.

For Linux and macOS User

It is easy for you to use X11 forwarding by adding -X parameter when you are using SSH

  1. ssh -X user_name@ip_addr

After logging in to the cluster, you can directly enter the command to start the program of the graphical interface, for example:

source /home/user_name/environment/MATLAB
MATLAB

PS: In macOS, XQuartz is not pre-provided, please download and install it by yourself. XQuartz

For Windows User

Use MobaXterm

MobaXterm will automatically set up X11 forwarding, therefore it is user-friendily.

User PuTTY

PuTTY does not contains X11 server, therefore, please download and install Xming or VcXsrv (recommended)

  1. After installation of Xming/VcXsrv, double click the icon and run the Xserver
  2. Run puTTY, and change its configuration: you need to load the Enable X11 forwarding

1.9 Use-Graphical-User-Interface - 图1

Universal Method

Visual Studio Code

Visual Studio Code combines the simplicity of a code editor with what developers need for their core edit-build-debug cycle. It provides comprehensive code editing, navigation, and understanding support along with lightweight debugging, a rich extensibility model, and lightweight integration with existing tools.

You need three extensions:

  • Remote X11, Remote X11. When working in a remote environment, this extension sets the DISPLAY environment variable so that X windows applications started from Visual Studio Code appear on the local machine. For this extension to work, it must be installed on the remote machine, and you must be running an X server on the local Visual Studio Code 1.0 x11 forwarding? Ask Question Asked 4 years, 2 months ago. Active 1 year, 10 months ago. Viewed 7k times 3. 2. Is anyone able to run code 1.0
  • Remote X11 (SSH), Extension for Visual Studio Code - Enables X11 forwarding with the Remote - SSH extension. Remote X11. When working in a remote environment, this extension sets the DISPLAY environment variable so that X windows applications started from Visual Studio Code appear on the local machine. For this extension to work, it must be installed on the remote machine, and you must be running an X server on the local machine.
  • Remote SSH, is the extension for Visual Studio Code - to establish a SSH tunnel between local machine and the remote server.