2.0 KiB
layout | status | published | title | author | author_login | author_email | wordpress_id | wordpress_url | date | date_gmt | categories | tags |
---|---|---|---|---|---|---|---|---|---|---|---|---|
post | publish | true | Disable OSX Lion from re-opening saved app state | [{display_name sipp11} {login sipp11} {email sipp11@gmail.com} {url }] | sipp11 | sipp11@gmail.com | 872 | http://blog.10ninox.com/?p=872 | 2012-02-28 05:50:44 +0700 | 2012-02-27 22:50:44 +0700 | [Uncategorized] | [] |
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 typeopen Library
to open ~/Library
in Finder and go through quickly.
To revert action: just use the same command with -bool true