7
2
There's an option in the preference panel to change the time the mac is able to be in sleep/screensaver before requiring a password to be unlocked again.
I'm using OS X Lion 10.7.
Is there any way to change this setting using the terminal or an applescript? I tried to change the plist file using:
defaults write com.apple.screensaver askForPasswordDelay -int 60
also tried
defaults write com.apple.screensaver askForPasswordDelay -float 60
also completely disabling the password didnt work either
defaults write com.apple.screensaver askForPassword -int 0
The plist file was changed, but it had no effects at all. It's the same plist file that gets changed when manually switching the setting in the preferences.
Would be awesome if anyone got an idea how to fix my problem.
EDIT: also tried to: 1) add -currentHost flag 2) drop the -int / -float
Maybe deleting the lockfile would help. I'm not exactly sure what the lockfile's are but I haven't seen them before. – Vervious – 2011-07-22T05:08:57.033
Tried deleting the .lockfile too (also the .lockfile in /ByHost). Didn't change anything, still not working. – desbo – 2011-07-22T11:14:56.607
possible duplicate of Change Mac "Ask for password after screensaver" delay
– Daniel Beck – 2011-07-24T19:20:06.453thanks for the link, already checked that one though. running snow leopard the seems to have worked. sadly it won't work on lion (at least for me) – desbo – 2011-07-24T22:30:20.770
It's not at all an answer, but I've given up on trying to cope with changing settings under these security settings (perhaps Apple intentionally makes it hard to disable this - security by obsfucation and constant change). I just use FastScripts/AutoMator to instantly lock the screen by calling
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
– bmike – 2011-09-21T16:24:42.880