GDMKiosKMode
From K12LTSP Wiki
[[|http://terminales.hispalinux.es/tiki-index.php?page=DocumentacionPXESHowto En Espanol en Modo Kiosk o cibercafe con GDM]]
I've learnt the basics on how to do it in this site... so I contribute back with this little jewel.
With these scripts you can simulate a cybercafe or like English people call it a Kiosk mode. Each time an user logs off... all his/her data is deleted and a default account data goes into user's data.
There's one condition, though, name of the users and hostnames have to be the same. In other words... it is supposed that always the same user logs in the same computer.
Make sure that gdm is your default session manager.
<verbatim>
--- /etc/gdm/gdm.conf ---
daemon
AutomaticLoginEnable=false AutomaticLogin=/usr/bin/autologin.sh|| TimedLoginEnable=true TimedLogin=/usr/bin/autologin.sh|| TimedLoginDelay=30
security AllowRemoteAutoLogin=true -- end ---
--- /usr/bin/autologin.sh ---
#====/bin/bash
====
HOSTNAME=`echo ${DISPLAY} || cut -f1 -d: || awk -F . {' print $1 '}`
echo $HOSTNAME
exit 0
--- end ---
</verbatim>
This was from:
Mike OConnor
Service to Youth Council Inc
<verbatim>
So if you want KiosK Mode:
--- /etc/gdm/PostSession/ws001 and so on (One file per hostname)---
- ====/bin/sh ====
PATH="/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH:/bin:/usr/bin"
SESSREG=`which sessreg 2>/dev/null` if "x$SESSREG" ===== "x" ; then ==== "$SESSREG" -d -w /var/log/wtmp -u /var/run/utmp -x "$XSERVERS" -h "$REMOTEHOST" -l "$DISPLAY" "$USER" fi
- Let's delete user's data
rm -R /home/$USER
- We copy default user account
cp -a /etc/skel/. /home/$USER
- And we make sure that the user is the owner.
chown -R $USER:$USER /home/$USER exit 0
--- end ---
</verbatim>
If you have any problem with tip do not hesitate to contact me in mailto:beatlesnap@NoSpAm@go.to
