Fixing the bugs that Apple won't


In Lion, there is a single global setting for “applications reopen every document that was open the last time you launched them”. The intent is to blur the distinction between putting your computer to sleep and rebooting it, and is supposed to mesh seamlessly with the new “silently save every change you make to a document, requiring you to restore from previous versions to undo them” and “relaunch every open application on reboot” (which does not have a global on/off setting; you have to override the default every time you shut down).

In Lion, they’re poorly-tested “version 1.0” code that have caused a lot of people to revert to Snow Leopard or simply not upgrade. But Apple knows the best way for you to work, so even if the design is flawed and the implementation is broken, you’re stuck with it (much like the initially-broken-and-still-a-bit-flaky Spotlight replaced the search systems from earlier releases).

So, enter RestoreMeNot and iKluge’s login hook, which get rid of two of these annoying misfeatures. Sadly, only Apple can fix the brain damage in their autosave implementation, and they seem to be too busy pushing everyone into iCloud.

Note that the installation method for iKluge’s fix is a really bad idea, and I’ve reproduced his run-once shell script below.

#!/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