Connecting With X11 (The X Window System)
Introduction
The X Window System, also known as X11 or simply X, is a popular windowing system that is used on Unix-like operating systems with bitmap displays. It serves as the foundation for a graphical user interface (GUI), allowing users to draw and move windows on their display device and interact with a mouse and keyboard.
Originally developed as part of Project Athena at the Massachusetts Institute of Technology (MIT) in 1984, X has been continuously developed over the years and has been at version 11 since September 1987. The X.Org Foundation currently leads the X project, with the current reference implementation being the X.Org Server. This software is freely available as open-source software under permissive licenses like the MIT License.
Getting Set Up
We'll start off by assuming you already have a terminal installed and can use SSH to connect to the HPC (or whatever server you are using). If not, you'll first need to make sure you have a terminal available for your computer as well as an SSH client (in some cases these can be the same software). Linux already has a Terminal App and SSH client built in.
To get started using X, you'll need to install the X server software on your computer. The steps for downloading and installing the software depend on what operating system you are running:
Using Windows
For Microsoft Windows, there are a couple of options that we recommend: MobaXterm and Xming. Both pieces of software have paid and free editions. The good news is, the free editions of either of them will be sufficient for what you'll most likely need.
MobaXterm
| Software Name | Download Location |
|---|---|
| MobaXterm Home Edition | https://mobaxterm.mobatek.net/download-home-edition.html |
You'll need to download and install the MobaXterm Home Edition from the link above. Once you have it installed, go ahead and open the application. To create a new session, click on the Session icon, then SSH in the Session settings window. Enter the server you are connecting to in Remote host (under Basic SSH Settings). If you want to store your username, click on the check box and then type in your username. Next, click on Advanced SSH Settings and make sure that "X11-Forwarding" is checked. Click on OK at the bottom of the window.
Xming
| Software Name | Download Location |
|---|---|
| Xming-mesa (Public Domain) | http://www.straightrunning.com/XmingNotes/ |
You'll need to download the mesa version of Xming (Public Domain). Once you have it downloaded, run the installer and accept the defaults. Once the
Using Mac OS X
XQuartz
After Mac OS X 10.7, Apple stopped including the X11.app program. Instead, you need to download XQuartz to get X11.app for your Mac. You can download a package that will install just by double-clicking on the package. Alternatively, if you have either MacPorts or Homebrew installed on your Mac, XQuartz can be installed using those pieces of software as well.
Install via Package
| Software Name | Download Location |
|---|---|
| XQuartz | https://www.xquartz.org/index.html |
Install via MacPorts
To install XQuartz using MacPorts, you will need to open a terminal (Terminal.app or iTerm2.app for instance), and run the following command:
sudo port -v install xorg
This will install the X11 server on your system as well as all of the client applications. If you just want to install the server, run the following instead:
sudo port -v install xorg-server
Install via Homebrew
To install XQuartz using Homebrew, you will need to open a terminal (Terminal.app or iTerm2.app for instance), and run the following command:
brew install --cask xquartz
Using Linux
Linux already has a Terminal App and SSH client built in. You generally don't need to do anything to install either application. If your Linux machine already has a Graphical User Interface (which unless you're using a server, it almost certainly does), you've most likely got an X11 server installed already, and are ready to go.