Report a Problem:
Phone: 503-725-5420
Location: FAB 82-01
Home Students Fac/Staff CS Tutors Guidelines Windows Linux Mac Mail Network Software Web TheCAT Sitemap Contact
arrowHome arrow Linux arrow Remote Access arrow Remote X/GUI Wednesday, 29 March 2017  
Remote Access
Running X11 Applications Remotely Print
Written by fester   
Monday, 19 September 2005

NOTE: We do not support the software required to do this on your home computer or laptop. This is simply a guide to help get you started on your way. If there is some application that you can not run remotely, you need to use one of the UNIX labs on site at PSU.

If you don't quite know what X Windows applications are, you may want to read this summary first:

NOTE: You must connect to the VPN before you can access the Redhat machines ( and

All remote access to those hosts requires the VPN. This includes SSH and VNC connections.
Read our Tier 3 linux VPN guide for how to connect to the VPN.

The easiest way to run X11 applications at home, and the method we recommend, is to use SSH forwarding to forward X11 applications to your local X server. To do this, you will need two applications -- an X server, and an SSH terminal application.

X11 Servers


  • X-Win32 - Most commonly used X server for windows, fairly priced with an educational discount.
  • Exceed - Another popular X server, stable, full featured, and equipped with many extra tools.
  • Cygwin/XFree86 - Free, though the Windows port of XFree86 is still very much in development, and does not run properly on many configurations. Also required is a decent understanding of UNIX and setting up XFree86. Still, for free you can always give it a try.
  • XLive - a free, Cygwin-based X server conventiently packaged onto a CD. It can be installed to the hard drive or run from the CD without requiring installation. This is a good choice for nontechnical users.


  • XFree86 - Probably came with your distribution. XFree86 is the most common implementation of X found on Linux and the various BSD distributions. It is fast, stable, and free.


  • For OS X version 10.7 (Lion) and older: X11 is included on the os cds Then simply ssh to the host example:
    ssh -X  
  • For OS X version 10.8 (Mountain Lion) and up: First you must download and install XQuartz, an Apple supported community X11 server for OS X. Available at

    After you install XQuartz you just need to log out and back in or restart you computer. Then you can SSH with X11 forwarding using the ssh -X flag, for example:
    ssh -X

SSH Software

Linux, Mac OSX, and other *NIX variations typically come with variations of SSH. If not, you may need to install a version such as OpenSSH.

See our Shell/SSH Access page for more information on SSH clients for other operating systems.

Setting up X11 Forwarding

Many, but not all SSH clients currently available support X11 Forwarding, and general port forwarding. This allows network traffic to be forwarded from the remote machine to your local box through SSH. The result is that with very little configuration, this traffic is forwarded to your machine, encrypted in an SSH "tunnel".

There are several reasons this is a preferred method to run X11 applications remotely:

  • Most importantly, the transmission is secure. Any data, passwords, etc. is encrypted within the SSH tunnel.
  • Setup is easy. In most situations, all you need to do is have your X server running. There is no need to modify permissions for foreign hosts, and no need to set your DISPLAY variable. SSH does it all for you.
  • With SSH compression turned on, it can actually be faster to use SSH than not on low bandwidth connections.

To set up SSH port forwarding, you simply need to enable that option in your client. We outline a few examples below for common clients:

NOTE: We recommend against using any SSH program that does not support SSH version 2. PuTTY, MacSSH, and OpenSSH support both SSH2 and port forwarding.


  1. Set up a new session or load an existing one, and set all the appropriate settings you desire.
  2. Go to Connection -> SSH -> Tunnels.
  3. Make sure the checkbox "Enable X11 Forwarding" is checked. The box below it should read "localhost:0". If you are forwarding to your local machine (most likely) this is fine.
  4. Return to Session, the opening settings window.
  5. Type in the name of your session, and click "Save".


  1. Go to the menu item Favorites -> Edit Favorites.
  2. Either create a "New" entry, or select an existing one and click "Edit".
  3. Enter the hostname and any other desired information.
  4. Go to the "SSH2" tab.
  5. Make sure the checkbox "Forward X11" is checked.
  6. Save your favorite by clicking "OK".

OpenSSH or the commercial SSH Client

X11 forwarding is typically turned on by default in most *NIX distributions of SSH. If it is not, you can enable it by calling SSH with the "-X" option. For example:

% ssh -X

You can also change this option in the SSH configuration files. Please refer to the SSH documentation for more.

NOTE: The -X flag has changed in OpenSSH 3.8 and later, X11 forwarding is performed in a way that applications run as untrusted clients by default. Some applications may not function properly when run as untrusted clients. To forward X11 so that applications are run as trusted clients, invoke ssh with the -Y flag instead of the -X flag, or set ForwardX11Trusted in the ~/.ssh/config file.

Running your Application

This is the best part! First, start your X Server if it isn't running already. To run the X application you want, simply SSH in to the machine you desire, and run the program. The program should display on your screen, probably after some delay as it loads.


Note that X11 requires a lot of network traffic. Firefox, for example, can take several minutes simply to start and display your home page on slow connections. But some applications are fairly reasonable, especially on a broadband connection such as DSL or Cable. Feel free to experiment with various settings. Many X servers support options that will speed up performance over low bandwidth connections such as caching data, or not refreshing windows that aren't in focus. Turning on compression in your SSH client can also help in some situations.

If you run into problems, you may need to search the web for other options. If you find something useful, feel free to e-mail us at, and we will be glad to add it here.
Last Updated ( Saturday, 31 December 2016 )

©1999 - 2017 TheCAT