Installation manual

5. 13. tpb (ThinkPad Buttons) 41
if [ −x $MOZILLA_HOME/bin/mozilla ]; then
exec $MOZILLA_HOME/bin/mozilla "$@"
else
echo "$MOZILLA_HOME/bin/mozilla not found."
exit 1
exit 1
5. 13. tpb (ThinkPad Buttons)
tpb is a cleverprogram, which analyses the content of the NVRAM to monitor the volume and brightness set-
tings, thinklight and manythings more. It also lets us attach a shell command to the <ThinkPad> key.Towrite
the information to blend the status informations into the screen tpb uses xosd.
An antiquated version of xosd exists as a Debian package. The latest version has, however, a few interesting fea-
tures, which makeitworthwhile to compile and install it manually.tpb does not exist as an official Debian pack-
age (yet), but we could easily build one from the tar-ball. Since we want to modify the source code, we prefer to
stowthis package manually.
The reason for our modification is that tpb segfaults, if we try to use a non-existent font for displaying. tpb sets
-*-lucidatypewriter-medium-r-normal-*-*-250-*-*-*-*-*-* as the default fall-back font. Neither is this font guar-
anteed to exist nor does tpb check its availability.Weshould therefore change the default font in cfg.h to 10x20.
If we stowtpb, we must either set an alias or write a shell script to teach tpb the location of its default configura-
tion file, which in our case is /usr/local/etc/tpbrc.
Compiling and Installing xosd:
#> cd /usr/local/packages
#> mkdir −p xosd−2.0.1/src
#> cd xosd−2.0.1/src
#> wget http://www.ignavus.net/xosd−2.0.1.tar.gz
#> tar xzf xosd−2.0.1.tar.gz
#> cd xosd−2.0.1
#> configure −−prefix=/usr/local/packages/xosd−2.0.1
#> make
#> make install
#> cd ..
#> rm −rf xosd−2.0.1
#> cd /usr/local/stow
#> ln −s ../packages/xosd−2.0.1 .
#> stow −v xosd−2.0.1
Moficiation of cfg.h:
/** #define DEFAULT_OSDFONT "−*−lucidatypewriter−medium−r−normal−*−*−250−*−*−*−*−*−*" **/
#define DEFAULT_OSDFONT "10x20"
Compiling and Installing tpb:
#> mknod /dev/nvram c 10 144
#> cd /usr/local/packages/
#> mkdir −p tpb−0.4.1/src
#> cd tpb−0.4.1/src
#> wget http://www.savannah.nongnu.org/download/tpb/tpb−0.4.1.tar.gz
#> tar xzf tpb−0.4.1.tar.gz
#> cd tpb−0.4.1
#> ./configure −−prefix=/usr/local/packages/tpb−0.4.1
#> make
#> make install
#> cd ..
#> rm −rf tpb−0.4.1
#> cd ../bin