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/

Like this entry? You can follow me on Twitter here, subscribe via email here, or get the RSS feed if that's how you roll.

21 Responses:

  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. 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. 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. 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. Justin says:

    @Philip L: this might be what you’re referring to: http://osxdaily.com/2011/07/18/disable-mac-os-x-lion-resume-window-restore/

  15. 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

  16. 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.

  17. 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).

  18. 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”!

  19. 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

  20. 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.

  21. 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.

Shared
Steve Jobs speaks about the future at the International Design Conference in 1983:

31 years later, it’s safe to say this is one of the most prescient speeches about technology ever delivered. Jobs covers wireless networking, tablets, Google StreetView, Siri, and the App Store (among other things) many years before their proliferation. A fantastic listen.

How to travel around the world for a year:

Great advice for when you finally find the time.

LiveSurface:

A fantastic app for prototyping your design work onto real world objects like billboards, book covers, and coffee cups. This seems like just as great of a tool for people learning design as it does for experts.

50 problems in 50 days:

One man’s attempt to solve 50 problems in 50 days using only great design. Some good startup ideas in here…

How to Do Philosophy:

If you’ve ever suspected that most classical philosophy is a colossal waste of time, Paul Graham tells you why you’re probably right.

TIME: Why Medical Bills Are Killing Us:

Stephen Brill follows the money to uncover the pinnacle of corruption that is the U.S. Health Care system. A must-read article if there ever was one.

DIY Dot Org:

A beautifully designed site full of fun and challenging DIY projects. I could spend months on here.

The Steve Jobs Video Archive:

A collection of over 250 Steve Jobs videos in biographical order

Self-portraits from an artist under the influence of 48 different psychoactive drug combos.

Water Wigs are pretty amazing.

David Pogue proposes to his girlfriend by creating a fake movie trailer about them and then getting a theater to play it before a real movie. Beautiful and totally awesome.

Jonah Peretti's letter to BuzzFeed’s employees:

If you’re wondering what a excellent blueprint for a modern media company looks like, look no further than Buzzfeed CEO Jonah Peretti’s latest email to his employees. In it, Peretti explains a lot of his company’s virtues, the most important being a relentless focus on always providing what’s best for the user. Vox Media (operators of The Verge) is the only other company I can think of which approaches this level of reform and execution.

The Covers Project:

I love this so much: a cross-referenceable database of cover songs, searchable by song or artist. Slowed down, acoustic covers — no matter the song — are so enjoyable to me that I wish it was a requirement to play one at every show. If you like them as much as I do, make sure to check out M. Ward’s Let’s Dance or Sun Kil Moon’s entire album of Modest Mouse covers.

“More and more people in this country no longer make or do anything tangible; if your job wasn’t performed by a cat or a boa constrictor in a Richard Scarry book I’m not sure I believe it’s necessary. I can’t help but wonder whether all this histrionic exhaustion isn’t a way of covering up the fact that most of what we do doesn’t matter.”
- Tim Kreider’s denunciation of the cult of busyness is excellent. (via jimray)
The iPhone and Disruption: Five Years In:

Take your pick of about 20 great quotes from this Daring Fireball article. My personal favorite:

The iPhone is not and never was a phone. It is a pocket-sized computer that obviates the phone. The iPhone is to cell phones what the Mac was to typewriters.