[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 :
#!/bin/sh
# /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
fi

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


Hope, it helps.
Olivier



Reply to: