
| KDE Kiosk Mode HOWTO | ||
|---|---|---|
| Prev | ||
Some files in kdebase-2.1.1 have to be patched:
appletop_mnu.cpp.patch: Applets on the panel can be moved and removed, but the Preferences dialog is disabled.
k_mnu.cpp.patch: Run Command... and Configure Panel entries are removed from the standard K Menu
khc_man.cc.patch: Online Help is completely disabled. This would open konqueror.
konq_popupmenu.cc.patch: right-mouse menu on icons on the desktop are reduced to Cut, Copy, Paste, Delete, ... but no Open With ..., no Edit File Type... and no Poperties... dialogs.
pagerapplet.cpp.patch: on minipager selection of type (Preview, Number, Name) is disabled. this caused trouble in multihead environment.
panel.cpp.patch: right mouse menu on Panel is disabled.
#!/bin/bash
dcop kdesktop KScreensaverIface lock
|
Instead of the normal procedure, a program klogout is called, which must be found in the PATH. Create a script called klogout with the following contents:
#!/bin/bash dcop kdesktop KDesktopIface logout |
krootwm.cc.patch: klogout is executed instead of a dcop call
systemtrayapplet.cpp.patch: again call of klogout and screensaver instead of dcop calls.
workspace.cpp.patch: call of klogout instead of dcop call.
Everything else can be done with normal configuration, that is: (Configuration files can be found in $KDEDIR/share/config) Remove Trash, Templates and Autostart Icons from the desktop and disable Alt+F2 by modifying kdeglobals. Make sure the following entries exist:
[Paths] Trash=$HOME/.kde2/Trash/ Autostart=$HOME/.kde2/Autostart/ Templates=$HOME/.kde2/Templates/ Desktop=$HOME/.kde2/Desktop/ [Global Keys] Execute command= |
disable Desktop menu and tips on start. Make sure the following entry exists in kdesktoprc:
[Mouse Buttons] Right= [General] TipsOnStart=false |
#!/bin/sh KDE_MODE="restricted" export KDE_MODE |
and add to Xsession, somewhere prior to calling startkde:
if [ -f $HOME/.env.sh ]; then
. $HOME/.env.sh
fi
|
You also set the Variable KDEDIR in Xsession, after sourcing .env.sh like this:
case "$KDE_MODE" in
restricted)
KDEDIR=/usr/local/kde/restricted_kdedir
;;
*)
KDEDIR=/usr/local/kde
esac
export KDEDIR
|
bin -> ../bin cgi-bin -> ../cgi-bin etc -> ../etc lib -> ../lib share |
only share is a real directory, every other directory is a symbolic link pointing to original kdedir. /usr/local/kde/restricted_kdedir/share has the following contents:
aclocal -> ../../share/aclocal applnk apps -> ../../share/apps autostart -> ../../share/autostart config -> ../../share/config doc -> ../../share/doc fonts -> ../../share/fonts icons -> ../../share/icons locale -> ../../share/locale mimelnk -> ../../share/mimelnk services -> ../../share/services servicetypes -> ../../share/servicetypes sounds -> ../../share/sounds templates -> ../../share/templates wallpapers -> ../../share/wallpapers |
only applnk is a real directory. As a minimal requirement remove everything except:
Settings/Peripherals/mouse.desktop
Settings/LookNFeel/background.desktop
/colors.desktop
/kwinoptions.desktop
/style.desktop
/virtualdesktops.desktop
|