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.


#!/bin/sh


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'
Post a Comment