[Kde-kiosk] Idle Logout

Peter kde-kiosk@mail.kde.org
Wed, 11 Dec 2002 10:24:59 +0100


Hello again

Dan Brough writes:
 > On Tue, 10 Dec 2002 23:21, Peter wrote:
 > > Hello,
 > >
 > > Dan Brough writes:
 > >  > On Tue, 10 Dec 2002 18:53, Ian White wrote:
 > >  > > Has anybody found a way of forcing a user to logout after a specified
 > >  > > amount of idle time? Everybody using these terminals will have to log
 > >  > > in for usage tracking, etc. so I don't want people using somebody
 > >  > > elses abandoned login.
 > >  >
 > >  > Heres my naff way of doing it...
 > >  >
 > >  > running,
 > >  >
 > >  > "dcop kdesktop KScreensaverIface isBlanked"
 > >  >
 > >  > tells you whether the screensaver is on (or the screen has been locked).
 > >  >
 > >  > "dcop kdesktop KDesktopIface logout"
 > >  >
 > >  > will logout the current user.
 > >
 > > this will first ask the user the question, will it not?
 > >
 > 
 > 
 > If you have the "confirm logout" session preference set, then, yes.
 > otherwise ,"dcop ksmserver ksmserver   logout 0 0 0"  will log the user out,
 > overriding the confirm dialog, also...
 > "dcop "ksmserver ksmserver logout 0 1 1"
 > will reboot the machine.

yes, I recognized when it was too late... :-/

 > 
 > Does anyone know where these mysterious dcop options are documented?

I am afraid, you need to have a look in the sources...

[snip]

 > 
 > I found one,
 > Its the xscreensaver program from http://www.jwz.org/xscreensaver/,
 > (or the x11-misc/xscreensaver gentoo package).
 > I added the line 
 > -				dcop ksmserver ksmserver   logout 0 0 0     \n\
 > 
 > to my .xscreensaver file, which gives me a new xscreensaver "Dcop" that I can 
 > select in the xscreensaver preferences.
 > 

hm, I more thought of using the kde screensaver setup, like this:

put in kdesktoprc the section:

[ScreenSaver]
Enabled=true
Lock=true
Priority=19
Saver=mylogout.desktop
Timeout=7200

and create a mylogout.desktop file under
$KDEDIRS/share/applnk/System/ScreenSavers containing:

[Desktop Entry]
Exec=dcop ksmserver logout 0 0 0

there may be more neccessary haven't tested it.  But should work,
shouldn't it?  Look at the other screensaver.dekstop files for
examples.

	  Peter

-- 
Peter Kruse <pk@q-leap.com>
Q-Leap Networks GmbH
+497071-703171