Cogs and Levers A blog full of technical stuff

Running X11 applications with port forwarding

Today’s post is a quick tip on X11 port forwarding, and how to use it to run X11 applications remotely.

The setup

Your remote computer, the one that will actually run the application needs openssh installed. Use your favorite package manager to get that installed. You then need to edit your sshd configuration file to allow X11 port forwarding.

sudo emacs /etc/ssh/sshd_config

You need to make two edits to this file:

X11Forwarding     yes
X11UseLocalhost   no

Restart the ssh daemon.

Running

From your client computer now, connect to your remote host and run any X11 application that you want. It’ll appear on your client machine.

ssh -XC user@host
/usr/bin/firefox