Use X forwarding on a personal computer to securely run graphical applications installed on IU's research supercomputers

On this page:


Overview

The X Window System (also known as X11, or just X) is a software package and network protocol that lets you interact locally, using your personal computer's display, mouse, and keyboard, with the graphical user interface (GUI) of an application running on a remote networked computer.

You can use X forwarding in an SSH session on your personal computer to securely run graphical applications (X clients) installed on the Indiana University research supercomputers.

Requirements

For X forwarding in SSH to work, your personal computer must be running an X server program. The X server program manages the interaction between the remote application (the X client) and your computer's hardware.

Most Linux distributions have the X server installed, but if your personal computer is running Windows or macOS, you will most likely need to install and run an X server application. For example:

  • For Windows, download and install Xming. For X forwarding to work, you'll need to start Xming before connecting to the remote system with your SSH client (for example, PuTTY).
  • For macOS, download and install XQuartz. For X forwarding to work, you'll need to start XQuartz before making an SSH connection to the remote system. Once XQuartz launches, you can use X forwarding with SSH from the Terminal or from the xterm application in XQuartz.

Additionally, your personal computer's SSH terminal application must have X11 forwarding enabled:

  • In Linux, the SSH terminal supports X forwarding by default.
  • In macOS, you may need to edit your ssh_config file (typically found at /etc/ssh/ssh_config or ~/.ssh/config) if you have trouble using X forwarding. If ssh_config includes #X11Forwarding no (or just X11Forwarding no), uncomment out the line (remove the leading #), and change it to X11Forwarding yes.
  • In PuTTY for Windows, you can enable X forwarding in new or saved SSH sessions by selecting Enable X11 forwarding in the "PuTTY Configuration" window (Connection > SSH > X11).

Also, the remote computer's SSH application must be configured to accept X server connections. The IU research supercomputers all have SSH configured to allow X forwarding.

Use SSH with X forwarding

Linux or macOS

To use SSH with X forwarding on your Linux or macOS personal computer to run an X client application installed on an IU research supercomputer:

  1. Open your SSH terminal client.
  2. On the command line, enter the following (replace username with your IU username and hostname with the hostname of the system to which you are connecting):
    • Linux: ssh -X username@hostname
    • macOS: ssh -Y username@hostname
    System Hostname
    Big Red 200 bigred200.uits.iu.edu
    Big Red 3 bigred3.uits.iu.edu
    Carbonate carbonate.uits.iu.edu
    Quartz quartz.uits.iu.edu
  3. Log in with your IU username and passphrase, and then confirm your identity with Two-Step Login (Duo).

To test if X forwarding is working, try running xclock; on the command line, enter:

xclock

If X forwarding is working, the xclock graphical clock will appear on your personal computer's desktop.

PuTTY for Windows

To use SSH with X forwarding in PuTTY for Windows:

  1. Launch your X server application (for example, Xming).
  2. Make sure your connection settings for the remote system have Enable X11 forwarding selected; in the "PuTTY Configuration" window, see Connection  > SSH > X11.
  3. Open an SSH session to the desired remote system:
    System Hostname
    Big Red 200 bigred200.uits.iu.edu
    Big Red 3 bigred3.uits.iu.edu
    Carbonate carbonate.uits.iu.edu
    Quartz quartz.uits.iu.edu
  4. Log in with your IU username and passphrase, and then confirm your identity with Two-Step Login (Duo).

To test if X forwarding is working, try running xclock; on the command line, enter:

xclock

If X forwarding is working, the xclock graphical clock will appear on your personal computer's desktop.

Use X forwarding for interactive sessions

To use X forwarding for an interactive session on an IU research supercomputer:

  1. SSH to an IU research supercomputer with X forwarding enabled (for help, see the instructions above).
  2. Use the Slurm srun command with the --x11 flag to request an X11-enabled interactive session; for more, see the Interactive jobs section of Use Slurm to submit and manage jobs on IU's research computing systems.
  3. When the requested resources are allocated to your job, you will be placed at the command prompt on a compute node. From there, you can launch graphical X applications (for example, xterm), as well as your own binaries.
    Note:
    Depending on the application and your user environment, you may need to load the module for the desired X client before launching the application; for help, see Use modules to manage your software environment on IU research supercomputers.

Get help

Research computing support at IU is provided by the Research Technologies division of UITS. To ask a question or get help regarding Research Technologies services, including IU's research supercomputers and research storage systems, and the scientific, statistical, and mathematical applications available on those systems, contact UITS Research Technologies. For service-specific support contact information, see Research computing support at IU.

This is document bdnt in the Knowledge Base.
Last modified on 2021-11-09 13:36:21.