Remote execution of a program
Jay Daniels
tux at myt60.net
Sat Sep 12 19:29:56 UTC 2009
On Sat, 2009-09-12 at 08:57 +0200, Nils Kassube wrote:
> Keith Clark wrote:
> > How can I log into another computer via ssh, start a gui application,
> > then log out and leave it running on the remote computer. Is this
> > even possible?
>
> If you want to start a GUI application on the remote machine, the first
> thing you need is a running X server to display the GUI and you must be
> the owner of the display. Then you could simply start your application
> at startup of the X session and you don't need to start it remotely.
>
> However you may need to start it remotely anyway, if the program died
> for some reason. That can be done with a command like this:
>
> nohup sh -c 'DISPLAY=:0.0 xeyes' <&- >&- 2>&- &
>
> The "DISPLAY=:0.0" part tells the program to start on the remote machine
> instead of your local machine. The redirections <&- >&- 2>&- are not
> really necessary but if you use them you can logout without a problem.
> Otherwise ssh will probably wait until these files are closed by the
> application.
>
>
> Nils
>
I think this is his answer to the problem. You definitely have to
specify which DISPLAY
jay
More information about the ubuntu-users
mailing list