On Mac OS X Lion, whenever the computer is to be turned off or restarted, the default is that "Open all apps" again after the next start up, and the user has to "uncheck" the box so that the apps won't run automatically.

But every time, I have to uncheck that box. Is there a way to default to not to run those apps next time?


1 Answer 1


This OSXDaily article Disable “Reopen Windows When Logging Back In” in Mac OS X Lion Completely describes a method of doing this.

You may have noticed that when you log out or reboot Mac OS X Lion, you get a dialog window with a checkbox next to “Reopen windows when logging back in” that restores all of your currently open applications and windows.

If you don’t like it and you’re tired of unchecking the box to no longer reopen the windows, you can use a third party script to render the feature useless. To clarify, what this does is disable the feature completely on a constant basis, regardless of whether that checkbox to preserve windows is checked or not, the windows will not restore.

Type the following command to download the script, place it in the appropriate location, make it executable, run it, then remove it:

curl http://goo.gl/Z4EFC -L -s -o ~/fixlogin.sh && md5 -q ~/fixlogin.sh | xargs -I % mv ~/fixlogin.sh ~/%.sh && chmod +x ~/121dca51e66073624da420b6e1be61d9.sh && sudo ~/121dca51e66073624da420b6e1be61d9.sh ; rm ~/121dca51e66073624da420b6e1be61d9.sh

The content of the script is for those who want to know what's being executed and/or do it manually is:

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

Finally, if you want to go back to normal resume behaviour type:

sudo defaults delete com.apple.loginwindow LoginHook
  • if a low level tweak is needed, then hopefully it won't have any side effect... if Apple has a standard way such as in the System Preferences, that might be best... Commented Apr 12, 2012 at 20:59
  • @動靜能量 I completely agree, it does seem a bit extreme. But I'm not sure there is another way. The article I linked to also describes ways of disabling windows within apps restoring, but not the windows themselves.
    – binarybob
    Commented Apr 12, 2012 at 21:09
  • 1
    We appreciate the excerpt, but could you actually include the answer, in the answer? And not just a quoted teaser? Commented Apr 13, 2012 at 4:25
  • @JasonSalaz I always like to leave my audience wanting more ;-) Added more detail from the article.
    – binarybob
    Commented Apr 13, 2012 at 7:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .