Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I've tried:

defaults -currentHost write com.apple.screensaver askForPasswordDelay -int 3600

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

defaults write com.apple.screensaver 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 com.apple.screensaver.plist, 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

Your Answer


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.