LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Remote control an X application - just occasionally (https://www.linuxquestions.org/questions/linux-newbie-8/remote-control-an-x-application-just-occasionally-728333/)

tickling 05-25-2009 05:30 AM

Remote control an X application - just occasionally
 
Hello

newbie here, so far this linux world seems too good to be true - until now... please help :)

I have an ubuntu server that I want to control from remote, from ubuntu desktop or XP.

Occasionally I need to run an application on that server that has a X-based GUI. I managed to launch it via

ssh -X

using X11 forwarding. The app is running on the server, and its UI shows on the desktop.



However if I turn off/restart the remote machine, the app terminates. As it takes a long time, I would like to be able to:

= launch it from remote when needed, giving its GUI some parameters:
= leave it running even if the remote machine disconnected:
= reconnect again and have a look at its GUI, perhaps from another computer/operating system


Asking too much here ? ....

Thanks

tredegar 05-25-2009 05:41 AM

Quote:

Asking too much here ? ....
Nope :)

You need to start a vncserver on your ubuntu machine.

On my server I put this line in /etc/rc.local just before the final exit 0
Code:

su - tred -c " cd /home/tred && vncserver :1 -geometry 1024x768 -depth 24"
This is run as root at boot time. It starts a vncserver on display :2 as my username (tred)

It runs all the time.

I can connect to it from my lan with

Code:

vncviewer servername:2
or
Code:

vncviewer IP.OF.MY.SERVER:2
When I close that vncviewer window the server is left running, and I can reconnect at any time, with my remote desktop exactly as I left it. It's very useful.

vncviewer is also available for the windows platform.

On my 'buntu box, I have the following installed:

vnc4-common
vnc4server
xvnc4viewer

tickling 05-25-2009 07:16 AM

Thanks much ! Exactly what I was hoping for ... this linux world is a giant candy store for free


All times are GMT -5. The time now is 03:20 AM.