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.

I have to restart my Mac all the time because I'm using Boot Camp and switching in between Windows 8 and OS X. Every time I restart and come back to OS X, my screen gets flooded with open windows, every thing from Firefox to text editors. Is there any way to set it up so that there are no open windows upon restart?

share|improve this question
    
I've added an answer to disable this function on a permanent basis. Current answers require you to click the checkbox on every shutdown. –  gentmatt Mar 20 '12 at 8:15
add comment

3 Answers 3

up vote 9 down vote accepted

When you go to shutdown/restart, unclick the check box to disable the resume feature, which is likely what is opening all these windows (that were present upon shutdown).

enter image description here

If this doesn't do it, check that these applications are not in your user start up list.

enter image description here

share|improve this answer
add comment

Disable Resume on login permanently

What you are experiencing are the benefits of working with Resume. A feature introduced with Mac OS X Lion to restore windows upon next launch or login.

enter image description here

Unchecking the box does not have a permanent effect. This can be achieved by manual tweaking.

Open the Terminal and enter:

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

This command downloads the following script and fully installs it:

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

Et voilà, you are done!

If you want to revert to the default behavior of Resume in lion, type this.

sudo defaults delete com.apple.loginwindow LoginHook

Disable Resume when launching apps

You can also disable Resume for applications on a per app basis. See these answers here.

share|improve this answer
1  
+1, but I suggest you include the source for that script in your answer. The thought of executing a script sight-unseen and downloaded from a shortened link makes me nervous :-) –  Chris W. Rea Mar 20 '12 at 13:57
    
@ChrisW.Rea No problem. I've edited my post :) –  gentmatt Mar 20 '12 at 14:05
    
Is there a way to get this script working for network user accounts? –  user43944 Feb 27 '13 at 15:08
1  
@GeertHuylebroeck If you want, that might make a great full question on the site - just link back to here, explain you want to craft this script for another use and explain what's failing. Our guides on How to Ask and tour should help. –  bmike Feb 27 '13 at 15:50
add comment

You have two choices. You can choose that your applications not resume their previous state when you shutdown or restart the Mac by deselecting the checkbox that appears prior to shutdown:

image of Shutdown Dialog box

Or you can navigate to the General pane in System Preferences and deselect the Restore windows when quitting and re-opening apps option. However, if you do this, applications will never resume their previous state, even when quit and restarted during a single boot session.

image of General Preferences Pane

share|improve this answer
    
The "Restore windows when quitting and re-opening apps" option is not available in Mountain Lion (10.8.2). Has that been moved elsewhere? –  alex Mar 21 '13 at 11:03
add comment

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.