0

I've got applications on my host machine running fine by doing:

$ssh -X user@host
Welcome to host
$firefox

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.

cdated
  • 199
  • 1
  • 1
  • 9

2 Answers2

1

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)

  • 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
1

[This is really a superuser.com 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).

alanc
  • 1,500
  • 9
  • 12
  • 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 left the building Jun 16 '10 at 07: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