PDA

View Full Version : Automatically log off inactive user (Xwindows)


Whip-lash
31st January 2005, 05:35 AM
I'm usually able to search around for things like this, but nothing seemed to answer my question.

I'm looking for a way to automatically force a user to log off of X after a period of inactivity. I know about setting this for various shells, however this is for Xwindows. I can't seem to find anything that really handles this. The only thing I found was something called idled (http://www.darkwing.com/idled/), but it doesn't seem to be maintained anymore (and doesn't seem to apply to this scenario).

I'm thinking about something similar to a Windows (*ducks away from incoming flames*), and a group policy setting that will automatically force the user to logoff after a definable number of minutes after the screensaver kicks off (I don't have the actual details on it, however I'll post it once I find it and if someone requests it). Something where when Xscreensaver kicks off, instead of the option to lock after a few minutes, to log the user out.

Users are leaving applications, web browsers, chat sessions, etc. open and just leaving. If this were their personal computers, I wouldn't normally have a problem. However these are semi-public machines, which multiple people use when what they want to do is not allow on the company network (chat, surf non-work related sites, etc.).

Has anyone else had experience with this situation? Any recommendations?

Thanks in advance! :)

vinu
31st January 2005, 11:32 AM
I'd searched for a utility to log off inactive users on X a few months ago and didn't come up with anything satisfactory either...

ghenry
3rd February 2005, 09:38 AM

Can't think of anything off the top of my head.

james_in_denver
3rd February 2005, 07:19 PM
Well, I haven't looked into it a TON, but it seems like there should be a way to use "xscreensaver" to run a script that will kill the Xwindows session. Then just set that "script" as the screensaver and voila, instant logout.

The problem I see with this is if a user has unsaved work on their desktop.

kosmosik
3rd February 2005, 07:27 PM
http://freshmeat.net/projects/xautolock/
About:
Xautolock monitors console activity under the X window system, and fires up a program of your choice if nothing happens during a user configurable period of time. You can use this to automatically start up a screen locker in case you tend to forget to do so manually before having a coffee break.
you can set it tu just kill your X session after some peroid of time...

Whip-lash
4th February 2005, 07:06 PM
Ah, okay. :D This might do the trick. Once I can get people off one of the machines I'll try it out. I'll post my notes here in case anyone wants them.

Also, I found some precompiled RPMs for xautolock in the DAG and DRIES repositories:
http://dag.wieers.com/packages/xautolock/
http://dries.studentenweb.org/apt/packages/xautolock/info.html

arc2v
8th February 2005, 08:28 PM
Yes, please let us know if this works. I've run a Linux lab for four years now and this has been a problem the whole time.

We basically made it policy not to lock for 15 minutes or more, but that ended up making me be the bad guy and force people off. grr.

a