#!/bin/sh
#
# /etc/gdm/Sessions/Kiosk
# Copyright 2002-2003 Jonas Smedegaard <dr@jones.dk>
#
# $Id: Kiosk,v 1.3 2003-01-24 00:07:06 jonas Exp $
#
# Run a guest web-only environment
# For kiosk use...
#
# Requirements: oroborus, light
#
# Limitations:
#  * Cannot handle multiple logins to same account
#    (a limitation of mozilla-based browsers)
#  * This file must be copied to /etc/gdm/Sessions/Kiosk
#    (symlinks are ignored by GDM)

cp -f /etc/local-COMMON/X11/oroborus/kiosk.oroborusrc $HOME/.oroborusrc
/usr/bin/oroborus &

mkdir -p $HOME/.light
cp -f /etc/local-COMMON/X11/light/prefs-kiosk.js $HOME/.light/prefs.js

if [ -x /usr/bin/xscreensaver ]; then
	/usr/bin/xscreensaver-command -exit
	/usr/bin/xscreensaver -no-capture-stderr -no-splash &
fi

# run forever...
# (until GDM hopefully one day supports remote auto-login)
while true; do
	/usr/bin/light http://kiosk/
done