Gentoo - LTSP Guide Heinrich Wendel Josiah Ritchie Sven Vermeulen This guide shows you how to setup a LTSP Server with Gentoo. 1.6 August 20, 2004 Introduction
What is LTSP?

LTSP is an abbreviation for "Linux Terminal Server Project". Installed on a server it can supply many workstations (so called thin-clients) with identical environments. All applications run on the server and therefore you can use old PCs and convert them into XTerminals. This reduces costs and maintenance especially in an environment where you need to have an uniform workspace on each computer you login, e.g. in schools or firms.


All of the examples in this document presume that your server's IP is, your domain is named and your network is


First of all, you must have a working Gentoo system. Please read the Gentoo Installation Manual for your architecture on Gentoo's Documentation Website.

Then lets begin with the easiest step, installing the ltsp core utils:

# emerge ltsp-core

This will install the following packages as dependencies:

  • XFree: They are called XTerminals, guess why :)
  • DHCP: DHCP is a protocol for automating the configuration of computers that use TCP/IP, used by ltsp to distribute IPs to the workstations.
  • NFS: NFS is a protocol to allow access to harddisks through the network, used by ltsp to mount a base system for the workstations.
  • TFTP: TFTP is a simple file transfer protocol, used by ltsp to transfer the kernel to the workstations.
  • XINETD: Xinetd is a powerful replacement for inetd, with advanced features, used by ltsp to start tftp.
If you have the kde/gnome useflag set, it will also install a complete kde/gnome system.

After the emerge process has finished all services must be configured:

System Logger

To analyze problems easier, the system logger must be configured to accept remote connections. Please read the documentation of your system logger on how to achieve this. If, for example, you are using sysklogd, all you need to do is edit /etc/conf.d/sysklogd and add "-r" to the SYSLOGD line:

SYSLOGD="-m 0 -r"
KLOGD="-c 3 -2"

Next step is to edit your /etc/exports file, in order to allow the workstations to mount the root filesystem. There should be at least two lines in it:

/opt/ltsp/i386   ,no_root_squash,async)
You have to alter the network/netmask to match your network/netmask settings.

Now start NFS.

# rc-update add nfs default
# /etc/init.d/nfs start

TFTP requires a bit of configuring to get it to work properly. First, edit /etc/conf.d/in.tftpd to set tftpd's options and path correctly:


The -s flag specifies that TFTP is to run in secure chrooted mode (recommended). This means that you don't need to include the /tftpboot path for example in the DHCP configuration.

Next, configure xinetd to run TFTP and allow remote connections. By default TFTP won't be started by xinetd, so edit /etc/xinetd.d/tftp and replace disable=yes with disable=no. If the file is missing just go ahead and create /etc/xinetd.d/tftp with the contents below.

service tftp
        disable = no
        socket_type = dgram
        protocol = udp
        wait = yes
        user = root
        server = /usr/sbin/in.tftpd

Now edit /etc/xinetd.conf and comment out the line only_from = localhost by prefacing it with a #. Finally, start xinetd.

# rc-update add xinetd default
# /etc/init.d/xinetd start
Name resolving

In order for the workstation to reach all resources, a correct name resolving must be available. There are several ways to achieve this. One is to configure a DNS server for the local network, the other (and more simple) is to have almost identical /etc/hosts files on all systems. We are going to use the latter.

All workstations must be listed in /etc/hosts. Take a look at the example:        localhost    server      ws001
DHCP Config

This is the most complicated step in my opinion, you have to create a valid DHCP Config (/etc/dhcp/dhcpd.conf). Here is an example:

Some general options
default-lease-time            21600;
max-lease-time                21600;
use-host-decl-names           on;
ddns-update-style             ad-hoc;

Bootp options
allow booting;
allow bootp;

Network Options
option subnet-mask  ;
option broadcast-address;
option routers      ;
option domain-name-servers;
option log-servers  ;
option domain-name            "";

LTSP Path Options
option root-path              "";
filename                      "/lts/vmlinuz-2.4.24-ltsp-1";

If your workstations have ISA NICs uncomment the following
lines and alter the driver and IO
#option option-128 code 128 = string;
#option option-129 code 129 = text;
#option option-128 e4:45:74:68:00:00;
#option option-129 "NIC=ne IO=0x300";

shared-network WORKSTATIONS {
  subnet netmask {
    Distribute dynamic IPs to the workstations
    range dynamic-bootp;
    Workstation specific configuration for PXE booting
    #host ws001 {
    #  hardware ethernet     00:E0:06:E8:00:84;
    #  fixed-address;

If your workstations support PXE, you should list each one of them as we have done with host ws001 (don't forget to uncomment it). Don't give them an adress in the dynamic range, otherwise it would be possible that more workstations have the same IP (which is troublesome). Remember, if you cut-n-paste the above example, replace any "//" comments with "##", or else dhcp will fail to start.

For more documentation on this item read the official dhcp handbook:

Now start DHCP as you did with NFS and xinetd:

# rc-update add dhcp default
# /etc/init.d/dhcp start
DHCPD needs CONFIG_PACKET and CONFIG_FILTER activated in the kernel to work.
LTSP Configuration

There are many options to configure your workstations, visit for a full description of /opt/ltsp/i386/etc/lts.conf.

As a few suggestions to get started, you will want to first copy /opt/ltsp/i386/etc/lts.conf.example to /opt/ltsp/i386/etc/lts.conf and edit it from there. You may want to try changing the SCREEN_01 option to read SCREEN_01 = startx. To use a USB mouse on the remote client, add the following MODULE lines, and change the X_MOUSE_* lines as follows:

MODULE_01          = usb-uhci
MODULE_02          = mousedev
MODULE_03          = usbmouse
X_MOUSE_DEVICE     = "/dev/input/mice"

Now you have to change your displaymanager's configuration to also accept remote connections.

First change your /etc/X11/xdm/Xaccess file, uncomment the following line:

#*                   #any host can get a login window

Now change the configuration of the displaymanager you use:

XDM: In /etc/X11/xdm/xdm-config comment out DisplayManager.requestPort: 0

KDM: In /usr/kde/3.1/share/config/kdm/kdmrc look for the [Xdmcp] section and change Enable = false to Enable = true.

GDM: In /etc/X11/gdm/gdm.conf look for the [xdmcp] section and change Enable = false to Enable = True.

Then start the displaymanager:

# rc-update add xdm default
# /etc/init.d/xdm start
There seem to be problems currently with XDM and GDM. The author used KDM to resolve these issues.

Remember, if your display manager is already running, restarting the X server via CTRL-ALT-BACKSPACE doesn't restart the display manager.

Creating a bootfloppy

If your workstations don't support PXE booting, you can create a boot-floppy which is used to start your workstations and connect to the terminal server. Go to, select the latest version, select your NIC, press Get ROM and write the image to a floppy:

# cat nicfile.zdsk > /dev/fd0

There are a lot of things that can be the source of trouble, but there are also several resources around which help you solve your problems:

  • The official documentation:, especially the Troubleshooting section.
  • The gentoo IRC channel: #gentoo
  • The ltsp irc channel: #ltsp
  • The ltsp mailinglists are full of some real good knowledge.

Q: My workstations have Pentium II CPUs, but my server is compiled with march=athlon-xp, does this work?

A: This is no problem, because all applications run on the server.

Q: Which CPU and how much RAM should the server have?

A: There is a good document with suggestions at

Q: Do you have more information about this PXE stuff?

A: Yes, take a look at and

Q: Is it possibly to use 3D-Accelerated software on the workstations?

A: If you are using NVidia cards take a look at

Q: In some applications the fonts look crappy, what to do?

A: You have to setup the XFontServer, add USE_XFS=Y to your lts.conf, edit /etc/X11/fs/config and comment no-listen: tcp out, replace XFS_PORT="-1" with XFS_PORT="7100" in /etc/conf.d/xfs and start xfs: /etc/init.d/xfs start. Also doublecheck that /etc/X11/XF86Config (or /etc/X11/xorg.conf) contains FontPath "unix/:7100" in the Files-section.

Q: How can I use the soundcard of my workstation?

A: There is a ltsp-sound package in gentoo, for more instructions read the included README file.


