Inactivity Scripts?

Posted:
in macOS edited January 2014
Anyone have or know of any OS X inactivity scripts?



I need it to do 1 of 2 things:



2) Log a user out using OS X's Fast User Switching (with a 3rd party app).



OR



1) execute an app when a Mac becomes idle (an app like FUSkey, which can log a user out using Fast User Switching, and not kill any open files, etc).





I need to trigger it after x minutes of inactivity (as opposed to running a screen saver, etc). Im trying to force Macs to be logged out and secure during lunch breaks, etc. Cant quite do it with the Screen Saver Pane. (See other posts)

Comments

  • Reply 1 of 1
    Quote:

    Originally posted by dstranathan

    Anyone have or know of any OS X inactivity scripts?



    I need it to do 1 of 2 things:



    2) Log a user out using OS X's Fast User Switching (with a 3rd party app).



    OR



    1) execute an app when a Mac becomes idle (an app like FUSkey, which can log a user out using Fast User Switching, and not kill any open files, etc).





    I need to trigger it after x minutes of inactivity (as opposed to running a screen saver, etc). Im trying to force Macs to be logged out and secure during lunch breaks, etc. Cant quite do it with the Screen Saver Pane. (See other posts)




    That's something I once did on Linux using a very very nasty implementation of it : i wrote a shell script that fingered you every minute (using the "finger -s <your login>" command) and extracted the idle time. If the idle time was greater than 5 minutes, then i launched xlock (that app freezes X11 until you enter your password). This had the advantage to be very easy to write and to run on virtually every UNIX... that works on Mac OS X too, but that's not very elegant, that uses polling which is bad, and that imposes X11 to run all the time. Plus I'm not sure it works better than the Screen Saver pane solution... anyway you can customize it to launch apps during idle time...



    Anyway, I think that on Mac OS X, you can do it in a lot more elegant way : try to look at the developers documentation, maybe you'll find something.
Sign In or Register to comment.