You can run interactive applications that have Graphical User interfaces (GUI) by connecting to the cluster login node using ssh with X11 Forwarding enabled. Your local machine must be running an X server and enable X11 forwarding in order to display graphical output.
ON UNIX-like systems, an X Window System server is generally available and running with the default installation (or can be readily installed via the OS package manager). You can enable X11 Forwarding (that is the ability to visualize GUI applications running on the cluster on your local linux box) by adding the -X flag to the ssh command you use to connect to the cluster:
ssh -X email@example.com
login_id is replaced by your cluster user name.
Alternatively, you can override the ssh default for all your sessions on the Hoffman2 cluster by creating (or adding to) a file named
config in the $HOME/.ssh on your local machine and adding the option:
login_id is replaced by your cluster user name. You can then login on the cluster as user
login_id simply issuing:
Notes for X Window System users
The X.org Foundation leads the X Window System project and its software forms the basis for all the X packages from the various linux distributions. Starting in Xorg 1.17 (running on CentOS 6.9 and 7.x; Ubuntu version 15.04 and up and other linux distributions) indirect GLX was disabled by default, to enable indirect GLX and to allow remote visualization on the cluster of applications that use OpenGL (such as Abaqus, matlab, etc.) on your linux box you will have to locate the executable file Xorg (which is located in /usr/bin in CentOS), make a copy and create a wrapper to it in which Xorg is invoked with the +iglx flag.
On CentOS this can be achieved with:
mv /usr/bin/Xorg /usr/bin/Xorg.original
echo -e '#!/usr/bin/env bash\nexec /usr/bin/Xorg.original "$@" +iglx' > /usr/bin/Xorg
chmod +x /usr/bin/Xorg
chcon --type=bin_t /usr/bin/Xorg
N.B.: You will need root privileges to implement these changes.
On Ubuntu this can be achieved with:
sudo mv /usr/bin/Xorg /usr/bin/Xorg.original
and than editing
/usr/bin/Xorg to look like:
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.
if [ -x "$basedir"/Xorg.wrap ]; then
exec "$basedir"/Xorg.wrap "$@"
exec "$basedir"/Xorg "$@" +iglx
The computer will need to be rebooted.
On Mac OS X, the X windows system is called XQuartz. Mac OS X 10.5 10.6 and 10.7 installed it by default, but as of 10.8 Apple has dropped dedicated support and directs users to the open source XQuartz. You can install XQuartz from the OS distribution media or download it from https://www.xquartz.org/.
The Apple terminal application can be used to connect to the cluster. Specify -Y, not -X, in the ssh command to enable X11 Forwarding (as by default, a mac assumes that an -X connection is untrusted):
ssh -Y firstname.lastname@example.org
login_id is replaced by your cluster user name. Alternatively, you can override the ssh default for your hoffman2 session creating a $HOME/ssh/config file similar to the one shown for linux logins.
Notes for XQuartz users
Indirect GLX was disabled by default in Xorg 1.17, starting from XQuartz version 2.7.9, to enable indirect GLX and to allow remote visualization on the cluster you will have to issue at the terminal command prompt of your mac:
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
On Windows third-party software needs to be installed. Here is a list of possible choices:
- MobaXterm Enhanced terminal for Windows with X11 server, tabbed SSH client, network tools and much more. Free.
- XMing and Xming fonts X Window System Server for Microsoft. Free.
- Cygwin Linux-like environment for Windows. To add Cygwin/X server, select the xinit package from the X11 category. Free.
- Xshell Commercial. www.netsarang.com
Notes for MobaXterm users
- download MobaXterm Home Edition (installer edition)
- double click on the installer and follow direction to install the package
- start mobaxterm
- navigate to the “Settings” tab a window will pop up, select the “SSH” tab and click on the “SSH keepalive” box and press OK
- select the “Session” tab, a window will pop up, select “SSH”, under Remote Host enter: hoffman2.idre.ucla.edu (you can also add your username here) click OK. You will be prompted to log on the cluster
Notes for Xming users
- You will need to install PuTTY and configure it as follows:
- start PuTTY
- enter hoffman2.idre.ucla.edu in the “Host Name (or OP address)” field
- enter hoffman2 in the “Saved Sessions” field
- expand the “SSH” menu under the “Category” field (press + sing) select X11 and click the “Enable X11 forwarding” field
- select “Session” in the “Category” field and press the “Save” button
- Double click on the Xming icon
- start putty and select the dalton Saved Session and log using your username and password
Notes for Cygwin users
If you have installed Cygwin (including the X11 packages) on your Windows system, you can use the following steps to make X11-enabled connection:
- Open a Cygwin terminal
- Enter the command:
startxwin(this starts the X11 server on your Windows computer)
- In the (graphical) window that pops up, use
ssh -Xcommand described above.
Connecting via the NX protocol
Alternatively you can connect to the cluster via the NX protocol. NX is a free, secure, compressed protocol for remote X Window System connections for Windows, Linux, Mac OSX, and Solaris. We currently support connecting to the Hoffman2 cluster via the NoMachine client as well as the X2Go client.