dustinrue / ControlPlane

ControlPlane - context-sensitive computing for OS X

Home Page:http://www.controlplaneapp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sierra Screensaver Password not working

wsoyka opened this issue · comments

As of Sierra the screensaver password action doesn't work anymore. (They stopped using the old Key/Domain default that they used till now)

I'm not surprised. Each version of OS X since Mavericks has made things more difficult. Unless someone can find a way to make this feature work I'm probably going to need to disable it for Sierra.

I've only managed to get it to work via gui scripting - kind of, but thats not an option for ControlPlane I believe. Sadly I've got no idea where to look for the new storage location.

I struggled with the same problem for some time. Finally I found a working solution:

  1. create a script "enablePW.sh" with the following content:
    #!/bin/sh
    defaults write com.apple.screensaver askForPassword -int 1
    defaults write com.apple.screensaver askForPasswordDelay -int 0
  2. create a script "disablePW.sh" with the following content:
    #!/bin/sh
    defaults write com.apple.screensaver askForPassword -int 0
  3. tell control plane to run the script "disablePW.sh" when entering context
  4. tell control plane to run the script "enablePW.sh" when leaving context

kudos to brandonb927 with his script at https://gist.github.com/brandonb927/3195465

Please let us know if this worked for you.

Didn't work for me. The UI changes when the script runs, but the change doesn't actually take effect. Any other ideas?

This is a difficult problem to fix because ControlPlane is tapping into some undocumented methods to control screensaver password settings. That it worked at all in the past is actually crazy. I have a feeling that newer versions of OS X require that the app requesting a change be signed properly by the proper developer, which isn't me. Future versions are going to remove this feature entirely.