n our post on how to disable Resume for Safari or other applications in OS X 10.7, several of our commenters pointed out that it isn’t necessary to change the individual app directories permissions. Alternatively, you can turn off Resume on a per-app basis using a defaults write command entered into the Terminal.
Turn Off Resume on a Per App Basis

Here are a few example defaults strings for individual applications, and then we’ll show you how to find your own strings for other applications:

Turn Off Resume for Safari
defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool false

Turn Off for Google Chrome
defaults write com.google.Chrome NSQuitAlwaysKeepsWindows -bool false

Turn Off for QuickTime Player X
defaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false

Turn Off for Preview
defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false

You will want to relaunch whatever application you have disabled the feature for in order for changes to take effect.

Disabling Resume for Other Applications
For disabling Resume with other applications, you will want access to your personal Library directory (remember that /Library and ~/Library are different) so that you can find the exact app name syntax. The folder you are looking for is:

~/Library/Saved Application State/

I like the Go To Folder function since it’s easy to access with Command+Shift+G but you can get there through Option-Clicking on the Go menu too.

Once you are in your personal library’s Saved Application State folder, what you are looking for is com.developerName.ApplicationName.savedState, for another example we’ll pick Terminal which is in this directory as com.apple.Terminal.savedState.

Discard the ‘.savedState’ extension and enter the first part of the directory name into the same command used above, so it will look like:

defaults write com.apple.Terminal NSQuitAlwaysKeepsWindows -bool false

Enter that into the command line and relaunch Terminal and Resume will no longer be activated for that app only. Just as the other method, you can do this with as many or as few apps as you want.
How to Turn Resume Back On for Specific Applications

Reenabling Resume in Lion is just as easy as turning it off, we just need to adjust the defaults write command with a TRUE statement rather than FALSE. Taking Safari as an example, the command would be:

defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool true

Again, relaunch Safari and you will find Resume is back on. Note that if you turned off Resume on a system-wide basis through the Preference panel, you will need to reenable that separately.

Thanks to our commenters who pointed out the defaults write commands!

 

Leave a Reply

Twitter