#henrik

development and technology stuff

« Back to blog

Mac OS X Lion > Disable “Reopen Windows When Logging Back In”

Finally found this one. It's a script which simply does the following:

  defaults write com.apple.loginwindow LoginHook /usr/bin/loginfix.sh 

The loginfix-script has the following contents:

  #!/bin/bash
  rm /Users/*/Library/Preferences/ByHost/com.apple.loginwindow.*

To revert back to original behaviour:

  sudo defaults delete com.apple.loginwindow LoginHook