LTSP Server with LinuxMint 18.3 Xfce

Reading time ~5 minutes

LTSP Server with LinuxMint 18.3 Xfce

LTSP Server with LinuxMint 18.3 Xfce

1 Introduction

LTSP allows computers of a LAN to boot through network from a single server. One of the benefits of this is for example to cut down the administration and maintenance time of a classroom of computers (instead of installing, configuring and updating each of them, we do it only once).

Some details about how it works are described in this article (in case that you are curious): https://ubuntuforums.org/showthread.php?t=2173749

The Edubuntu LTSP Live is the most easy way to run a classroom with Edubuntu LTSP. But it is a bit outdated (based on ubuntu-14.04). However it is not so difficult to build a LTSP server with the latest Ubuntu desktop.

In my case, all the clients are decent machines with 2GB RAM, and the server is just like them, so I decided to follow the ltsp-pnp approach for fat clients, which is also the most easy to implement. In this method the server is used as a template for the clients, so that almost all the programs, configurations, users, etc. that are installed on the server will be made available to the clients as well (through the network).

Also, the gateway/router of the LAN provides automatic network configuration (DHCP) as well, so I don't have to and I don't want to introduce another DHCP server on the LAN (which may potentially be a source of network problems).

2 Preparing the server

I started by making a standard installation of LinuxMint 18.3 Xfce on the server PC, followed by some standard updates/customizations, like:

apt-get update
apt-get upgrade
apt-get install chromium-browser
etc.

I tried to install all the programs/tools that should be available on the clients. In particular, one of them is epoptes, which allows remote desktop control for the clients:

apt-get install epoptes epoptes-client
gpasswd -a ${SUDO_USER:-$USER} epoptes

Then, I set a fixed IP address to the server by adding these lines to /etc/network/interfaces:

auto enp0s8
iface enp0s8 inet static
    address 192.168.1.10
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 8.8.8.8 8.8.4.4

Note: Replace enp0s8 with the name of your interface that is facing the LAN. You can see the available interfaces and their names with the command ip addr. In case that you get the internet connection through another interface, then don't add the lines for gateway and dns-nameservers.

Note: You need to reboot so that these changes are applied.

3 Installing LTSP

3.1 Install packages

I installed the package ltsp-server (not ltsp-server-standalone) and the other related packages:

apt-get --yes --install-recommends install \
    dnsmasq ltsp-server ltsp-client ldm-ubuntu-theme

3.2 Update kernels

echo 'IPAPPEND=3' >> /etc/ltsp/update-kernels.conf
/usr/share/ltsp/update-kernels

3.3 Create lts.conf

The command:

ltsp-config lts.conf

creates the file /var/lib/tftpboot/ltsp/i386/lts.conf or /var/lib/tftpboot/ltsp/amd64/lts.conf (depending on the architecture of the server). I did not customize it.

3.4 Configure dnsmasq

The command:

ltsp-config dnsmasq

creates the configuration file /etc/dnsmasq.d/ltsp-server-dnsmasq.conf.

I had to fix a few things in it:

  • I don't want this server to give IP configuration (DHCP), so I commented out this line: dhcp-range=192.168.67.20,192.168.67.250,8h
  • The line port=0 breaks the name resolution (DNS) in Ubuntu-16.04, so I commented it out as well.

Note: If you don't have a DHCP server on your network, then don't comment the dhcp-range above. But make sure that the fixed IP (set in the previous section) and the DHCP range are in the same network (for example address 192.168.11.1 and dhcp-range=192.168.11.50,192.168.11.100). Instead, you should comment the lines that end in proxy, for example: dhcp-range=192.168.11.0,proxy

Then restart dnsmasq: service dnsmasq restart

4 Creating the client image

The command:

ltsp-update-image --cleanup /

generates the client image. It may take some time.

When it is finished you can start booting clients from the network. This is usually done by pressing F12 when the computer is just powered on, but it may be different on different computers. Sometimes you may need to enable booting from network on the BIOS (it is usually called PXE booting).

5 Installing Edubuntu programs

Edubuntu programs can be installed like this:

apt-get install edubuntu-desktop

Or like this:

apt-get install \
    ubuntu-edu-preschool \
    ubuntu-edu-primary \
    ubuntu-edu-secondary \
    ubuntu-edu-tertiary

The first one installs everything about Edubuntu, including the desktop, how it looks etc. The second method installs only the additional educational software that usually comes with Edubuntu, without changing the existing desktop etc. I prefer the second way because it is more flexible (for example I would like to skip the preschool tools, which are mainly games for small children).

Now that we have installed new packages, we have to update the image as well, in order to make these changes available to the clients. It is the same command as before:

ltsp-update-image --cleanup /

6 Installing additional desktops

In Linux we can install several desktops and let the user choose which one he prefers. For example this article shows how to install the MATE desktop. They can also be installed by installing the packages xubuntu-desktop, lubuntu-desktop, kubuntu-desktop etc. Then you need to update the client image again.

Attention: When you install another desktop, it is possible that it may replace the Display Manager (the login window) with another one. Make sure that you always keep lightdm as display manager, not something else (for example mdm), because somehow it doesn't work with mdm.

7 Adding more users

All the users of the server can also login from each of the clients. So, to add more users we just add them on the server. No need to update the client image on this case. Also, everything that the users change is saved on the home directories on the server.

However, there is also a GUI tool that facilitates the management of user accounts, as well as other LTSP related tasks. It is called ltsp-manager and can be installed like this:

add-apt-repository ppa:ts.sch.gr
apt update
apt install ltsp-manager

After installation, you can find LTSP Manager in the system menu, in System → Administration → LTSP Manager. For more details about using it see: http://wiki.ltsp.org/wiki/Ltsp-manager (also available from the Help menu).

Date: 2017-01-07

Author: Dashamir Hoxha

Created: 2019-01-24 Thu 05:13

Emacs 25.1.1 (Org mode 8.2.10)

Validate

OpenPGP Web Key Directory

OpenPGP Web Key DirectoryOpenPGP Web Key DirectoryTable of Contents1. Introduction2. How WKD works3. Building a WKD3.1. Create the direct...… Continue reading

SMTP Server with LDAP Authentication

Published on April 17, 2021

Using WireGuard VPN

Published on November 09, 2020