HOWTO: Setting up a VNC to GDM connection

This howto is to show how to setup VNC to show a GDM login screen when you connect to your Ubuntu box, effectively using XDMCP over VNC. A VNC client is easier to get going on Windows than a X server for most people, so here’s how to use it to connect to your linux box.

First thing you’ll need to do is enable the universe repositories: https://wiki.ubuntu.com//AddingRepositoriesHowto

Then it’s just six easy steps:

1. System->Administration->Login Screen Setup

Tab Security->Enable XDMCP

Tab XDMCP–> You can disable “Honor Indirect Requests”

For kdm or even xdm, just look through the settings and find XDMCP, make sure it’s enabled.

For Intel chipsets

2a.

file.pngCode:
sudo apt-get install vnc4server xinetd

(comes from universe)

For AMD64 chipsets

2b.

file.pngCode:
sudo apt-get install vncserver xinetd

(comes from universe)

3. Now do the following:

file.pngCode:
sudo gedit /etc/services

Put the following line at the end:

file.png File:/etc/services
vnc800 5900/tcp # VNC & GDM vnc1024 5901/tcp # VNC & GDM

4. Now do the following:

file.pngCode:
sudo gedit /etc/xinetd.conf

and add the following lines to the file that opens up:

file.png File:/etc/xinetd.conf
service vnc800 { disable = no socket_type = stream protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd :1 -broadcast -geometry 800×600 -depth 16 -once -fp /usr/share/X11/fonts/misc unix/:7100 -securitytypes=none } service vnc1024 { disable = no socket_type = stream protocol = tcp wait = no user = nobody server = /usr/bin/Xvnc server_args = -inetd :1 -broadcast -geometry 1024×768 -depth 16 -once -fp /usr/share/X11/fonts/misc unix/:7100 -securitytypes=none }

5. Now the following step:

file.pngCode:
sudo /etc/init.d/xinetd restart

6. Restart your computer!

That’s it! Try connecting from another machine using and see how it goes.

If you need a VNC client for Windows, try out UltraVNC http://ultravnc.sf.net it’s the one I prefer.

For connecting from Linux vnc4viewer with tsclient work well.