theCAT
  
Report a Problem:
Email: support@cat.pdx.edu
Phone: 503-725-5420
  USERS PLATFORMS SYSTEM RESOURCES    
Home Students Fac/Staff CS Tutors Guidelines Windows Linux Unix Mac Mail Network Software Web TheCAT Sitemap
arrowHome arrow Linux arrow Remote Access arrow Remote X/GUI Wednesday, 03 December 2008  
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:

http://web.archive.org/web/20030712212513/http://fusion.gat.com/docview/understanding_x.html

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

Windows

  • 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.

Linux/*BSD

  • 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.

Mac OSX

  • For OS X version 3 (panther) and up X11 is included on the os cds

Mac OS Classic

  • eXodus - Same as above, however the SSH tool does not function.

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 you 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. We will be switching to version 2 exclusively in the future due to security flaws in version 1. Recent versions of PuTTY, MacSSH, and OpenSSH support both SSH2 and port forwarding.

PuTTY

  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".

MacSSH

  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 username@unix.ece.pdx.edu

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.

Speed

Note that X11 requires a lot of network traffic. You can not realistically run large, graphics intensive applications over a 56K modem. Netscape, for example, can take up to 10 minutes simply to start and display your home page. No exaggeration. 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.

Fonts

You may run into some applications that require additional fonts to run properly. The Mentor Tools are a common example. Even though it is possible to get dmgr to run with font substitution, it's not very useful when you can't tell what button goes where.

StarNet, the makers of X-Win32, provide some extra fonts for tools including Mentor on their site:

http://www.starnet.com/support/extrafonts.htm

These fonts are intended for X-Win32, but many have used them with other OSes and X servers as well. 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 support@cat.pdx.edu, and we will be glad to add it here.

Last Updated ( Monday, 01 October 2007 )
EB Stairs
EB Stairs
Upcoming Events
There are no upcoming events currently scheduled.
View Full Calendar

©1999 - 2008 TheCAT