User Tools

Site Tools


wiki:unix:ssh:xforwarding

Table of Contents

X-Forwarding


What is X

X is a system on Linux that manages the display of Graphical Software. On most versions of Linux, when you start up in graphical mode (as opposed to Command-Line Interface), it will use X.

X is a very flexible system, as it can not only show local applications, but also applications running on another computer. This means that you can start software on another computer, but use it locally.

This is called X-Forwarding, as you are forwarding the X-data to another computer and show it there.

You can easily enable X-Forwarding on Linux and on Mac using SSH. On Mac you may need to install XCode first.


How to use

Connect to the remote computer using SSH, but add option -X.

ssh $username@$server -X

Then launch your favorite GUI application

gedit &

The & is so you can keep working in the same terminal. However, many applications will output messages to your terminal, so it's often more practical to use another terminal window for command line editing.

If you find that response is slow, you can try to enable Compression. Reconnect with an extra option -C:

ssh $username@$server -XC
wiki/unix/ssh/xforwarding.txt · Last modified: 2013/02/12 12:34 by bouke