Tested on: Ubuntu 9.10 (Karmic Koala)
Ubuntu has a Remote Desktop server (Vino), which can be easily configured. But personally I found it to be too slow (even on 100Mbps connection) and there is no option to get it up & running before actual GDM login. One of the faster alternatives is x11vnc. It allows one to view remotely and interact with real X displays with any VNC viewer. Following are the steps to enable x11vnc immediately after GDM (or XDM, KDM etc) loads. We will be effectively using XDMCP over VNC.
17 Jan, 2010: [debug] changed to [daemon], as it makes more sense according to GDM manuals.
18 Jan, 2010: Added FAQ link in step 5.
Ubuntu has a Remote Desktop server (Vino), which can be easily configured. But personally I found it to be too slow (even on 100Mbps connection) and there is no option to get it up & running before actual GDM login. One of the faster alternatives is x11vnc. It allows one to view remotely and interact with real X displays with any VNC viewer. Following are the steps to enable x11vnc immediately after GDM (or XDM, KDM etc) loads. We will be effectively using XDMCP over VNC.
- Enable XDMCP
- Older Ubuntu version: System->Administration->Login Screen Setup-> Tab XDMCP->Enable XDMCP. You can disable "Honor Indirect Requests".
- Karmic Koala: There is no XDMCP Tab in settings. So add "Enable=true" in [xdmcp] section of /etc/gdm/custom.conf (or gdm.conf for older version of GDM). Check here for detailed instructions.
- For others, just look through the settings and find XDMCP, make sure it's enabled.
- Disable Desktop Sharing with Vino under System -> Preferences -> Remote Desktop. Install x11vnc from repository.
- Create password for VNC
sudo x11vnc -storepasswd yourpasswordhere /etc/x11vnc.pass
- Configure GDM to run x11vnc when it loads:
sudo nano /etc/gdm/Init/Default
& add this line to the file just before exit 0:/usr/bin/x11vnc -nap -bg -many -repeat -clear_keys -rfbauth /etc/x11vnc.pass -rfbport 5900
- Edit gdm configuration to make sure that x11vnc is not killed after being started.
sudo nano /etc/gdm/custom.conf
Add / edit KillInitClients option in the [daemon] section to:KillInitClients=false
Also check this FAQ for recent changes and other workarounds in x11vnc regarding KillInitClients. - Restart gdm (you can just reboot), and you are good to go.
- x11vnc does NOT have any options for locking the server machine's display on connection with client. If this is an important security issue then other vnc servers like vino, tightvnc etc should be used. Refer comments for more details.
- You may experience endless key repetition / key pressing when logged from a client. Use "-repeat" options with x11vnc to check this behavior. Check this discussion for other alternatives.
- I experience initial delay (about 6-7 secs) in response from x11vnc whenever I try to make a new connection. Though, it responds nicely after initial glitch.
17 Jan, 2010: [debug] changed to [daemon], as it makes more sense according to GDM manuals.
18 Jan, 2010: Added FAQ link in step 5.