Step by Step on how to connect to coLinux using VNC with XDM authentication

Author: James McDonald
Last Updated: 4/11/105

I am using coLinux on a Windows XP Pro box with Debian installed.

After doing these changes you will be able to connect by one of the following methods

VNC

vncviewer <colinux_ip>                    # 800x600 tcp/5900
vncviewer <colinux_ip>:1                 # 1024 x 768 tcp/5901

Cygwin

XWin.exe :1 -screen 0 800x600 -query <colinux_ip>                                    # 800x600
XWin.exe :2 -screen 0 1024x768 -query <colinux_ip>                                  # 1024 x 768

Configuration

NOTE: I don't cover making it secure in these instructions

If you haven't already got X and KDE installed run these commands
apt-get install x-window-system-core
apt-get install kdebase                                                                                      # run `apt-get install kde' for everything

edit /etc/X11/xdm/Xservers and comment out all the server entries
coLinux will crash if it tries to launch a local X server and this stops that behaviour
# :0 local /usr/X11R6/bin/X :0 vt9 -bpp 16
# :1 local /usr/X11R6/bin/X :1 vt10 -bpp 8
# :0 local /usr/X11R6/bin/X vt7 -dpi 100 -nolisten tcp
# :0 local /usr/X11R6/bin/Xvnc -geometry 800x600 -depth 16

In some of the other instructions it says to put the value "null" into /etc/X11/default-display-manager
however if you do the above step this is uneeded.

edit /etc/X11/xdm/Xaccess and uncomment the following line
#*                                                         #any host can get a login window
so it is like this
*                                                           #any host can get a login window

edit /etc/X11/xdm/xdm-config and set "DisplayManager.requestPort" to 177
DisplayManager.requestPort:                         177

edit /etc/inetd.conf and add the following (each entry must be on a single line)
Note: You may wish to reduce the `-depth' parameter  to 8 or 16 bits for slow connections. I use 24 because I want good resolution and connect at LAN speeds
#:OTHER: Other services
vnc-800x600 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/Xvnc :1 -inetd -query localhost -geometry 800x600 -depth 24 -once
# securitytypes=none this only needed on readhat systems
vnc-1024x768 stream tcp nowait nobody /usr/sbin/tcpd /usr/bin/Xvnc :2 -inetd -query localhost -geometry 1024x768 -depth 24 -once

edit /etc/services and add entries for the new services
# Local services
vnc-800x600 5900/tcp
vnc-1024x768 5901/tcp

Make sure that xdm is configured to start when the system boots.
update-rc.d xdm defaults

Reboot coLinux