On Friday 30 August 2002 00:33, Peter Billson wrote: > > => how (if at all) can I find out if the screensaver is running (i.e. > > visible) on an X-terminal? > > > > If I can find this out, then I will have the screensaver detect > > inactivity, and then I will peek at the screensaver every once in a > > while, so I can terminate the session. > > Ahh, that I can help you with! > > xscreensaver-command -display ws101:0 -time > > (That is where ws101 is your workstations name) > > This will return either when it has been blanked (screensaver on) or > non-blanked. > > BTW- I do have a little script that I wrote that I run in a library set > up. It runs from from cron every minute and checks for blanked screens > and then "cleans up" the workstation by killing the different programs > that may be running (Mozilla, OpenOffice, etc.). Let me know if anyone > wants it. > > Now that I think of it, it would probably be easy enough to add a > little time calculator and just kill the whole X session, which would > log out the user and reset the workstation.
Thank you, Pete! (Guess what; while eagerly waiting for you to come up with a solution, I just could not resist and RTFM'd around myself a little bit.......to come up with exactly the same solution!) Now in order to kill the session, I think I will follow this approach: => use the ".xsession" file to start my windowmanager (icewm) in the background (so I won't exec to it). => at the end of the .xsession file put a loop where I go to sleep for, say, 15 minutes, and then check if the screensaver is active; if so I simply exit from .xsession; else I go to sleep again, etc. For my application, this seems like an elegant way to get things done. Any better ideas? Z. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.openprojects.net