I upgraded one of my computers to Mac OS X Lion recently, and because I'm working with images a lot right now, I quickly ran into a weird quirk: The Preview app on Lion reopens all your previous documents whenever you start it.
If you haven't seen it before, here's how this Lion Preview history feature works:
To fix this problem, and get Preview to work the "normal" way -- the way it used to work -- you have to crack open the Mac OS X Terminal application. As a quick warning, if you're not comfortable with Unix and command-line systems (like DOS), you may want someone else to do this.
Unless you've customized your system, you can open the Mac Terminal application like this:
This will open a Unix terminal window. All you have to do here is type this one command:
defaults write com.apple.Preview NSQuitAlwaysKeepsWindows -bool false
It's probably best to just copy that command, then paste it into your Terminal window, then hit [Enter] at the end of the command.
When you do this, you shouldn't see any sort of reply on the command line. That's the way Unix works: If your command is a success, you won't see anything but another prompt. Conversely, if there is a problem, you will see some sort of error message.
Here's what this Terminal view looks like on my system, with the caveat that I use Terminal all the time, so I've customized my colors and fonts:
Once you've issued this command successfully, you can try that test with the two images again, and you should see Preview work normally again, opening only the file you want to open, instead of opening your entire history of files.
As I wrote in an earlier article, I think the Windows Vista guy designed Mac OS X Lion, another workaround to the Mac Lion Preview history problem is to use two commands to close your image files, first [Command][W] and then [Command][Q]. The first command there means "close the current file", and the second command means "quit this application", so this has the net effect of telling Preview to first close the file, which means it won't later reopen the file when you open another image file.
To summarize, this workflow is:
As mentioned, I don't care for this approach, but unless you're willing to crack open the Terminal application and type that "defaults write" command, it's the only other thing I can suggest.
I lived with this approach for about ten days, when I finally decided it was pretty ridiculous, and fortunately I was able to find the "defaults write" command above. I've known for years that defaults commands like these were available on Mac OS X, but I've never had to use one for now. At some point I'll document other defaults commands you can run, but for today, I just wanted to handle this Lion Preview "reopen previous documents" problem.