ANNOYING FEATURE: Reopen Windows When Logging Back In

Hi,


Has anybody found a solution to this little annoying feature? I think this needs to be scratched off on upcoming updates. Or at least have the option to hide it or disable it 🙂


User uploaded file

iMac, Mac OS X (10.7.2)

Posted on Feb 24, 2012 11:38 PM

Reply
2 replies

Feb 24, 2012 11:47 PM in response to RnDezVous

Yes, it is "curable". There is a simple solution using the Terminal app in your Utilities folder. Once done successfully, that box will remain checked, but the prior windows will not open.


Apple needs to make this REOPEN a System Preference, but this is just one of many improvements needed in this OS.








http://osxdaily.com/2011/08/25/disable-reopen-windows-when-logging-back-in-in-ma c-os-x-lion-completely/


Turning Off “Reopen windows when logging back in” by Making it Useless

Remember, this script disables the feature, but the dialog window will still pop up. The difference is with this script, it won’t matter if the dialog box is checked or not, windows and apps will not restore.

Paste the following into a single line within the Terminal:

curl http://goo.gl/Z4EFC -L -s -o ~/fixlogin.sh && chmod +x ~/fixlogin.sh && sudo ~/fixlogin.sh ; rm ~/fixlogin.sh

(The above text is intentionally small so that it will fit on a single line)

That command downloads a script, places it in the appropriate location, makes it executable, and then removes the temporary file. If you are wondering, the contents of the downloaded bash script are the following:

#!/bin/bash
echo "#!/bin/bash" > /tmp/loginfix.sh
echo "rm /Users/*/Library/Preferences/ByHost/com.apple.loginwindow.*" >> /tmp/loginfix.sh
mv /tmp/loginfix.sh /usr/bin/loginfix.sh
chmod +x /usr/bin/loginfix.sh
defaults write com.apple.loginwindow LoginHook /usr/bin/loginfix.sh

If you ever want to revert back to the default behavior of this OS X Lion feature, just type the following defaults write command:

sudo defaults delete com.apple.loginwindow LoginHook

And you’ll be back to be able to select window restore based on that checkbox’s choice.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

ANNOYING FEATURE: Reopen Windows When Logging Back In

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.