Ok, to resume a session you started on your physical display (display :0) all you really need is to turn on Ubuntu's remote desktop feature using the Remote Desktop Preferences dialog box accessible from System->Preferences->Remote Desktop menu item. Just check the first two options there (allow other users to view your desktop and allow other users to control your desktop) and set the password in the bottom of the dialog box (check the REuqire password option), and you're done !
The above uses the built in VNC capability that Ubuntu comes installed with, but the drawback is that it's a little slow, and you need to enable it for each user which wants to allow his desktop to be view or controlled remotely. Also this doesn't allow remote VNC clients to log in to GDM, only to view a GDM session that was started by someone actually using the physical display. So if currently no one is logged in, a remote user cannot connect to display :0 and start a new session.
But don't worry - there is a better way which allows you to view the phyical display remotely and also log-in to a new session from GDM (using a remote VNC client) ! And it works faster (as fast as the regular VNC server), and works for all users. Here's how to do that :
1. Install x11vnc package
Code:
sudo apt-get install x11vnc
2. Add x11vnc service to xinetd:
Code:
sudo gedit /etc/xinetd.d/x11vnc
Enter this into the new file:
Code:
service x11vnc
{
port = 5900
type = UNLISTED
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -auth /var/lib/gdm/:0.Xauth -many -bg
disable = no
}
3. Restart xinetd (usually there is no need to reboot, but occasionally it might be required)
Code:
sudo /etc/init.d/xinetd stop
sudo killall Xvnc
sudo killall x11vnc
sudo /etc/init.d/xinetd start
4. From a remote machine use your VNC client to connect to display :0
Code:
vncviewer vnchost:0
Note that after loggging from GDM and also after logging out from the X-session back and going back to GDM, the VNC client gets disconnected for some reason. So you just need to re-connect and you will get back into the session you logged into. When logging out, the disconnect happens when gnome asks you to confirm your intention to log out, so it's best to turn off the log-out confirmation dialog box by going to System->Preferences->Sessions and un-checking the "ask on logout" option.
Please tell me how this works out for you....I plan to add this to the HOWTO
Bookmarks