10.7: Disable Resume on a per-application basis

Aug 12, '11 07:30:00AM

Contributed by: cycomachead

Lion's new Resume feature is great, but sometimes, you don't want it to happen, or maybe just for some applications.

First: To disable Resume for one time only in any application, Quit the app while holding the Option Key. This works from the menu or with Command+Option+Q.

Now, what if there's an app you never want to restore to its previous state, but you still want resume turned on? You can easily accomplish this with Terminal.

Open Terminal in /Applications/Utilities and type:

defaults write com.[vendor].[AppName] ApplePersistenceIgnoreState YES

For example with Safari you'd type this:

defaults write com.apple.Safari ApplePersistenceIgnoreState YES

It's not guaranteed to work on apps that aren't updated for Lion (though they're not guaranteed to work with Resume either). Sometimes it's tricky to find how the vendor spells their name in this format so you can locate the preferences file for the app in ~/Library/Preferences (using any method you'd like to open that folder) and scroll through the list of files to find the application you're looking for and then head back to Terminal.

It's recommended that you change app settings with the app closed, and restarting the app will be necessary before it takes effect. If you wish to change the setting back to the way it was, run the command again using NO instead of YES.

[crarko adds: I tested this, and it works as described. This is a good find.]

Comments (6)

Mac OS X Hints