Disable Resume for Safari or Other Specific Applications in Mac OS X Lion
Resume is that feature of Mac OS X Lion that causes apps windows to reappear after you have quit and then relaunched the app. It’s a great feature but not one that we want all applications to use, so here is how to disable Resume on a per app basis.
How to Disable Resume for Specific Applications in Mac OS X 10.7 Lion
This is easy and actually pretty similar to deleting application saved states, just follow along:
- From the Mac OS X desktop, hit Command+Shift+G and enter the Saved Application States folder located within your personal Library at:
- Find the application you want to disable Resume for, for this walkthrough we’ll use Safari as an example, so the folder we are looking for is “com.apple.Safari.savedState”
- Note: You will probably want to delete the contents of the apps folder prior to the next step, otherwise the existing Saved State will become the default state that the app is resumed repeatedly to. That could be helpful if you always want the same tabs or windows to open, but the goal of this walkthrough is for no windows to open and for Resume to be disabled for the chosen app, thus you will want to empty the folders contents
- Select ‘com.apple.Safari.savedState’ and either right-click and select Get Info from the menu or hit Command+i to get info on the folder
- Under “General” check the box next to ‘Locked’
- Close out the Get Info window and relaunch the application for locked state to take effect
~/Library/Saved Application State/
That’s all there is to it, Resume will no longer save Safaris state because the folder is now locked, preventing the app from accessing it.
For more advanced users, if you’d rather do this through the Terminal, you could do so with the chmod command and a -w flag to prevent write access:
chmod -w ~/Library/Saved Application State/com.apple.Safari.savedState/
You can do that with as many app folders that you want, or you can set the entire directory to locked and that would be another way to disable the feature completely.
This round outs the manipulation of Lion’s Resume feature, and we’ve covered how to delete specific saved Resume states, disabling Resume completely, and even how to discard current session windows on quit from appearing again via Resume. Now you should have full control over Resume and what is reappearing on relaunch, but if you have any more questions about the feature, let us know in the comments.
Update: You can also disable Resume on a per application basis with defaults write commands, here is what you’d want to use to disable Safari:
defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool false
Essentially you replace the app name in that string and you can do this for any other applications too.
- Disable Resume & App Window Restore Completely in Mac OS X Lion & Mountain Lion
- Easily Manage OS X Lion’s Resume Feature for Every Application with Resuminator
- Control What Apps Restore Windows in OS X Lion with RestoreMeNot
- Discard Windows on Quit to Prevent Resume from Reopening Last Session in OS X Lion