Tell me more ×
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 a way for a script (either bash or AppleScript, doesn't matter) to detect whether the state of either the screen or the user login session is locked or not (i.e. the user will need to type in its credential to get back to her/his session).

This is different than detecting whether screen saver is on, which is already answered in http://stackoverflow.com/questions/1390123/, as active screen saver is not always the same as locked session.

Do you have any suggestion? Thanks!

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.