Sunday, May 20, 2012

Enable/Disable OS X screen lock via shell

I'm sure that I ripped this off from somewhere, but can't seem to recall from where. Apologies to whomever's work I've used but not credited.


osascript -e 'tell application "System Events"
tell security preferences
set properties to {require password to wake:true} # true = on, false = off
end tell
end tell'

No comments: