How to Permanently Prevent OS X 10.7 Lion from ever Re-Opening Apps After a Restart

While the latest version of Mac OS X, Lion, is generally wonderful, there is one “feature” that annoys thousands of people to no end: whenever your machine is restarted, every single application you happen to have open at the time is also relaunched and restored to the state it was in before you restarted. If you restart manually via the “Restart…” menu item, there is a checkbox you can uncheck which is supposed to shut off this behavior but it doesn’t always work. Additionally, if your computer restarts for any other reason — e.g. a power failure or a crash — you don’t even have the option of trying to prevent this behavior.

The downside of the behavior is obvious: it increases the time it takes to start up your machine into a steady state and it re-opens apps you may not be using anymore.

If you want to prevent this behavior entirely, there is now a foolproof, fully reversible way to do it. Simply:

  1. Quit all of your apps.
  2. Navigate to here: ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist (whereby * is a bunch of characters)
  3. Click the file, do a File > Get Info (or command-I if you’re a pro), and lock it using the Locked checkbox.

Voila. You’ve now prevented Lion from saving what apps and windows are open. To reverse this setting, simply unlock the file!

Another helpful hint as well: Lion, by default, hides your ~/Library/ folder. To make it visible again without showing all of your other invisible files, simply open up Terminal and type:

chflags nohidden ~/Library/

21 comments on “How to Permanently Prevent OS X 10.7 Lion from ever Re-Opening Apps After a Restart”. Leave your own?
  1. Brade says:

    Solid tip.

    Another thing any Mac user should do is install Tinker Tool straightaway:
    http://www.bresink.com/osx/TinkerTool.html

    It can help resolve many annoying issues. I use it to show hidden files, put an eject button on the menu bar, etc.

  2. AHHP says:

    I love life again :D

  3. Elisabeth Robson says:

    Thank you for this, especially the Library thing, that was driving me nuts.

  4. Devon Shaw says:

    THANK. GOD. Thank you so much.

  5. Steve Mason says:

    I may be the only person that had this issue, but after locking that .plist and a reboot iTunes would just hang on launch with no solution but to unlock the .plist and reboot again.

  6. Jay Discount says:

    That’s a pretty nuclear option for what can be much easier. This accomplishes the same effect much more safely:

    defaults write com.apple.loginwindow LoginwindowLaunchesRelaunchApps -bool false

    Source: http://www.afp548.com/article.php?story=20111006102416339

  7. Mike D. says:

    Jay: Why would you classify it as a nuclear option? It’s fully reversible, doesn’t require command-line hackery, and is just a matter of locking a preference file. Seems quite harmless to me.

    Also, on that thread you linked to, there are some people who say the command line method is not working for them, no?

  8. Bakari says:

    Hey, thanks for this. It’s one of the most annoying features Apple has ever put into an OS upgrade.

  9. Raf says:

    Brilliant! Now all we need is a way to disable Apple’s forced Autosave/Versioning…

  10. Jeff Croft says:

    I can’t for the life of me understand why you’d ever want to disable this permanently.

  11. Mel Hogan says:

    Great post Mike!

  12. rory says:

    THANKS!!

  13. Philip L says:

    Great Info. I hate it when Lion does this. One other question though is when opening an application, it seems to open all the past files that were open too. I just want to start a new file! Do you know how to stop this. Similar problem but from within the application.

  14. Doug says:

    “Another helpful hint as well: Lion, by default, hides your ~/Library/ folder. To make it visible again without showing all of your other invisible files, simply open up Terminal and type:

    chflags nohidden ~/Library/”

    OR

    Hold option and open the Go menu in the finder

  15. Eric Meyer says:

    Fittingly (or is this actual irony?), no matter how many times I mark this entry as read in my aggregator, it keeps popping back up as unread.

  16. I had the same exact frustrations with this, but fortunately Apple just fixed this in the most recent Lion update (10.7.4)! The button now remembers the most recent state (i.e., if you uncheck it, it will stay unchecked the next time the dialogue box opens).

  17. Saedi Folluf says:

    Clearly, 99% of the users do not realize that the checkmark has ABSOLUTELY NO influence on whether the system will restart every single piece of software and document after the system has CRASHED! And the fact that system will gladly relaunch you into the same state from which you crashed and possibly crash you again (if the crash is app or doc related) is the MOST IDIOTIC thing a developer on this planet has ever made a wrong decision to do. I can’t even start imagining what was Apple thinking they’re doing with this CRAP of a misguided “feature”!

  18. Mark says:

    the methods above did not, or onlypartially worked for me, I found a better way to do this.

    open up Terminal and type:

    chflags nohidden ~/Library/

    Quit all of your apps.
    Navigate to here within your home directory ie users/your user name/: ~/Library/Preferences/ByHost/com.apple.loginwindow.*.plist (whereby * is a bunch of characters)

    delete this file
    reboot computer, it will make a new file with same name

    Click the file, do a File > Get Info (or command-I if you’re a pro), and lock it using the Locked checkbox.

    this will stop all auto restarts

  19. dxo says:

    Great tip for kiosk computers I’m installing where I need to start up programs in a specific order and timing from my applescript. Apple’s way of doing things was screwing up everything.

  20. Nancy Drew says:

    I followed the instructions exactly, especially taking care to quit all applications. I still get three Sent Mail windows which open every time I restart. I also checked to make sure that Apple Mail wasn’t in the list of “Login Items”. So, this doesn’t always work either.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe by Email

... or use RSS