|
LTSP Kiosk Introduction
Basic Setup
Additional Features
Advanced Issues |
Configuring the ServerCore LTSP Installation
Hacking the Server Files/etc/rc.localIn the server side you want to edit the client's /etc/rc.local so that the X server will be run on the client side. In client's /etc/rc.local (/opt/ltsp/i386/etc/rc.local) make following addition below these rows (lines 418-428): ACCESS_CONTROL=`get_cfg DISABLE_ACCESS_CONTROL N`
if [ "${ACCESS_CONTROL}" = "Y" ]; then
ACC_CTRL="-ac"
else
ACC_CTRL=""
fi
You need to add the following set of code, which replaces the short if-/proc/progress-fi construction before the syslog daemon part: XRUN_LOCAL=`get_cfg XRUN_LOCAL N`
if [ "${XRUN_LOCAL}" = "Y" ]; then
# Create home directory for UID 1001 (kiosk). The UID is
# hard-coded to su_kioski executable. Make sure that these
# UIDs are equal.
mkdir /tmp/home
chown 1001 /tmp/home
# Create temp /var/tmp, X11 uses this
mkdir /var/tmp
chmod 777 /var/tmp
if [ -w /proc/progress ]; then
echo "su_kiosk -e \"/usr/X11R6/bin/xinit /etc/xinitrc -- /usr/X11R6/bin/${XBINARY} ${XOPTS} >/dev/tty3 2>&1\"" >/tmp/start_ws
else
echo "su_kiosk -e \"/usr/X11R6/bin/xinit /etc/xinitrc -- /usr/X11R6/bin/${XBINARY} ${XOPTS}\"" >/tmp/start_ws
fi
else
if [ -w /proc/progress ]; then
echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -query ${XDM_SERVER} >/dev/tty3 2>&1" >/tmp/start_ws
else
echo "/usr/X11R6/bin/${XBINARY} ${XOPTS} ${ACC_CTRL} -query ${XDM_SERVER}" >/tmp/start_ws
fi
fi
chmod 0755 /tmp/start_ws
This implements the XRUN_LOCAL directive in the lts.conf. /etc/passwdThe kiosk user will be using UID/GID 1001 (this is hard-coded to su_kioski and the chown in rc.local). You might want to add following line to the client's /etc/passwd: kiosk:x:1001:1001:kiosk:/tmp/home:/bin/false /etc/xinitrcNow you can write your xinitrc, which starts your X applications, probably the window manager and the browser. Remember that rc.local will be run as root, but the xinitrc will be executed using GID 1001. The /etc/xinitrc might look something like this: # This is executed when XRUN_LOCAL = Y # Starts all X applications # Set variable HOME (points to home directory) /tmp/home export HOME=/tmp/home # Create home directory /tmp/home (tyhjennä, jos on jo) if [ -d $HOME ]; then rm -fR $HOME/* else mkdir $HOME fi # Execute Matchbox Window Manager (http://matchbox.handhelds.org/) # Compiled to standalone-mode /usr/bin/matchbox-window-manager & # Create Mozilla profile to home directory /usr/local/MozillaFirebird/MozillaFirebird -CreateProfile kioski # Replace the created, empty profile with the predefined profile cp /usr/local/mozilla-prof/kioski/y4e07pve.slt/* $HOME/.phoenix/kioski/*/ # Start Mozilla using the profile /usr/local/MozillaFirebird/MozillaFirebird -P kioski Installing Additional Binaries to LTSP tree (Server)The LTSP Contrib area has a useful script called ltsacp that can be used to copy binary and required libraries to LTSP tree (the /opt/ltsp/i386/ of your server). Libraries for resolving DNSTo get the DNS resolving to work, you need to copy following libraries to client's /lib: cp /usr/lib/libnss_dns.so /opt/ltsp/i386/lib/ cp /usr/lib/libresolv.so /opt/ltsp/i386/lib/ Edit the client's /etc/nsswitch.conf so that there is a following line: hosts: files dns Make sure that you have correct DNS_SERVER value in your lts.conf. As far as I understand there is no way to use multiple DNS IPs here. Libraries for getting UID/GID infoWarning: Adding this library breaks the NFS-over-SSL connection in the documented form. Use the patched rlpr instead of following these instructions to get your rlpr to work. Some tools (like rlpr printing client) expect UID info from /etc/passwd. This functionality requires some extra libraries: cp /usr/lib/libnss_files.so.2 /opt/ltsp/i386/lib/ Depending on your distribution you might want to create symlinks libnss_files.so.1 and libnss_files.so which point to libnss_files.so.2. After making the relevant libraries available edit the client's /etc/nsswitch.conf again. Make sure that you have following lines in your configuration: passwd: files group: files shadow: files This configuration tells kernel to get the user info from the files (/etc/passwd, /etc/group, /etc/shadow*). You may have other options after "files" attribute, but make sure "files" is the first one. In case you are using NFS over SSL setup you have to change priority to all other options as well. xinitYou should get a binary of /usr/X11R6/bin/xinit and place it to corresponding client directory. To make sure that all relevant libraries should come along (they should be there already) use ltsacp: ./ltsacp -t /usr/X11R6/bin/xinit Make sure that the permissions of the client's /usr/X11R6/bin/ are correct, especially XFree86 (note the suid bit): drwxr-xr-x 2 root root 4096 Oct 25 21:56 . drwxr-xr-x 4 root root 4096 Oct 25 20:37 .. -rws--x--x 1 root root 1615492 Oct 17 2002 XFree86 -rwxr-xr-x 1 root root 9800 Oct 25 21:56 xinit su_kiosksu_kiosk is a small program that changes the effective GID from root's. Read the source (note the NEWID which will be the new GID), compile and copy it to client's /usr/bin with proper attributes. Mozilla FirebirdDownload the Mozilla Firebird (http://www.mozilla.org/products/firebird/). The following commands untar the package and copies the files to the client's /usr/local. tar --get -z <MozillaWhatever.tar.gz mkdir /opt/ltsp/i386/usr/local/ mkdir /opt/ltsp/i386/usr/local/MozillaFirebird cp -rp MozillaFirebird/* /opt/ltsp/i386/usr/local/MozillaFirebird/ ./ltsacp -t MozillaFirebird/MozillaFirebird-bin Before running ltsacp make sure that you have all relevant libraries in your server ldd MozillaFirebird/MozillaFirebird-bin It should give something like this: libmozjs.so => not found libxpcom.so => not found libplds4.so => not found libplc4.so => not found libnspr4.so => not found libpthread.so.0 => /lib/libpthread.so.0 (0x40018000) libdl.so.2 => /lib/libdl.so.2 (0x4002c000) libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4002f000) libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x40154000) libgmodule-1.2.so.0 => /usr/lib/libgmodule-1.2.so.0 (0x40189000) libglib-1.2.so.0 => /usr/lib/libglib-1.2.so.0 (0x4018c000) libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x401af000) libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401b7000) libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401c4000) libm.so.6 => /lib/libm.so.6 (0x4029e000) libc.so.6 => /lib/libc.so.6 (0x402bf000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) The fist five libraries are in the MozillaFirebird directory. In my case I had to install GTK 1.2 library. Finally, you can run ltscp. In its output you see that some "not" files are missing. There are five of them, and these messages stand for the five Mozilla libraries which you already copied to client's /usr/local/MozillaFirebird. Window Manager (matchbox)The window manager which was used in this project was Matchbox (http://matchbox.handhelds.org/) because of its easy configurability. However, it has no timeout function (auto-logout), which makes is less lucrative in this use. Here are the configuration directives which work for 0.8.4: ./configure --disable-xft --disable-png --disable-keyboard \ --enable-standalone --x-includes=/usr/X11R6/libs/ \ --disable-ping-protocol --with-x Finally, install the matchbox binary (src/matchbox-window-manager) to the client's /usr/bin. Although all needed libraries should be at place already, you may want to check this with ldd/ltsacp as explained above. Updating LTSP's libcThe Mozilla needs later C library that is bundled in LTSP packages. The server probably has more up-to-date libc, so copy the following files to client's /lib: cp /lib/libc.so.6 /opt/ltsp/i386/lib/libc.so.6 cp /lib/ld-linux.so.2 /opt/ltsp/i386/lib/ld-linux.so.2 cp /lib/libdl.so.2 /opt/ltsp/i386/lib/libdl.so.2 MozillaFirebird profile
Updated: 10-MAR-2005
|