|
LTSP Kiosk Introduction
Basic Setup
Additional Features
Advanced Issues |
Reading PDF filesTheory of operationBasically, allowing kiosk users to access PDF documents is not a big challenge for LTSP kiosk. You have to install the necessary binaries to the client tree, set the browser to utilise the executable and off you go. Since LTSP kiosk does not have any access to the hard disk, all temporary files must be saved to the ramdisk. Obviously, the size of the ramdisk is at least a theoretical limit. To save the ramdisk space, the client should be configured so that it contains only the current PDF file and makes garbage collection (deletes the file) after the PDF rendered has ended (the user has exited the PDF reader program). This can be easily achieved by executing the PDF reader through the following wrapper script: #!/bin/sh /usr/bin/xpdf $1 rm -f $TEMP/* However, my current script is a bit more complicated, since there are two versios of xpdf: one binary with printing disabled and other with safe printing enabled (user can't change the print queue settings). #!/bin/sh . /etc/ltsp_functions PRINTER_LDP=`get_cfg PRINTER_LDP none` if [ "$PRINTER_LDP" == "" -o "$PRINTER_LDP" == "none" ]; then /usr/bin/xpdf-noprint $1 else /usr/bin/xpdf-print $1 fi rm -f $TEMP/*.pdf Some notes:
To make the browser (Firebird) to save all files to the desired directory, you have to set the TEMP variable accordingly before executing Firebird in xinitrc, e.g. export TEMP=/tmp/home/tmp_moz export TMPDIR=$TEMP /usr/local/firebird/firebird mkdir $TEMP Unfortunately, Xpdf uses another environment variable (TMPDIR) for temp directory. Thus, you have to set this as well. The LTSP default for ramdisk is 1024 kb which is not enough for storing PDF files.When increasing the ramdisk size you have to make the change to two settings:
Patch to Xpdf 3.02pl1In this project I used Xpdf, since its source is available for patching. The changes are done in XPDFViewer.cc and GlobalParams.cc files which implements the user interface.
For older patches see the xpdf directory. Compiling Xpdf RedHat 7.3 / Debian 3.0This section describes how to compile Xpdf.
Configure Xpdf with following parameters: ./configure --enable-a4-paper \ --with-freetype2-includes=/usr/include/freetype2 \ --with-t1-library \ --sysconfdir=/etc Then run make as usual. To make XPDF operarational you have to copy following libraries:
You may need to copy more libraries if you haven't installed Firebird before. To see which libraries you heed, run ldd against just-compiled Xpdf executable. The ltsacp tool helps you in this. The tool can be found from the LTSP contrib area. After you've copied all libraries to client tree, re-make the link cache: /sbin/ldconfig -r /opt/ltsp/i386 To make the binary smaller, you may want to remove the xpdf debug symbols by entering strip xpdf/xpdf Finally, copy the compiled Xpdf executable to /opt/ltsp/i386/usr/bin/ Finishing Xpdf installationXpdf needs T1 fonts to be installed (RH 7.3: urw-fonts, Debian 3.0: gsfonts). For this, you have to create a xpdfrc file to client's /etc directory. For details see Xpdf site. Don't forget to copy the fonts to client tree. I placed them into /opt/ltsp/i386/usr/share/t1fonts. Here is my /etc/xpdfrc (acquired directly from Xpdf documentation with changed path): displayFontT1 Times-Roman /usr/share/t1fonts/n021003l.pfb displayFontT1 Times-Italic /usr/share/t1fonts/n021023l.pfb displayFontT1 Times-Bold /usr/share/t1fonts/n021004l.pfb displayFontT1 Times-BoldItalic /usr/share/t1fonts/n021024l.pfb displayFontT1 Helvetica /usr/share/t1fonts/n019003l.pfb displayFontT1 Helvetica-Oblique /usr/share/t1fonts/n019023l.pfb displayFontT1 Helvetica-Bold /usr/share/t1fonts/n019004l.pfb displayFontT1 Helvetica-BoldOblique /usr/share/t1fonts/n019024l.pfb displayFontT1 Courier /usr/share/t1fonts/n022003l.pfb displayFontT1 Courier-Oblique /usr/share/t1fonts/n022023l.pfb displayFontT1 Courier-Bold /usr/share/t1fonts/n022004l.pfb displayFontT1 Courier-BoldOblique /usr/share/t1fonts/n022024l.pfb displayFontT1 Symbol /usr/share/t1fonts/s050000l.pfb displayFontT1 ZapfDingbats /usr/share/t1fonts/d050000l.pfb psFile "|/usr/bin/rlpr-kiosk"
Updated: 2-AUG-2007
|