The LTSP - Linux Terminal Server Project home page can be found here:
http://www.ltsp.org/I recommend starting with the newest Ubuntu LTS Desktop version. Download and install, then make sure you assign a static ("manual") IP address. Simply click on the network icon and use "edit connection" to accomplish this. The change should take effect immediately, you can open a terminal and use the command "ifconfig" to confirm this.
(Note: The reason we're using the Desktop edition and not the Server edition is because all the X client software will actually be running on this Ubuntu machine.)
Installing LTSP is as simple as this:
sudo apt-get install ltsp-server-standalone
Next, build the initial client file system and boot image using this command:
sudo ltsp-build-client --arch i386
Note: If you will only be using 64bit thin clients then read "i386" as "amd64" throughout this document. Note that this will mean NO 32bit clients will be able to work with your terminal server.
Now you have to configure your DHCP server to offer PXE clients a way to boot off your thin client boot image. If you already have a DHCP server which can be configured for this, you need to add the following options:
next-server <YOUR SERVER IP HERE>;
filename "/ltsp/i386/pxelinux.0";
Alternatively, LTSP comes with a DHCP server on its own. In fact, it comes with both "isc-dhcp-server" and "dnsmasq" and this can be a little confusing because we won't be using any of those init scripts or configuration files. Instead, we will use one that's part of LTSP itself:
sudo joe /etc/ltsp/dhcpd.conf
It's important not to interfere with the "official" DHCP on your network if one exists, that's why I recommend the following setup:
not authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
min-secs 3;
range 192.168.0.100 192.168.0.200;
option domain-name "your.domain.name";
option domain-name-servers 8.8.8.8;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option subnet-mask 255.255.255.0;
if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
filename "/ltsp/i386/pxelinux.0";
}
}
Remember to carefully substitute the IP addresses for your own. Notice that we do not need a "next-server" here because the clients will default to using the DHCP server as their TFTP boot server.
You will probably spend some time getting this configuration file just right for your environment.
You can check the syntax using the following command:
sudo dhcpd -t -cf /etc/ltsp/dhcpd.conf
To restart the DHCP server, use the following command:
sudo service isc-dhcp-server restart
Now it's time to try booting your first thin client. The PXE boot loader should pick up the configuration after a few seconds, download the initial boot image via TFTP and then boot it. What happens next is the boot image requests a new IP address and mounts the thin client operating system via the Linux Network Block Device (nbd-server) service running on your terminal server. If all goes well, you should get a login screen after a few moments.
The login screen is running on your thin client, but beyond that everything you see is actually running on the Ubuntu server. Try opening an "xterm" window and notice the host name in the prompt.
If you have a very thin client, that is one with very little RAM and/or CPU, you will notice that things are running very slowly. In fact, when using the default Gnome 3 interface on my HP T5720 clients, the user experience is actually quite useless. Troubleshooting it, I found that the SSH process responsible for tunneling the X traffix between the server and client was using more than 80% of the CPU time on my thin client. Do NOT be discouraged by this, we've only just started!
The first thing we will do is tweak LTSP a bit. Create a configuration file for this:
sudo joe /var/lib/tftpboot/ltsp/i386/lts.conf
Here is the config file I'm using:
[Default]
SCREEN_02=shell
SCREEN_07=ldm
# Limit the RAM allocated by X client applications on the thin client
X_RAMPERC=80
# Use custom login theme under '/opt/ltsp/i386/usr/share/ldm/themes'
LDM_THEME=ltsp
The main reason Gnome 3 is so slow is because it uses bitmap images, animations and sound effects everywhere. This can hardly be noticed when running it locally but it is killing the thin client CPU and display adapter.
We will solve this by installing "blackbox" on your terminal server. To do so, use the following command:
sudo apt-get install blackbox
We will also need "blackbox" installed on the thin client, so execute the following commands on the server as well:
sudo ltsp-chroot
apt-get install blackbox
exit
sudo ltsp-update-image
Huh, what did we just do?? The command "ltsp-chroot" lets you perform maintenance directly on the file system which will be running on your thin client. We installed "blackbox" into that file system, then asked LTSP to update the image file that will be presented to the thin clients via nbd-server.
On your thin client, log out now. You should be prompted with a message saying that a new version of the system is available and the thin client will reboot automatically.
You should get the same login screen again, but don't log in just yet. Instead, click "Preferences" in the lower left corner, then select "Session" and change from "Default" to "Blackbox". Now log in.
You should now see a grey screen with only a small toolbar at the bottom. Congratulations, this is the "blackbox" window manager. By default it is extremely bare-bone, in fact if you rightclick on the desktop you only get three options.
Just as Blackbox is extremely small and simple but contains everything you actually need, so does the documentation:
man blackbox
The first thing you will want to do is edit the menu file to get easy access to the programs you need:
sudo joe /etc/X11/blackbox/blackbox-menu
Here's a sample menu file to get you started:
# Sample blackbox menu file created by floyd@atc.no
[begin] (Main menu)
[submenu] (Applications) {Applications}
[submenu] (Development) {Development}
[exec] (Arduino) {arduino}
[exec] (Eclipse) {eclipse}
[exec] (Fritzing) {Fritzing}
[end]
[exec] (Gimp image manipulation) {gimp}
[submenu] (LibreOffice) {LibreOffice}
[exec] (Calc) {localc}
[exec] (Draw) {lodraw}
[exec] (Impress) {loimpress}
[exec] (Writer) {lowriter}
[end]
[end]
[submenu] (Internet) {Internet}
[exec] (Firefox web browser) {firefox}
[exec] (Thunderbird mail) {thunderbird}
[end]
[submenu] (Tools) {Tools}
[exec] (Calculator) {gnome-calculator}
[exec] (Disk usage) {baobab ~}
[exec] (File explorer) {xfe ~}
[exec] (gFTP) {gftp}
[exec] (Text editor) {gnome-text-editor}
[exec] (Xterm) {xterm}
[end]
[nop]
[submenu] (Preferences) {Preferences}
[stylesmenu] (Custom styles) {~/.blackbox/styles}
[stylesmenu] (Predefined styles) {/usr/share/blackbox/styles}
[reconfig] (Reload configuration)
[restart] (Restart desktop)
[exec] (System settings) {unity-control-center}
[config] (Window settings)
[workspaces] (Workspaces)
[end]
[exit] (Log off)
[end]
Remember that these menu options will only work if the actual program is installed on your terminal server. For instance, to install the Eclipse IDE, simply run this command in Ubuntu:
sudo apt-get install eclipse
Referring to the blackbox man page, you should see a lot of ways that Blackbox can be tweaked to look and feel pretty much the way you want by adding the bells and whistles needed.
Another thing you may want to look into if you have a decent display adapter on your thin clients is turn off "image dithering" which is on by default and tries to use the CPU to compensate for lack of color depth. (In my blackbox-menu, it's under "Preferences", "Window settings", "Image Dithering")
Using Blackbox and firefox, I can browse the web and run YouTube videos on that very same HP T5720 which couldn't even handle the Gnome desktop.
Yes, it's really that simple! Have fun and please let me know how it works for you :-)