Quick Kiosk
By: Eric Schultz
Purpose
This is a quick and dirty internet kiosk tutorial. It should work rather well for most disto's.
Back Story
I have some clients that need internet kiosks with moderatly trusted users. Think of businesses with lunchroom computers. Locking them down is not a priority, so I do NOT reccommend this config for public consumption. It should however give you the basics of creating a Kiosk on any disto.
How to do it
This is one configuration, but they all have the following requirements:
- Auto-Logon/Run X11
- Run Firefox
- Optionally run a window manager.
- Restart the whole thing if firefox closes.
Pre-requisites
For my install I'm using CentOS 5.x Not that it really matters. What you really need is:
- X11 or Xorg (an X windowing system.)
- init
- firefox
- su
- startx
Configuration
- Install your system/prereq's
- Create Your user to run as
adduser kiosk
- (Optional) add a password to the account
passwd kiosk
- Create a .xinitrc file in their home directory with the following contents:
#!/bin/sh
gnome-wm &
gnome-panel &
firefox
- edit /etc/inittab:
- Change the line that starts x (something like: x:5:respawn:/etc/X11/prefdm -nodaemon) to x:5:respawn:su kiosk -c startx
- Ensure you are configured to start in runlevel 5 (first line, something like: id:5:initdefault: )
- run the command
init 3
- run the command
init 5
That's it, basically we tell init to run "startx" as user kiosk. Then we configure the .xinitrc to run our window manager and use firefox as the shell (so it shuts down and restarts if firefox ever closes.)
Notes
If you are on a newer version of RHEL or CentOS, you may have to edit /etc/pam.d/xserver Set it to look something like:
#%PAM-1.0
auth sufficient pam_rootok.so
#auth required pam_console.so
auth sufficient pam_permit.so
account sufficient pam_permit.so
session optional pam_keyinit.so force revoke
otherwise you'll get the dreded:
Fatal server error:
PAM authentication failed, cannot start X server.
Perhaps you do not have console ownership?
Some people would rather wrap firefox in a loop like while [ 1 ]; do firefox; done
which works well if they run other programs too.
As you can see, it's easy to change browsers,window managers, and distro's for this setup.... Have fun.