[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: KDE Auto logout / Reset

Le dimanche 9 juillet 2006 17:45, Hagakure <hagakure@nildram.co.uk> a écrit :
> Hi,
> I'm looking for a way to automatically log a user out and the reset of
> a kiosk based system. (am using Debian Etch)
> I'm looking for any pointers/suggestions on how to do this.
> My guess is to find the trigger for the screensaver and use that plus
> a script to reset the desktop? But from previous experience, there's a
> ready make simple solution :)

You may want to look at the dcop "--user" and "--session" switches 
and to the command "dcop ksmserver ksmserver logout".
I use the following script as ACPI shutdown button handler :
# /etc/acpi/powerbtn.sh
# Initiates a shutdown when the power putton has been
# pressed.

# If powersaved is running, let it process the acpi event
if pidof powersaved; then
    exit 0

if ps -Af | grep -q '[k]desktop' && test -f /usr/bin/dcop
    dcop --all-sessions --all-users ksmserver ksmserver logout 0 2 0 && exit 0
    /sbin/shutdown -h now "Power button pressed"

Hope, it helps.

Reply to: