Vous êtes sur la page 1sur 19

LTSPv5 on Ubuntu

Gideon Romm
June 9, 2009
What is LTSP?
• LTSP is a software add-on to Linux to create a
boot server:
– Boot desktop computers over the network; and
– Run them in a stateless fashion (requiring no storage)
• By default, LTSP is configured to:
– Run as both boot server AND application server
– Present a login screen through which users can
connect to the LTSP server and run the entire desktop
on the LTSP server.

6/9/2009 Symbio Technologies 2


What is LTSP not?
• LTSP is not an application server
– Applications that users use are not dictated
– The server that users log into need not be the same as
the one that booted the thin client
• LTSP is not a protocol
– Booting uses standard protocols, like DHCP, TFTP, etc.
– By default, LTSP uses X11-over-ssh to connect to the
application server, but other protocols may be used,
such as RDP, ICA, NX, etc with proper scripting

6/9/2009 Symbio Technologies 3


Workstations vs. Users
• LTSP creates a boot server
• Boot servers know only workstations, ie.
Hardware
• Knowledge of users only comes when a user
logs into an application server
• Conclusion:
– Workstation configurations are done within LTSP
– user configurations are done on the applications
server

6/9/2009 Symbio Technologies 4


The “chroot”
• The filesystem used by the client as its operating
system environment is often referred to as the
“chroot” or “change root”, after the command
used to access the environment on the server
• This operating system is exported to the thin
client (on Ubuntu) as a single-image operating
system, which must be updated when changes
are made to it
• In most cases, a single image can be used for all
clients, and only configuration changes that are
downloaded on boot need to be changed

6/9/2009 Symbio Technologies 5


The Boot Process
• Clients are configured to network boot when powered on
(either in the BIOS or using a boot-strap media such as
floppy/CD)
• Network boot request is answered by DHCP (typically
running on the LTSP server)
• Client is assigned an IP address and told to download the
kernel and initial ram disk from the LTSP server using TFTP
• The initial ram disk then:
– Downloads the LTSP configuration file
– mounts the exported filesystem,
– switches to using it as its own root filesystem, and
– proceeds to boot according to the instructions in the root
filesystem

6/9/2009 Symbio Technologies 6


Screen Scripts
• The very last script an LTSP client runs upon
boot is a so-called “screen script”
• Multiple screen scripts can be run at the same
time on different virtual consoles or “screens”
• Users can toggle between the screens with
ctrl-alt-Fn (where “n” is the screen number)
• By default, LTSP runs one screen script called
“LDM” for “LTSP Display Manager”

6/9/2009 Symbio Technologies 7


LTSP Display Manager
• Default login screen run on the client
• Does the following:
– Creates an SSH tunnel between the client and
server using user’s credentials
– SSH tunnel used for communication between
client and server, including:
• Launch the desktop
• Mount local devices (client-side removable media)
• Mount home directory for local applications (client-side
applications) and create menu items

6/9/2009 Symbio Technologies 8


Other Screen Scripts
• Screen scripts are just shell scripts
• Another available screen script is “rdesktop”,
for running the Linux RDP client full screen to
connect to a Windows Terminal Server
• Administrators are encouraged to write their
own screen scripts as needed
• Screen scripts can be found in the chroot’s
/usr/share/ltsp/screen.d/ directory

6/9/2009 Symbio Technologies 9


LTSP Configuration
• LTSP is configured using a single file, “lts.conf”
• This file is downloaded via TFTP on boot, so it is
located in the TFTP directory, on Ubuntu:
/var/lib/tftpboot/ltsp/i386
• Lts.conf is in “ini” file format, with the default
configuration in a [default] section
• Individual workstation configurations can be specified
in respective sections by MAC address of the thin client
• LTSPv5 does not require an lts.conf file at all, and will
use sane defaults to create a secure stateless desktop

6/9/2009 Symbio Technologies 10


Example lts.conf
[default]
# Disable SSH tunneling of X11 traffic by
default
LDM_DIRECTX = True

[AA:BB:CC:DD:EE:FF]
# Use nvidia driver for this thin client,
overriding auto-detected driver
XSERVER = nvidia

[FF:EE:DD:CC:BB:AA]
# Set Screen 7 of this client to an RDP session
rather than LDM
SCREEN_07 = “rdesktop 192.168.0.253”

6/9/2009 Symbio Technologies 11


Local Applications
• A new feature of LTSPv5 is the ability to run Linux
applications installed in the chroot environment from
within an LDM session
• Benefits:
– Reduces server load
– Enables use of graphics intense multimedia applications
– Enables use of applications that require direct hardware
access
• Drawbacks:
– Increased chroot maintenance
– Increased hardware requirements on thin client

6/9/2009 Symbio Technologies 12


Local Applications (Technically)
• Three components: Authentication, home
directory access, application launching
– Authentication: Uses authentication from server
(no client side authentication required)
– Home directory: Uses SSHFS, and SSH-based
filesystem, to mount the home directory to the
client
– Application launching: Uses X11 atoms to signal a
client-side daemon to run a process
• Requirements: X11 and SSH
6/9/2009 Symbio Technologies 13
Local Devices
• AKA “Removable media”
• Local floppy, CDROM, USB flash drive, etc
• Anything with a filesystem
• Mounts the filesystem locally and redirects it to
the server
• Uses LTSPFS, a network-aware automounting
filesystem designed just for LTSP
• Media is mounted only when accessed. As long
as the media is not accessed, it is unmounted and
can be safely removed

6/9/2009 Symbio Technologies 14


Local Printers
• Printers attached to the thin clients
• Redirected as JetDirect printers
• Why?
– Spooling is done on the server, where there is
sufficient memory/disk space
– No client-side print driver management

6/9/2009 Symbio Technologies 15


Sound
• In LDM, Linux applications on the server
redirect sound to the client using PulseAudio
(a network-aware client-server sound system)
• Requirement: application server must be able
to create a network connection to the client
• In most other sessions, sound is transported
using the terminal services protocol (eg. RDP)
• This means that sound can easily go through
NAT firewalls and such in those sessions
6/9/2009 Symbio Technologies 16
Simple LTSP Network

6/9/2009 Symbio Technologies 17


Extending LTSP Functionality
• LTSP provides a standard distribution
operating system to the client
• Software packages can be added to the chroot
using the distribution’s package manager
• Simple shell scripts can be written to extend
functionality or tailor things to a particular
environment

6/9/2009 Symbio Technologies 18


LTSP Online Resources
• LTSP website: www.ltsp.org
• LTSP IRC channel: #ltsp on irc.freenode.net
• LTSP listserv: ltsp-discuss
• K12LTSP listserv: k12osn
• Ubuntu LTSP docs:
https://help.ubuntu.com/community/UbuntuLTSP

6/9/2009 Symbio Technologies 19

Vous aimerez peut-être aussi