XDMCP + Ubuntu = Thin Client

July 3rd, 2006

With X Display Manager Control Protocol (XDMCP) and Ubuntu one is able to set up a thin client with very little effort. This is a great way to make use of an older computer that doesn’t quite have the processing power needed to run a smooth system by itself. In my case the computer my wife generally uses was not performing as well as she would like and I did not feel like shelling out the extra money for a new computer that would only be used for ocasional web browsing, word processing, and gimp usage. XDMCP provided an easy and cheap solution.

For this example I will assume that Ubuntu is installed on both computers and that the server may be denoted by the hostname xdmcpserever.

To start off first enable XDMCP on the host computer by editing the gdm.conf-custom file

sudo vim /etc/gdm/gdm.conf-custom

Make sure that it contains the following section.

[xdmcp]
Enable=true

If you want the remote login screen to be the same as the graphical greeter that is the default in the Ubuntu install make sure that the following is present.

[daemon]
RemoteGreeter=/usr/lib/gdm/gdmgreeter

Now one is able to log in via the default gdm greeter on the client systems if so desired, but in my case I wanted the client to automatically boot to the login screen for the server. The process is actually quite simply. First a script to launch the daemon for the new XDMCP login must be created.

sudo vim /etc/init.d/xdmcp

In this file place the following script [download here].

#! /bin/sh
# Launchs XDMCP

set -e

PATH=/sbin:/bin:/usr/sbin:/usr/bin
PIDFILE=/var/run/xdmcp.pid
XDMCPSERVER=xdmcpserver

. /lib/lsb/init-functions

case “$1″ in
start)
if pidof usplash > /dev/null; then
/etc/init.d/usplash start
fi
log_begin_msg “Starting XDMCP…”
start-stop-daemon –start –quiet –pidfile $PIDFILE –name xdmcp –exec /usr/bin/X — -query $XDMCPSERVER > /dev/null || log_end_msg 1
log_end_msg 0
;;
stop)
log_begin_msg “Stopping XDMCP…”
start-stop-daemon –stop –quiet –pidfile $PIDFILE –name xdmcp /usr/bin/X — query $XDMCPSERVER –retry 30
log_end_msg 0
;;
restart)
$0 stop || true
$0 start
;;
*)
log_success_msg “Usage: /etc/init.d/xdmcp {start|stop|restart}”
exit 1
;;
esac

exit 0

The next step is to set the executable bit on this script with

sudo chmod +x /etc/init.d/xdmcp

The way I chose to have the system run the script on startup is by simply replacing the gdm startup script in the default runlevel with our new xdmcp startup script.

sudo rm /etc/rc2.d/S13gdm

sudo ln -s /etc/init.d/xdmcp /etc/rc.2/S99xdmcp

Now when we restart the client we will be presented with a login screen being served from our xdmcp server.

Entry Filed under: Ubuntu

2 Comments Add your own

  • 1. Ubuntu e xdmcp como thinc&hellip  |  May 22nd, 2009 at 2:17 pm

    […] ReferĂȘncia: XDMCP + Ubuntu = Thin Client. DisponĂ­vel em: http://stochasticflux.com/blog/?p=4. Acessado em 22 de Maio de 2009. Compartilhe […]

  • 2. jose oliveira  |  September 25th, 2009 at 8:10 pm

    muito bom

    andava a procura de um tutorial simples que funciona-se e o seu funcionou perfeitamente

Leave a Comment

hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2010
M T W T F S S
« Aug    
1234567
891011121314
15161718192021
22232425262728

Most Recent Posts