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:

Pre-requisites

For my install I'm using CentOS 5.x Not that it really matters. What you really need is:

Configuration

  1. Install your system/prereq's
  2. Create Your user to run as adduser kiosk
  3. (Optional) add a password to the account passwd kiosk
  4. Create a .xinitrc file in their home directory with the following contents:
    #!/bin/sh
    
    gnome-wm &
    gnome-panel &
    
    firefox
    
  5. edit /etc/inittab:
  6. run the command init 3
  7. 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.