Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-02-2004, 12:19 PM   #1
Registered: Sep 2003
Distribution: Woody, SuSE, RH, LAS
Posts: 55

Rep: Reputation: 15
Lightbulb Kiosk PC Project mostly done

Setup a public web access (Kiosk) PC with the idea of preventing the user from doing anything other then browse the web. Administrative modifications are done to computer mostly from remote SSH connection.

Base Software:
Mandrake 9.2 running WindowMaker.
Mozilla 1.4 (included in Mandrake) - Any version of Mozilla would probably work.

Additional Packages Installed:
vncserver & xf4vnc (remote graphical vnc monitoring)
xscreensaver (screen blanking, idle counter, hides inactivity cleanup)

Still Needs:
Better keyboard shortcut lockdown (I disconnected the keyboard altogether)
Easy ways to reset the computer remotely, easy enough that the receptionist can do it.

This setup is designed for one PC only. If I had been doing 4 or 5 terminals, I think I would have gone for a remote server with readonly NFS mounts and whatnot.

Modified Config files:


Section "ServerFlags"
    DontZap # disable <Crtl><Alt><BS> (server abort)
    DontZoom # disable <Crtl><Alt><KP_+>/<KP_-> (resolution switching)
    AllowMouseOpenFail # allows the server to start up even if the mouse doesn't work


Section "InputDevice"
    Identifier "Mouse1"
    Driver "mouse"
    Option "Protocol" "IMPS/2"
    Option "Device" "/dev/psaux"
#    Option "ZAxisMapping" "4 5" #comment out anything above button 1
    Option "Buttons" "1"	#Buttons = 1 means no right click

NOTE -- xf4vnc made additional changes to the XF86Config-4 file that will 
not be documented here.





NOTE -- I made as many changes as possible within the graphical WPrefs 
applet of WindowMaker and worked from there to continue locking it down.
Most changes are documented here.



xset m 20/10 4
xscreensaver -nosplash &		# -nosplash hides the config popup option
					# Xscreensaver used later to monitor inactivity
/home/guest/scripts/ &	# loads mozilla in a constant loop
/home/guest/scripts/ &	# watches screensaver
					# without ampersands (&) windowmaker will lock up



  LowerKey = None;
  DisableDock = YES;			#important
  WindowShortcut10Key = None;
  MiniaturizeKey = None;
  ScreenNextSwitchKey = None;
  WindowMenuKey = None;
  HideOthersKey = "Control+Mod2+Q";	#quick way to override Mozilla Quit
  NextWorkspaceKey = None;
  WorkspaceBorder = None;
  WindowShortcut8Key = None;
  WindowShortcut9Key = None;
  Workspace10Key = None;
  RaiseKey = None;
  HideKey = None;
  PrevWorkspaceKey = None;
  CloseKey = None;
  FocusNextKey = None;
  WindowShortcut1Key = None;
  WindowShortcut2Key = None;
  WindowShortcut3Key = None;
  WindowShortcut4Key = None;
  WindowShortcut5Key = None;
  MaximizeKey = "Mod2+F11";		#quick way to override Mozilla fullscreen
  WindowShortcut6Key = None;
  RootMenuKey = None;
  WindowShortcut7Key = None;
  ScreenPrevSwitchKey = None;
  WorkspaceBorderSize = 0;
  Workspace7Key = None;
  VMaximizeKey = "Mod2+F9";		#quick way to override Mozilla sidebar
  Workspace6Key = None;
  Workspace5Key = None;
  Workspace4Key = None;
  Workspace3Key = None;
  Workspace2Key = None;
  FocusPrevKey = None;
  Workspace1Key = None;
  WindowListKey = None;
  Workspace9Key = None;
  Workspace8Key = None;
  HMaximizeKey = "Control+Mod2+H";	#quick way to override Mozilla history



  "mozilla-bin.Mozilla-bin" = {
    NoResizebar = Yes;
    NoBorder = Yes;
    KeepOnTop = Yes;
    NoCloseButton = Yes;
    NoTitlebar = Yes;
    NoMiniaturizeButton = Yes;
    StartMaximized = Yes;



menubar { display: none !important }
//disables menubar



user_pref("browser.history_expire_days", 1);
user_pref("browser.startup.homepage", "");

NOTE -- Mozilla will never overwrite user.js. Modifications made in prefs.js 
can/will be overwritten especially while the browser is running. user.js 
overrides if it exists. I'm sure there are numerous options that could be 
added here.



#! /bin/sh
while [ 1=1 ]
        mozilla -width 1024 -height 768

#if the user somehow figures out how to close/crash mozilla, it opens again 
in an infinite loop. Every time it opens, it reloads user.js. The mozkill script 
relies on this this loop, since it kills Mozilla just for it to open again fresh.



#! /bin/sh
sleep 10
echo `date` > ${LOGFILE}			#reset log every startup
xscreensaver-command -watch >> ${LOGFILE}	#outputs BLANK and UNBLANK events


/home/guest/scripts/log/xscreenwatch.log -- Sample output

Thu Sep 2 11:32:21 EDT 2004
BLANK Thu Sep  2 11:42:15 2004
RUN 52
MozKill Thu Sep  2 11:45:00 EDT 2004


/root/scripts/ -- Runs every 5 minutes from root's crontab

COUNT=1 #only look at $COUNT of end of log with tail -$COUNT ${LOGFILE}

while [ $COUNT -lt 20 ]	#loop till we find something, or go overboard
        if [ "`tail -$COUNT ${LOGFILE} | grep ^MozKill`" > /dev/null ]
        then		#if last action was kill, don't kill again
                exit 0
        if [ "`tail -$COUNT ${LOGFILE} | grep ^UNBLANK`" > /dev/null ]
        then		#if last action was activity, computer being used
                exit 0
        if [ "`tail -$COUNT ${LOGFILE} | grep ^BLANK`" > /dev/null ]
        then		#if it just recently blanked, kill Moz, flag log so we don't kill again
                killall mozilla-bin
                echo "MozKill `date`" >> ${LOGFILE}
                exit 0
        ((COUNT = COUNT + 1)) #if log file does not match one of the above 3 options
			#then go around again, viewing one more line of log
			#this takes into account for "RUN" output of screen-watch
exit 0



25 17 * * * root init 0				#shutdown 5 minutes before closing time
25 23 * * * root init 0				#shutdown again later, just incase
*/5 * * * * root /root/scripts/ &	#every 5 mins run

It is recommended that you delete all xterminals. WPrefs is also something that needs removal of some sort. I chmod'ed them so only root could use them, but only until I knew I was done making changes.

If you only want users viewing a page thats already on a local web server, delete the default gateway and add a line in /etc/hosts to your local web server so that your homepage loads, and nothing else. Without a nameserver entry or a default gateway, the user is really limited.

The cd drive and floppy drive were removed. If this PC would decide to work with WOL, I would physically disable the power button too. The bios has a password, and grub has a timeout of nothing. The guest user has no password, and no login shell.

There is a Kiosk howto out there somewhere that recommends an fstab like this:
/dev/hda1 / ext2 defaults 1 1
/dev/hda5 /var ext2 defaults 1 2
/dev/hda6 /tmp ext2 defaults 1 2
/dev/hda7 /usr ext2 defaults 1 2
/dev/hda8 swap swap defaults 0 0
I may switch my hda1 to read only if I decide the PC is exactly the way I want it. That may be a bit excessive though based on the use of this computer.

This project will never be "done". I guarantee there are improvements that myself and other people could make. I hope this linux kiosk mozilla mini howto helps someone reduce the amount of time they may spend on a similar project. Most of this info I found on the web somewhere, with the exception of the scripts. Thanks to the guys at Mozillazine for answering the little things. Nothing spectacular, but it works. I am posting it here for the benifit of others as well as so I don't loose it.

If you use it or add to it, go ahead and post about it. Enjoy.
Old 09-02-2004, 12:21 PM   #2
Registered: Sep 2003
Distribution: Woody, SuSE, RH, LAS
Posts: 55

Original Poster
Rep: Reputation: 15
Ack. Sorry that code is all so hard to read in the small column. I guess copy pasting it into a separate doc would be recommended.
Old 12-30-2004, 09:01 AM   #3
Registered: Sep 2003
Distribution: Woody, SuSE, RH, LAS
Posts: 55

Original Poster
Rep: Reputation: 15
Better late then never. Here are some resources I used. -- Invaluable ins and outs of windowmaker. -- Good script ideas, overall an impressive setup to allow that many programs open and still keep a useable system. -- Linux web browser station (formerly "The Linux Public Web Browser mini-HOWTO") includes the fstab & partitioning idea, among a lot of other good info.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
kiosk booting? rbonafied Mandriva 2 03-04-2006 10:53 AM
Kiosk linux colinstu Linux - Software 2 06-16-2005 10:04 AM
Kiosk Setup yaseenlambe Linux - Software 6 12-08-2004 10:37 PM
Building a Kiosk mysticpain Linux - General 6 05-29-2004 05:43 PM
Beginning a big project - Need an Good Project Manager gamehack Programming 3 01-15-2004 12:49 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration