Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I am looking for information on either an app or script that logs off an account after a certain number of minutes. I know this can be done by default after X amount of inactivity. However, I am using a Mac as "Quick Print" Station and wish to run some sort of program to log the user out the computer whether they are active or not. Does someone have any knowledge of scripts or programs that enables a person to do this?

Thanks in advance!

The computer is running Snow Leopard OSX.

share|improve this question
add comment

2 Answers

You could try using an Apple Script, something like;

tell application "System Events"
    log out
end tell

Then schedule it using launchd. I've used this as a nice GUI front-end to launchd in the past;

http://www.peterborgapps.com/lingon/

launchd can be a little frustrating to use as you have be very exact with your syntax and naming, however if you don't want to spring the $5 for Lingon, there is a Ruby Gem on GitHub I found called lunchy

https://github.com/mperham/lunchy

The downside with this is that you're running to a schedule rather than only running the script when a user has logged in.

share|improve this answer
add comment

It would be trivial to write a cocoa app which you could add to the launch items.

In fact I just did. This app will ask the computer to logout after 60 seconds.

http://diggory.net/Grazing/Auto%20logout.zip

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.