If you are like me, hate to see all closed files or tabs coming back after re-opening applications in Lion, you won’t be pissed any more.
Basically, Lion saves every single thing you do in every single applications in
~/Library/Saved Application State. This is where the problem rises. Every applications will look at this saved state while opening up and will try to restore back to the same right before you closed, which I find this behavior annoying.
To fix it: You have 2 choices,
1. disable write-access to this directory, by using
chmod command. This will disable in every apps or by each app depending on which directory you are changing.
2. disable savedState per application by using command
defaults write [application_name] NSQuitAlwaysKeepsWindows -bool false
where application_name will look like following:-
com.microsoft.Word for Microsoft Word
com.apple.Safari for Safari
com.google.Chrome for Chrome
Example, to disable saved state for Microsoft Word, do as following:-
defaults write com.microsoft.Word NSQuitAlwaysKeepsWindows -bool false
You can find by open
~/Library/Saved Application State and look at the name. Unfortunately, Lion also keeps
~/Library hidden too. You can fire up terminal and type
open Library to open
~/Library in Finder and go through quickly.
To revert action: just use the same command with