(August 2004)
For a charity exhibit at an upcoming trade show, the idea of a PC and a copy of the charity website was suggested, and sounded good. This has now been built … but not used in practice! I'll update when it has :-)
The website will be stored on a local (read-only) partition of the hard-drive. The browser is Opera, in kiosk mode (it could have been Firefox, I'm lead to believe). This requires X … but doesn't require a window manager :-)
The PC has a 15Gb HDD, partitioned as :- 32Mb /boot hda1 512Mb swap hda2 2Gb / hda5 512Mb /var hda6 1Gb /home hda7
The remainder is unused.
GDM has been asked to autologin the kiosk user on startup, as well as by a timed login (in case the user session quits somehow). The kiosk user invokes Opera from the ~/.Xsession file. I originally installed all the gnome desktop stuff so I could have an ordinary login environment to test GDM's autologin in. Given that I'm no longer running the gnome desktop, this could be removed. Next time I won't put it in!
Snippets from GDM.conf :-
[daemon] AutomaticLoginEnable=true AutomaticLogin=kiosk TimedLoginEnable=true TimedLogin=kiosk TimedLoginDelay=5
Note that these changes can be made from the GDM GUI when you first install it, if you prefer. Good stuff!
Opera is being called with -kioskmode, which runs full screen and allows a whole host of other restrictions to be placed. Note that this mode requires a registered version of Opera. Because this kiosk is for a charity event, I've applied to Opera for a donated license. In the meantime, I bought a real license – I use the ad-sponsored version of Opera every day, and would re-use this license on my desktop when the kiosk machine is de-commissioned.
Opera provide documentation about kiosk mode, which is a start, but unless you appreciate the exact meaning of everything they're talking about, you'll end up trying things and experimenting like I did.
Before restricting Opera with -kioskmode, I did some customisation – edited the buttonbar to simplify the navigation (Home, Back, Forward, Reload, Find, CSS Mode, Image load, View Zoom), enabled scrollbars. I switched off all the other toolbars, then exited with the keyboard option Ctrl Q. The kiosk invocation means that these changes can't be undone.
Also, I need to switch off the screen-blanking that X provides, or else people might think that the kiosk is switched off. The xset command will do this … although some BIOSs will power-down the display as well, so double-check in there as well.
My current invocation in ~/.Xsession is … (the last 5 lines all folded onto one line, of course)
/usr/bin/X11/xset -dpms
/usr/bin/X11/xset s off
/usr/bin/opera -kioskmode -kioskresetstation
-nochangebuttons -nochangefullscreen -nocontextmenu -nohotlist -nomaillinks -nominmaxbuttons
-nodownload -noexit -noprint -nosave
-nosplash -nosysmenu
file:///home/kiosk/wwwsitecopy/index.html
The interesting added bits from the ~/.opera/opera6.ini file are :-
[User Prefs] Home URL=file///home/kiosk/wwwsitecopy/index.html Prioritize excludelist=0 [Special] Go Home Time Out=300 [include] file:///home/kiosk/wwwsitecopy/* [exclude] *
The website for this kiosk is a set of static HTML files, snarfed from the original website with wget -rkl. In reality, you have to be much more careful with a stand-alone site, editing out external links, mailto's and submission forms.
In order to control the machine you need to plug in the keyboard, and switch to a text console (ctrl-alt-F1−6?), then log in as someone … either the kiosk user for changes to the Opera environment, or root for changes to GDM and the system.
Killing the current Opera process (killall opera) will cause GDM to autologin the kiosk user – admittedly with a 5 second delay during which time someone can interact with the GDM Greeter, only to discover that there are no other available users – and restart Opera, reading whatever config file changes have been made.
Stopping GDM (/etc/init.d/gdm stop) will free up the X console so you can run startx and get the default desktop back (assuming that it's even been installed) but frankly that's not very useful.
It's not a special PC (K6−450) but the time from “kiosk to reset button to kiosk” is 1 minute. This is pretty good :-) Every 5 minutes of idleness Opera times out and reloads the home page. If you close the window with Ctrl W the home page will reload. If you manage to crash Opera completely, GDM will reload Opera, and it will go back to the home page. Power-cycle? Home page.
The only thing I'm not happy with is the fact that when Opera initially loads, the page is rendered full-screen, but if you close the window, the new one opens up with the navigation buttonbar at the top. I'd like this buttonbar to be there all the time …