Inhaltsverzeichnis

Howto set up a Thin Client with Linux

Abstract

This page descibes installation and setup of a thin client as a diskless worsation and the appropriate application server.

The server runs Slackware Linux version 11.0 on an AMD Duron(?), 1.1 GHz, 256 MB RAM.

For the client side the Linux Terminal Server Project version 4.2 is used.

Client hardware is an eTC from www.epatec.de . This was the cheapest I could get. The detailed desciption about LTSP and eTC I found in the german magazine „Linux intern 1/07“ from Data Becker on page 140ff.
/

Installing LTSP on the server

Install ltsp-utils

According to Installation of LTSP download ltsp-utils for Slack and install with installpkg This gives:

Linux Terminal Server Project utilities - ltsp-utils 0.25-0. This package includes the following utilities for LTSP server:

running ltspadmin gives hints for missing perl modules (LWP):

Install missing Perl modules

You can install perl modules with perl -MCPAN -e shell as root. See also man CPAN. Setup questions will emerge, to select the autoconfigure option is the easiest way here. It gave me (among ohter things):

/usr/lib/perl5/5.8.8/CPAN/Config.pm initialized
Note: you can revisit this dialog anytime later by typing 'o conf init' at the cpan prompt.

After setup finished, I issued the following commands at the CPAN promt:

After that, ltspadmin worked.

Note: If you don't want to bother with the CPAN command line tool, www.webmin.com might be another option for you.

Install the LTSP client packages

Install the LTSP client packages by running ltspadmin → „Configure the installer options“ and follow the instructions in the extensive manual. I had a CD with the LTSP binares, so my only modification was:

Where to retrieve packages from?
[http://ltsp.mirrors.tds.net/pub/ltsp/ltsp-4.2/] file:///mnt/dvd/li/ltsp/

The LTSP client tree goes to /opt/ltsp. Then select „Install/Update LTSP Packages“ → „Use 'A' to select ALL components“

Configure LTSP

ltspcfg → „S - Show the status of all services“ gives:

Interface IP Address      Netmask         Network         Broadcast        Used 
eth0      192.168.0.1     255.255.255.0   192.168.0.0     192.168.0.255   <-----

Service    Installed   Enabled   Running   Notes                                
dhcpd      Yes         no        no        Version 3
tftpd      Yes         no        no        No '-s' flag
portmapper Yes         no        no        
nfs        Yes         Yes       no        
xdmcp      Yes         no        Yes       xdm, kdm   Using: kdm

File                                Configured  Notes                           
/etc/hosts                          no          
/etc/hosts.allow                    no          
/etc/exports                        no          
/opt/ltsp/i386/etc/lts.conf         Yes         

Configured runlevel: 4         (value of initdefault in /etc/inittab)
   Current runlevel: 4         (output of the 'runlevel' command)

The task is now to get all services into state running. You cann issue this command again after each configuration step. But take care to restart ltspcfg otherwise output might not be updated.

Configure DHCPD

Save origial config file: root@ilse:/etc# cp dhcpd.conf dhcpd.conf.org (on a different console)

root@ilse:~# ltspcfg → C - Configure the services manually → 3 - DHCP configuration generates /etc/dhcpd.conf.sample for you. Move this over with root@ilse:/etc# mv dhcpd.conf.sample dhcpd.conf

dhcpd.conf has to be tweaked manually, because the Inetd expects all pathes relative to the TFTP root and the revision might also be corrected. For example change the generated dhcpd.conf

subnet 192.168.0.0 netmask 255.255.255.0 {
    range   192.168.0.100   192.168.0.199;
    if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
        filename "/tftpboot/lts/2.6.16.1-ltsp-1/pxelinux.0";
    }
    else{
        filename "/tftpboot/lts/vmlinuz-2.6.16.1-ltsp-1";
    }
}

to: (see also Linux intern 1/07 page 138)

subnet 192.168.0.0 netmask 255.255.255.0 {
    range   192.168.0.100   192.168.0.199;
    if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
        filename "/lts/2.6.17.3-ltsp-1/pxelinux.0"; # FIX HERE!
    }
    else{
        filename "/lts/vmlinuz-2.6.17.3-ltsp-1";    # FIX HERE!
    }
}

Enabling the dhcpd daemon with ltspcfg fails because the tool only knows System V init scripts ⇒ append the command dhcpd to /etc/rc.d/rc.local to start it automatically at next boot. Additioanlly to start dhcpd right now, issue dhcpd as root at the command line.

Adjust option domain-name „your_domain.org“ to your real network name (usually „local“ or what hostname -f prints out) in /etc/dhcpd.conf!

Configure TFTP

Slack starts tftpd at boot if /etc/rc.d/rc.inetd is runnable. Make it runnable with /etc/rc.d# chmod +x rc.inetd. Start inetd with /etc/rc.d/rc.inetd start. Check if it is running with /etc/rc.d# ps aux | grep inetd: It should appear a line containing /usr/sbin/inetd. Optionally check with ltspcfg if tftp is enabled

Note: For security reasons, you can/should comment out every other service in rc.inetd

Configure nfs and portmapper

tftpd can't start neighter nfs nor portmap on slack. Make /etc/rc.d/rc.rpc and /etc/rc.d/rc.nfsd runnable.

Save origial nfs exports file: cp /etc/exports /etc/exports.org. nfsd won't start with an empty exports file. Therfore generate an exports file with „ltspcfg → 10 - Create /etc/exports entries“ first.

Start portmapper with # /etc/rc.d/rc.rpc start and nfs with # /etc/rc.d/rc.nfsd start. Resart ltspcfg again and select S - Show the status of all services to check if both serices are running.

Note: It seems that nfsd starts the pormapper automatically, but making the portmapper file rc.rcp runnable won't hurt & you are on the save side.

XDMCP Configuration

See kdm to enable in kdm manually.

FIXME Test how ltspcfg does this!

/etc/hosts /etc/hosts.allow

Running corresponding setup entries in ltspcfg modifies both files and saves the original version with the .sv1 extension.

Ajust hosts file afterwards: ltspcfg…

lts.conf

Do you want to create a default lts.conf file (y/n) ? y
Finished adding /opt/ltsp/i386/etc/lts.conf entries.
Thats all!

Client Configuration

Because the client doesn't need a hard disk and fetches everything from the server, also the client configuration is done by editing files on the server, namely /opt/ltsp/i386/etc/lts.conf. Because I have only one thin client, I have only the [default]] section in lts.conf. If you have more and different clients you must have more sections.

Keyboard

For a german keyboard, you have to add this to lts.conf

    XkbModel           = 105        # German keyboards have 105 keys
    XkbLayout          = de         # German keyboard layout

Mouse

To enable a PS/2 add/modify the following lines in lts.conf Source: manual -> wheel mouse

    X_MOUSE_PROTOCOL   = "IMPS/2" # "auto" also works here
    X_MOUSE_BUTTONS    = 5
    X_ZAxisMapping     = "4 5"

Note that this differs from config in Slack!

Printer Setup

Initial situation

Client Configuration

Add the following to to lts.conf on your application server:

    PRINTER_0_DEVICE = /dev/lp0
    PRINTER_0_TYPE   = P 

Server Configuration

Check which IP address your thin client gets assigned by looking a line like DHCPACK on 192.168.0.199 at /var/log/messages. This means that your thin client has the ip address 192.168.0.199. :?: Any better idea how to figure this out?

With Cups: Point your browser to the cups configuration page of your server, i.e. http://localhost:631 and add a „JetDirect printer“, eg. socket:192.168.0.199:9100 .

With turboprint: FIXME

FIXME How to handle varying IP-Addresses or more than one client?