Build a Media Server - Background

How to configure LTSP (Linux Terminal Server Project) on Ubuntu Server

In the How to Install LTSP guide we covered how to install LTSP and build the basic client image. We'll now cover how to configure it by firstly installing a full-blown Ubuntu Gnome desktop.

Configure the LTSP environment

The first thing we want to do is expand the list of available package sources from the default list since they are quite limited and secondly to bring our LTSP environment up to date. So issue the following command to copy the source list from the host machine (our server) to the LTSP environment:

sudo cp /etc/apt/sources.list /opt/ltsp/i386/etc/apt/sources.list

During this process it's possible Ubuntu will try to stop and start services as it goes along so we'll prevent this from happening by issuing the following command:

export LTSP_HANDLE_DAEMONS=false

The LTSP environment lives in a separate part of Ubuntu. This means we can add and remove packages in this environment independent of the host machine. So, let's switch into this LTSP environment:

sudo chroot /opt/ltsp/i386

and mount the proc filesystem:

mount -t proc proc /proc

Now let's bring the LTSP environment up to date. Note we are omitting the normal "sudo" prefix from these commands because we're already running as root:

apt-get update

aptitude safe-upgrade

Lastly let's install an Ubuntu Desktop GUI for our LTSP clients:

apt-get install ubuntu-desktop

You might also want to install openoffice and firefox

apt-get install openoffice.org firefox flashplugin-installer

Add an admin user account

Now we have installed the Ubuntu desktop we need to set up an admin user. This is because the existing admin user on our host machine does not get transferred across to this LTSP environment. I used the same credentials for this admin user as on the one on my main server but it's not compulsory, just easier to remember!:

useradd -m adminusername -G sudo

replacing adminusername with the required name of your admin user

Now set the password for this account and type the password when prompted:

passwd adminusername

replacing adminusername with the required name of your admin user. Now add this new user to sudoers file:

visudo

Press the [Insert] key once and insert a blank line after the "%sudo ALL=(ALL) ALL" line and paste the following:

adminusername ALL=(ALL) ALL

replacing adminusername with the required name of your admin user.

When you're done editing the file press the [Esc] key once and type the following:

:wq

This should save the changes and bring you back to the command line. If you make a mistake then issue :q! instead of :wq to abort your changes.

Now exit out of chroot:

exit

And unmount the proc filesystem

sudo umount /opt/ltsp/i386/proc

Whenever you make any changes to your LTSP environment it's always a good idea to run the following commands:

sudo ltsp-update-sshkeys

sudo ltsp-update-kernels

sudo ltsp-update-image --arch i386

The first one MUST be run whenever you change any IP settings. The second one updates the kernel if required and the last one rebuilds the LTSP client image to take account of any packages you've updated.

You should now be able to launch a thin client and once logged on be presented with a full-blown Gnome desktop environment. Enjoy!

 

Bookmark and Share      

Still stuck? Now what you were looking for? Then head over to the Discussion Forum!