0

For most applications I like the OSX feature of remembering which documents were open. But it drives me nuts in Preview.

In past versions of OSX there was a simple preference that could be altered for each application: https://apple.stackexchange.com/a/177469/18486

This no longer works in Yosemite. Is there an alternative?

Dalin
  • 121

2 Answers2

2

After some playing around I found a workaround, not sure if there's something better:

  1. Open Preview, close all documents, close Preview.
  2. cd ~/Library/Containers/com.apple.Preview/Data/Library/Saved\ Application\ State/com.apple.Preview.savedState
  3. chmod -w .
  4. chmod -w *

There will be similar folders for other applications.

Dalin
  • 121
-3

As for the "similar folders" mentioned by Dalin, there are a bunch in ~/Library/Containers; but there may be another in ~/Library itself.

cd ~/Library
rm -rf 'Saved Application State'/*   # eliminate contents
chmod 500 'Saved Application State'  # make it read-only

This blocks automatic saving for other applications in this location. You can find the other 'Saved Application State' folders as follows:

cd ~/Library/Containers
find . -name 'Saved *'
Dickster
  • 151
  • Dalin only wanted to block saved state behaviour for a single application; what you are suggesting would disable it for all applications that use the ~/Library/Saved Application State location. – Haravikk May 01 '22 at 08:17