By: Eric Schultz
This is a quick and dirty internet kiosk tutorial. It should work rather well for most disto's.
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.
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.)
- Install your system/prereq's
- Create Your user to run as
- (Optional) add a password to the account
- Create a .xinitrc file in their home directory with the following contents:
- 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
- run the command
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.)
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:
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.