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

On this page:


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.

Using X forwarding in an SSH session on your personal computer allows you to securely run graphical applications (X clients) installed on the Indiana University research computing systems.


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 graphics hardware and input devices.

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 Mac 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 sshd_config file (typically found at /etc/sshd_config or /etc/ssh/sshd_config) if you have trouble using X forwarding. If sshd_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 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. At IU, Big Red II, Carbonate, and Karst all have SSH configured to allow X forwarding (trusted mode only).

Use SSH with X forwarding

Linux or macOS

To use SSH with X forwarding from your Linux or Mac personal computer to run an X client application installed on Big Red II, Carbonate, or Karst at IU:

  1. Open the SSH terminal client.
  2. On the command line, enter (replacing username with your IU username):
    • For Big Red II:
      ssh -Y
    • For Big Red 3:
      ssh -Y
    • For Carbonate:
        ssh -Y
    • For Karst:
        ssh -Y
    The -Y option turns on trusted X forwarding. You should use it only when connecting to secure systems, such as the IU research computers.
  3. Log in with your IU passphrase.

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


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 II
    Big Red 3
  4. Log in normally with your IU username and passphrase.

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


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

Use X forwarding for interactive sessions

On Carbonate or Karst

On Carbonate or Karst, if your interactive session requires:

  • Less than 20 minutes of processor time: Connect via SSH with X forwarding enabled, and then launch the X client from the command line.
  • More than 20 minutes of processor time: Submit a request for an interactive job via the batch system.

    To do so, connect via SSH with X forwarding enabled, and then:

    1. Use the TORQUE qsub command to submit an interactive job request. Add the -I (for interactive) and -X (for X forwarding) flags; for example (on Karst):
        [username@h2 ~]$ qsub -I -X -q interactive -l nodes=1:ppn=1,walltime=1:00:00
        qsub: waiting for job 371037.m2 to start
        qsub: job 371037.m2 ready
        . . . . 
        [username@c5 ~]$ 
    2. If the X client is not already added to your user environment, load the appropriate module; for example:
        [username@c5 ~]$ module load matlab
    3. From the command prompt, launch the X client; for example:
        [username@c5 ~]$ matlab

On Big Red II


Big Red II will be retired from service on December 15, 2019. After that date, you will no longer be able to log into Big Red II; however, the data in your Big Red II home directory will remain accessible from your home directory on any of the other IU research supercomputers. Requests for new software installations on Big Red II are currently being redirected to Big Red 3 unless the requested software has requirements specific to Big Red II.

IU graduate students, faculty, and staff can create Big Red 3 accounts using the instructions in Get additional IU computing accounts. Undergraduate students and affiliates can get Big Red 3 accounts if they are sponsored by full-time IU faculty or staff members; see About Big Red 3, Big Red II, RDC, and SDA accounts for undergraduate students and sponsored affiliates at IU. Grand Challenges users who create Big Red 3 accounts can submit the Request Access to Specialized HPC Resources form to request exclusive access to a portion of the system for running jobs.

For more, see Upcoming changes to research supercomputers at IU.

Do not run interactive sessions on the Big Red II login nodes. Instead, submit a request for an interactive job via the batch system, and then launch your X client on a compute node in the Cluster Compatibility Mode (CCM) execution environment (X applications are not compatible with the Extreme Scalability Mode environment).

To do so, SSH to Big Red II with X forwarding enabled, and then:

  1. Use the TORQUE qsub command to submit an interactive job request. Add the -l gres=ccm (CCM execution environment) flag, as well as the -I (interactive) and -X (X forwarding) flags, to your qsub command; for example, at the command prompt, enter:
      username@login1:~> qsub -I -X -l walltime=00:45:00 -l nodes=1:ppn=32 -l gres=ccm -q cpu

    When the required resources are available, your job will start, the CCM environment will initialize, and you will be placed on an aprun node:

      qsub: waiting for job 158932 to start
      qsub: job 158932 ready
      In CCM JOB:  158932  JID  158932  USER  username  GROUP  uits
      Initializing CCM environment, Please Wait
      waiting for jid....
      CCM Start success, 1 of 1 responses
      Directory: /N/u/username/BigRed2
      Tue Oct 15 14:55:50 EDT 2013
  2. From the aprun node command prompt, load the ccm module, and then enter the ccmlogin command to be placed on a compute node (for example, nid00860):
      username@aprun1:~> module load ccm
      username@aprun1:~> ccmlogin
      Warning: Permanently added '[nid00860]:203' (RSA) to the list of known hosts.
    Alternatively, to avoid having to load the necessary modules each time you run an interactive session, you can add the necessary module load commands to your ~/.modules file. For more, see Use a .modules file in your home directory to save your user environment on an IU research supercomputer.
  3. Once you are placed on a compute node, you can launch graphical X applications (for example, xterm), as well as your own binaries, from the command line. Depending on the application and your ~/.modules file, you may need to load the module for the desired X client before launching the application.

    For example, to load the matlab module, and then launch the MATLAB GUI client, at the compute node command prompt, enter:

      username@nid00860:~> module load matlab
      username@nid00860:~> matlab

Get help

Support for IU research computing systems, software, and services is provided by the Research Technologies division of UITS. To ask a question or get help, contact UITS Research Technologies.

For more about using Modules to configure your user environment, see Use Modules to manage your software environment on IU's research computing systems.

Back to top

This is document bdnt in the Knowledge Base.
Last modified on 2019-11-11 10:40:27.

Contact us

For help or to comment, email the UITS Support Center.