RCS::Intro Linux and HPC::Editors


Page Contents:




About this document

Page Group







X-Windows

Aka X11

1. 

What It Is

2. 

What Does It Do?

3. 

Old School Example

We can make clear how X-Windows works an old-school — pre-SSH tunnelling — example. To emphasise, this method of using X-Windows has been superceded; it is included here only to make explicit how X-Windows works.

We assume the remote system is man2e.nw-grid.ac.uk and that the local desktop is doolittle.rcs.manchester.ac.uk. On the local desktop, assuming you have an X-server running, then

  desktop> xhost +man2e.nw-grid.ac.uk
      # ...give permission for Man2e's X-server to talk to your desktop X-server...
i.e., give permission for Man2e's X-server to talk to your desktop X-server. On the remote machine,
  man2e> xclock -display doolittle.rcs.manchester.ac.uk:0
This tells Man2e to display the programme — a simple clock — on your local desktop.

In practice, with this old-school method, there are additional hurdles to overcome. Is your local X-server configured to accept remote connections? Will the firewalls on both the remote system and your local system permit required connections? For these reasons, and also for better security, X-Windows is almost always tunnelled through an SSH connection — meaning that:

4. 

Tunnelling X11 through SSH

This is simpler than it may sound!

Let us repeat the above example, but using SSH tunnelling. On your local system, you have only to ensure that you have an X-server running. Then

  desktop> ssh -X username@man2e.nw-grid.ac.uk
      # ...note the "-X" (uppercase X)...
then on the remote system, simply type
  man2e> xclock
      # ..."-display ... ..." is not required...
That's it — the clock appears on your local desktop.

Using Compression

  desktop> ssh -X -C username@man2e.nw-grid.ac.uk

5. 

With a Linux Desktop

All common distributions of Linux (including RedHat/Fedora, SuSE and Ubuntu) start an X-Windows-based desktop (e.g., KDE or GNOME), i.e., an X-server is started by default.

6. 

With an OS-X Desktop

OS-X comes with an implementation of X11 ready-installed. Simply start this to enable the functionality described above.

7. 

With a Microsoft Desktop

Microsoft Windows does not come with an implementation of X-Windows, but MS-ready implementations are readily available and some are listed below. We also provide links to some tutorials describing how to use SSH-tunnelling with X-Windows with Microsoft Windows.

7.1. 

X-Servers for MS Windows

7.2. 

Running X-Windows Apps on MS Windows