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.
The software I use does not have a folder in
“~/Library/Saved Application State” what can I do?!
I can find the identifier using the activity window but when I run “defaults write com.troikatronix.isadora NSQuitAlwaysKeepsWindows -bool false” it says it can’t be found….
HELP! :-)
I wholeheartedly agree with many of the writers here. The resume function is a complete pestilence. When I restart my machine if I wanted loads of applications to start up then I would have set them as startup items. I have used Mac OS since system 7 and I am so disappointed that I am seriously considering sticking Snow Leopard back on the machine.
If I wanted my computer to be more like my iPad then I would have be using my iPad.
I strongly believe that Apple is really dumbing down what they do these days as they are so geared around consumer products. As a result they are becoming a nightmare to support in the workplace.
Anyway thanks for the tips :)
This method is working very well for Safari.
Numbers, I had to make similar changes for /Library/Autosave Information.
Doesn’t work for Preview since it is not in Saved application state. Do you suggest something?
Thanx for the post
Ive found it. It is under /Containers/com.apple.Preview/Data/Library
Thanks a lot Aduv! I was going mad with 30+ Preview windows that asked me to save their documents on closing…
if you lock the folder, you will not be able to get back any bookmarks that you’ve added prior to quitting the application. be warned.
[…] If you just want to disable the saved application state for some specific apps, check out OS X Daily’s post. […]
[…] sounds like you're running afoul of Lion's Resume function. Here are a couple of posts explaining how to stop Lion from doing this on a per-app basis. (That last one is about Safari, but […]
This is the stupidest apple os yet. They are ruining it trying to turn the full version to IOS. Spaces sucks now too, they just dropped the ball.
This does not work for me – I think the only way of doing this is through the terminal method.
It does work if you set the permissions properly, but you must clear out the existing saved states first otherwise it will restore to those as they are locked. It may be easier to just follow the defaults write method though:
https://osxdaily.com/2011/08/01/turn-off-resume-per-app-in-mac-os-x-lion/
to donkeyshame;
When you Shutdown, select the box that says Re-Open Windows Open Restart.
I mean DE-select the box that is selected by default.
You have got to be kidding me! On Apple’s site, it talks about Resume as a feature. I’d classify it as a nuisance. Why is there no preference pane to disable this? I have tried the listed instructions of disabling in the General preference pane, but it does’t do anything. I still get windows showing up on reboot. Not to mention I have had to search all over hell and back to actually find this workaround. Thank you eversomuch by the way! Is there a way to make my system show up clean on restart like it did in Snow Leopard?
I have always appreciated how my Mac has let me personalize damn near everything. But Lion feels like it has more in common with Windows than anything Mac I have ever seen. Maybe they released it too early. Maybe they aren’t paying enough attention to user interaction anymore. But to list Resume as a feature and right next to it say you can turn it off and not give anyone CLEAR instructions is just… stupid.
Thanks again! Now I have to solve the problem of the rearranging desktop icons… These two problems seem like they should have been addressed prior to release!
There is another way to kind of disable resume for an individual application β just reassign the “Quit and Discard Windows” keyboard shortcut of that application to βQ:
1. In the “Application Shortcuts” section of the Keyboard.prefPane, make an entry for the application β for instance Terminal.app (where resume is just pointless) β;
2. change the “Quit” command for that application to something else than βQ, for instance, change “Quit Terminal” to ^βQ;
3. change “Quit and Discard Windows” to βQ.
[…] 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 […]
Strange, but I cannot locate the “Saved Application States” folder anywhere. Spotlight can’t find it, I can’t find it under the Library folder (which I do not have hidden), and my resume is not disabled. Anyone else having this problem?
The Library folder is the ~Library folder (the user’s one) and this folder is hidden by default.
To access it go on the “Go” finder menu using the “alt” key.
Ah I see it now. Thank you so much.
I found this and it seems a much better solution. Basically you tell individual apps through terminal that you don’t want them to resume windows
defaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false
Replace “QuickTimePlayerX” with whatever app you wish to disable. Name must be exact.
defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool false
Thanks for this tip, but I find it also means that the Safari save dialogue box now no longer remembers the previous Favourites column setting. Is there a way of preventing this, or, if not, how do I turn global Resume settings for Safari back on?
Please ignore previous message – now realise how to solve problem already explained at http://tinyurl.com/6kxwp2k.
I would be curious to know the low level implications of doing this. The application is still going to be making calls to attempt to save to this folder so we are basically purposefully creating an exception. We can assume every app will handle this correctly, but there could be some with huge error logs or other random consequences.
I think the spirit of this tip is great but the implementation could be better. Surely there has to be a way to modify a plist or other file in the application bundle to tell the app not to attempt to save.
Or another fix…
Hold down OPTION while logout out and nothing will be restored :)
LOL Safari is the first application I was thinking too. This is a great tip so thanks for the walkthrough. I am surprised Apple hasn’t given us the choice.