Server Fault is a question and answer site for system and network administrators. 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've got applications on my host machine running fine by doing:

$ssh -X user@host
Welcome to host

Firefox proceeds to run in client display from the host machine.

How do I get firefox to load on the host machine's display so I could remotely manage the host machine's running GUI applications? I need my application to load a GUI on a remote machine without walking to that machine or expecting the user to launch it.

EDIT: Firefox is just an example app, but I am using one machine to launch several trainer programs on remote machines. Each remote machine will be controlled by a different person.

share|improve this question

migrated from Jun 10 '10 at 12:22

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

[This is really a question, since there's no programming involved.]

The -X flag to ssh is specifically for sending the display back to the machine you ssh'ed from. To display on the machine you're ssh'ed to, instead you'd set the DISPLAY environment variable to that machines display (probably ":0" but may vary depending on configuration, virtual terminals, etc.), and make sure you have the right authentication set up to talk to that display (see the Xsecurity man page for details).

share|improve this answer
I was able to get what I needed by running: --> $ export DISPLAY=:0; $ xhost local:my_username; --> On one of my machines I had to set the DISPLAY=:2 – cdated Jun 10 '10 at 14:48
@cdated you can just do $ DISPLAY=:0 xhost local:my_username in one line if you just have a single command you wish to use the DISPLAY variable for. – Dan Jun 10 '10 at 20:17
@cdated: "I need my application to load a GUI on a remote machine" - if the GUI should be visible both on the local and remote machine, X forwarding won't do that; what it does is show the GUI of the remote application only on the local display. – Piskvor Jun 16 '10 at 7:03
@Piskvor: That's fine, I suppose I wasn't clear. Launching on a server through an ssh session, and gui on a client. The app can be administered through remote shell even as a separate process so only client GUI is necessary. – cdated Jun 24 '10 at 12:47

If you want the application GUI to be visible both on the local and remote machine, then VNC (plus ssh port forwarding) is the solution you're looking for - try x11vnc or vino. (If you only need the remote application's GUI on local display, then X forwarding is the solution, as outlined in the other answer)

share|improve this answer
This would be fine, but I only want/need to send on application GUI not an entire desktop. Also, I am using one machine terminal to control several application launches at once, which all need independent control over the display application. – cdated Jun 10 '10 at 14:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.