Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question
    
I was about to post a couple-paragraph answer suggesting TInkerTool, but then I realized that was for reopening windows of apps on launching them, not reopening apps on login! Oh, well. –  timothymh Apr 12 '12 at 19:41
2  
    
possible duplicate of Uncheck "Reopen windows when logging back in" by default –  Lri Apr 14 '12 at 11:52
    
This is supposed to be natively implemented in Mountain Lion –  julien_c Apr 18 '12 at 9:29

1 Answer 1

up vote 4 down vote accepted

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:

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

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

sudo defaults delete com.apple.loginwindow LoginHook
share|improve this answer
    
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... –  動靜能量 Apr 12 '12 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 Apr 12 '12 at 21:09
1  
We appreciate the excerpt, but could you actually include the answer, in the answer? And not just a quoted teaser? –  Jason Salaz Apr 13 '12 at 4:25
    
@JasonSalaz I always like to leave my audience wanting more ;-) Added more detail from the article. –  binarybob Apr 13 '12 at 7:52
    
I really do appreciate the edit. Thank you. –  Jason Salaz Apr 13 '12 at 23:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.