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

Is it possible for me to SSH to another server in Linux (Ubuntu), run a program there but display it locally?

And is it possible for me to SSH to another server in my terminal, and configure it so that all graphical programs (Firefox, Emacs) run in that SSH session will be displayed locally?

share|improve this question
up vote 18 down vote accepted

By adding the "-Y" flag to the ssh command, the display will automatically be redirected to your local computer.

ssh -Y <remoteip>

Then, if you start Firefox (or any other X application) in that ssh session, it will be displayed locally. (If you have a xserver running locally of course)

share|improve this answer
Very clever. I have used ssh for years & never knew that existed. – DaveParillo Mar 29 '10 at 6:47
I will use -X since this way forwarding is subjected to X11 SECURITY. But if you trust the remote machine then you can use -Y. – criziot Jul 12 '12 at 11:34

You are looking to do remote X. This is a good mini HOWTO.

share|improve this answer

You might also want to try this:

ssh <hostname> -X <program-name or its full path>
share|improve this answer

Use can also use compression when using X-forwarding:

share|improve this answer

You must log in to answer this question.

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