Yea, this is the worst idea I've seen, especially with Lion's inherent instability issues. My regular workflow, which seems to take place at least once, sometimes three or more times a day:
- System starts to get boggy, and I notice a few apps (Finder usually the real kicker) stop responding.
- Attempt to reboot... baby sit, often have to force reboot.
- At login, as many as 10 apps restart, reload window configurations, and start doing exactly what it was that led to the system starting to bog down and freeze up...
- After waiting 1-3 minutes for login to finish, I quit all the apps that I don't need anymore.
Godawful stupid idea... When did Apple start hiring all the Microsoft programmers, huh?
Anyhow, I found this over on MacRumors, and it seems like a pretty decent way to prevent this idiotic behavior without being a "hack" per-se. Note this is the same reference posted above, but with more detail so you can read about it and understand better:
Link: http://osxdaily.com/2011/08/25/disable-reopen-windows-when-logging-back-in-in-ma c-os-x-lion-completely/
Meat of the article reproduced here:
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.