LTSP/Tips and Tricks

From openSUSE

Contents

Uninstall resource hogs

Start yast2 software management module and uninstall beagle and packagekit

Do not edit config files manually

Only file that requires editing is /etc/sysconfig/kiwi-ltsp, editing of any other config files, such as /etc/dhcpd.conf or /srv/tftpboot/KIWI/* will get overwritten on running kiwi-ltsp-setup.

Make a backup of modified files and copy it back again after running kiwi-ltsp-setup.

To prevent kiwi-ltsp-setup overwriting your modification to /etc/dhcpd.conf for example do the following to make it immutable:

 chattr +i /etc/dhcpd.conf

To make it editable again:

 chattr -i /etc/dhcpd.conf

Using another DHCP server, not on LTSP server

Note: This is now default in new packages,so these steps are not required, just use the same network as another dhcp server.

LTSP assumes that you do not have an DHCP server yet and it runs one for you. If you already have a DHCP server running and want to use that instead of on KIWI-LTSP server, turn the dhcp server on KIWI-LTSP server off by running this:

 insserv -r dhcpd && rcdhcpd stop

You need to configure your original DHCP server (not the ltsp) , by editing it's dhcpd.conf:

 subnet 192.168.0.0 netmask 255.255.255.0 {
 option routers 192.168.0.1;
 range 192.168.0.1 192.168.0.254;
 #add this and replace with your own LTSP server ip:
 next-server 192.168.0.2;
 filename "pxelinux.0";
 }

You also need to edit /srv/tftpboot/pxelinux.cfg/default

The line (its under LABEL kiwi-ltsp):

 append initrd=boot/initrd-ltsp vga=791 splash=silent showopts

should become:

 append initrd=boot/initrd-ltsp vga=791 splash=silent showopts kiwiserver=192.168.1.231 kiwiservertype=tftp

Try booting it now, and it should work.

Customizing thin client behaviour

If for some reason the default configurations do not work, you can modify /srv/tftpboot/KIWI/lts.conf and change some of these variables:

Some common variables that can be set in lts.conf
Variable Possible Values Default Value Comment
XKBLAYOUT A valid xorg Layout unset see xorg documentation for value
SCREEN_nn ldm, shell, xdmcp, telnet,startx (deprecated) SCREEN_07=ldm
X_CONF full path to a file autodetected The file must be present in client chroot
XSERVER ati, cirrus_alpine cirrus, cyrix, fbdev, fglrx, i810, nv, radeon, s3, savage, sis, vesa etc. autodetected Try vesa if autodetected does not work
X_COLOR_DEPTH 2, 4, 8, 16, 24, 32 24 set to 16bit to save client mem
PRINTER_0_DEVICE dev (i.e. /dev/usblp0) unset
PRINTER_0_TYPE P(parallel), S(serial), U(USB) unset only required for serial, others are autodetected

For other variables please refer in Edubuntu handbook as per your requirements.

Changing LDM theme

Place background image (680×480) in /srv/tftpboot/KIWI/bg.png (do not change the name)

edit /srv/tftpboot/KIWI/config.default and add this at the end of "CONF=" line, place a comma and continue the line:

  ,/KIWI/bg.png;/usr/share/ldm/themes/ldm-suse-theme/bg.png;YOURSERVERIP

Leave the content before the "," as it is and change YOURSERVERIP to actual IP of the server.

Using NXagent to decrease X traffic

Install NX on the server:

 zypper ar http://download.opensuse.org/repositories/NX/openSUSE_11.0/ NX
 zypper in NX

Add the following to /srv/tftpboot/KIWI/lts.conf

 LDM_SESSION=/usr/bin/gnome-session-nx

Using custom configuration for the client

KIWI provides a mechanism to send configuration files from the server to client via tftp.

 cp /srv/tftpboot/KIWI/config.default /srv/tftpboot/KIWI/config.MA:CA:DD:RE:SS

You can find the client mac address from /var/log/messages. Note that MA:CA:DD:RE:SS should be in lower case only.

Place your custom configuration file in /srv/tftpboot/KIWI folder, e.g. my_xorg.conf. Edit config.MA:CA:DD:RE:SS as follows:

 CONF=/KIWI/lts.conf;/etc/lts.conf;10.0.0.254,.......,/KIWI/my_xorg.conf;/etc/X11/xorg.conf;10.0.0.254

Now the client with that MAC address will use the specified xorg.conf from the server. You will need to add CONFIGURE_X=False and X_CONF=/etc/X11/xorg.conf to disable automatic xorg.conf creation.

Increasing performance on low end client hardware

  • Disable sound, local device and turn off encrypted connection by adding the following to /srv/tftpboot/KIWI/lts.conf
 SOUND=False
 LOCALDEV=False
 LDM_DIRECTX=True
  • Per client about 150M memory is required on the server, try adding more RAM.
  • Check out NXagent tip above, it may be faster in some cases.
  • You can also make use of Nomad with openSUSE 11.1 server, it uses RDP protocol which is faster than default X over SSH.

Login into the client

If you have to log in the client OS, the root password is 'linux'. LDM login uses username and passwords of server users.

It is also possible to log into the client through ssh with the above mention information.

Passwordless ssh to the client

Sometimes it is nice to be able to do things like the following from the comfort of your chair in front of the server:

 ssh clientIP poweroff

It is not too much of a problem if you have to do this on just a few clients, if you want to run a scrip that runs the above command on all the clients it is preferred to have a passwordless access to the client.

Set up key based ssh authentication:

 ssh-keygen -t rsa (if you don't have public key already)
 cat ~/.ssh/id_rsa.pub > /srv/tftpboot/KIWI/authorized_keys

Edit /srv/tftpboot/KIWI/config.default (or config.mac:add:ress if you have custom configuration)

CONF=/KIWI/lts.conf;/etc/lts.conf;10.0.0.254,.......,/KIWI/authorized_keys;/root/.ssh/authorized_keys;10.0.0.254

Working with LTSP localapps

See LTSP Localapps for more information about running and adding more applications inside the client image.

Managing lts.conf

Use Easy-LTSP to configure lts.conf quickly and easily.

Managing all clients

Check out iTALC on openSUSE for how to use iTALC to monitor and control all the clients in the network.

Changing the default window manager

To change the default window manager from gnome to xfce else you can edit one of these two files: /etc/sysconfig/windowmanager DEFAULT_WM="startxfce4" OR edit /srv/tftpboot/KIWI/lts.conf and add LDM_COMMAND=/path/to/xfce-session-command Adjust for your window manager of choice.

Hiding file system

Create a file .hidden in / (root) with the names of all the system folders that you would like to hide from the users such as :

# cat /.hidden
var
usr
sys
srv
sbin
root
proc
opt
mnt
media
lib
lost+found
etc
dev
boot
bin
tmp

Note: This shall prevent the folders from being listed in nautilus, however the users shall be able to navigate to these folders through other file browsers and other file and folder access dialogs.

Safeguarding user-home privacy

To prevent users from eavesdropping into each other's folders it is advisable to set the UMASK in /etc/login.defs as

 UMASK   077