Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to display GUI apps running on one Linux box on another machine.

I already do this with local machines, but how to do this over the internet?

Update: I'm already using ssh to access the machine over the internet.

share|improve this question
up vote 4 down vote accepted

As you stated that you are already doing this with local machines, I assume you already know about using ssh -X. One addition might be to use the -C parameter for enabling compression.

In order to use this over the Internet, you just need to make sure your other machine is accessible - i.e. you need to know the IP or hostname (in case of a dynamic IP, you can use a dynamic DNS provider like and make sure the SSH port (can be different from 22) is accessible from the outside.

For a typical "home" server, you would most likely need to set up port forwarding at the router to have the SSH request forwarded to your server.

share|improve this answer
Thanks @BennyB I didn't know about -x. I'm using putty which has an X11 forwarding option, I'll make use of that instead. I didn't realise that the option was already set in putty for me for local machines. – Craig Sep 9 '11 at 9:48
@Craig: Upper/lowercase is significant! ssh -x does the COMPLETE OPPOSITE (disables X forwarding) of ssh -X (which enables X forwarding) – Piskvor Sep 9 '11 at 10:46
@Piskvor Thanks for that! – Craig Sep 9 '11 at 12:43

You need to login to the remote machine with X11 forwarding.

You can do this by using the -X parameter when you login

ssh -X user@server

Once logged in, run any X program on server and that program's window will appear on your local machine. It doesn't matter if server is a machine on the local network or a machine on the other side of the world accessed over the Internet

ssh man will give you a little more information on the -X switch:

 -X      Enables X11 forwarding.  This can also be specified on a per-host
         basis in a configuration file.

         X11 forwarding should be enabled with caution.  Users with the
         ability to bypass file permissions on the remote host (for the
         user's X authorization database) can access the local X11 display
         through the forwarded connection.  An attacker may then be able
         to perform activities such as keystroke monitoring.

         For this reason, X11 forwarding is subjected to X11 SECURITY
         extension restrictions by default.  Please refer to the ssh -Y
         option and the ForwardX11Trusted directive in ssh_config(5) for
         more information.
share|improve this answer

You might also want to look into FreeNX: :)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .