Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change my Mac OS X Snow Leopard "Ask for password after screensaver" delay?

I've tried:

defaults -currentHost write askForPasswordDelay -int 3600

but won't work. I want to do this through Terminal or AppleScript.

share|improve this question
up vote 2 down vote accepted

defaults write askForPasswordDelay -int 3600

Works for me -- it'll show up as "1 hour" in the preference pane, while 14400 will be "4 hours". You need to consider that the selection in System Preferences uses hard-coded selection values, and always uses the next higher value: 61 seconds will show as 5 minutes.

share|improve this answer
Thanks, the problem was -currentHost. – Fábio Perez Mar 11 '11 at 22:57
Only two files get written by System Preferences when changing the value in there: One is, the other is the host-specific counterpart in the ByHost directory, that contains only settings such as the idle time for the screensaver. – Daniel Beck Mar 11 '11 at 22:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .