17

The Preview application currently hangs when it opens (it doesn't crash - it becomes unresponsive). Since Preview opens the files that were opened at the last invocation - killing and reopening Preview doesn't help.

Switching to the guest user proves that the Preview application works.

Where does the Preview application store the list of files to open at startup?

Excellll
  • 12,627
  • 11
  • 51
  • 78
Jens Axel Søgaard
  • 345
  • 1
  • 4
  • 11

2 Answers2

20

Quit Preview.

Navigate to ~/Library/Saved Application State/com.apple.Preview.savedState/

Quick way to get there…

  • From Finder...
  • Cmd ⌘ N for new window

  • Cmd ⌘ Shift ⇧ G for Go To…

  • Copy/paste ~/Library/Saved Application State/com.apple.Preview.savedState/

  • Hit Enter

Delete the entire contents of the com.apple.Preview.savedState folder.

Late Edit: I've noticed the Preview saved state folder is now an alias in more recent OSes; in which case when deleting the contents, don't also delete the alias. The original is in ~/Library/Containers/com.apple.Preview/Data/Library/Saved Application State/com.apple.Preview.savedState

Tetsujin
  • 47,296
  • 8
  • 108
  • 135
  • Thanks for the solution. Instead of deleting the folder, I opened windows.plist and removed items with files to open. Thanks again. – Jens Axel Søgaard Mar 14 '15 at 15:13
  • Sure - if you're comfortable editing xmls, cool - I was going for the 'lowest common denominator' method ;) Glad it worked. – Tetsujin Mar 14 '15 at 15:20
  • @jaepage - are you looking in `~/Library` or `/Library` ?? – Tetsujin Mar 22 '17 at 18:23
  • The built-in feature for disabling Application Restore when opening an application should be preferred over this. – bames53 Sep 15 '17 at 03:45
  • @bames53 - why? that would clear all saved states for all apps. Elephant gun/house fly. – Tetsujin Sep 15 '17 at 06:21
  • @Tetsujin No, it merely starts up the application without restoring its state. It doesn't do anything to the state for other applications. – bames53 Sep 15 '17 at 21:35
  • Even so, I'm still not seeing the point. If it doesn't delete the state, then as soon as you switch it back on again it will do the same thing, try to open the file that hung... in the meantime, everything else will forget its state too. – Tetsujin Sep 16 '17 at 07:21
  • @Tetsujin "If it doesn't delete the state" Opening an app without restoring the old state doesn't disable saving state, so the old state gets overwritten. "in the meantime, everything else will forget its state too," No, that's not true. Opening an application without restoring its state has zero effect on other apps. Other apps retain their state. – bames53 Sep 28 '17 at 13:54
  • @bames53 - I think you ought to provide this information as a separate answer - fully explaining how other apps would remain unaffected; because I'm not understanding your explanation & it serves no real purpose for us to thrash it out in comments. – Tetsujin Sep 28 '17 at 13:56
  • @Tetsujin There's already an answer explaining it. – bames53 Sep 28 '17 at 14:03
  • There's an answer saying you can switch it off - it doesn't explain anything. – Tetsujin Sep 28 '17 at 14:05
20

There are two options for doing this without having to touch config files:

  • To do this one time only, you can hold down Shift ⇧ while opening any app to temporarily disable the "reopen windows on launch" feature
  • To disable this behavior for all apps indefinitely, open System Preferences, go to General, and check "Close windows when quitting an app" near the bottom.
gntskn
  • 300
  • 2
  • 5