Reopen windows on Restart in Lion?
Mac Tip #504, 21 September 2011
Lion has a new behaviour for when you shut down and restart your Mac. Along with the way it restores windows when you quit an app it can restore windows and apps that were open when you shut down. See Quit and Discard Windows in Lion for more on how quitting an app works. But restoring apps and windows can be both very handy and very annoying! Here’s how to choose the behaviour you prefer.
Lion’s new Restart brings back apps and windows
Perhaps you want to restart your computer for some reason — maybe a software update is forcing you to restart. Before Lion you’d probably go through quitting apps and deciding for each window whether or not to save its contents.
The new behaviour in Lion means you can simply Restart your Mac without all that quitting and saving. When the Mac starts up again your apps and files will reappear without you doing all the hard work.
After reading Quit and Discard Windows in Lion you’ll have checked for the apps you most use whether or not Lion can save and restore a window even if you haven’t deliberately saved changes.
This behaviour is new. So new, in fact, that if I had crucial information that must not be lost I would make darned sure it’s properly saved before relying on automated procedures to preserve it. Some apps may not play nicely with this new feature. Please, test this out for yourself, and be sure to keep excellent backups of data that must not be lost.
Note too, that this applies to normal Restarts, and not sudden failures such as loss of power.
How to Restart your Mac
There are several ways to Restart your Mac. One common one is to choose
Restart… from the Apple menu. Whichever method you choose though you should see a dialog box before anything actually happens.
Note that the dialog box displays for around a minute and if you do nothing the restart will go ahead automatically.
Lion adds a checkbox to the Restart dialog box:
Reopen windows when logging back in.
If you leave that box checked then Lion will attempt to restore all the apps and windows that were open when you chose Restart.
To have a simple restart that simply loads the items in the
Login Items System Preference uncheck the box on the restart dialog.
Quickly set up a workspace
The problem with unchecking the box for
Reopen windows when logging back in is that after restarting you will have to manually open all the apps and documents you want to use.
But there’s a great trick for setting up a workspace quickly, with all the apps and documents you need. Read about it in Applescript 101, Mac Tip #214/28-September-2005 and Applescript 102, Mac Tip #215/05-October-2005. Note: you now need to use
AppleScript Editor.app in the
I use a similar Applescript any time I need to set up my Mac for ordinary use. And the great thing is that I can call up this script any time, rather than just adding everything to the
If you’re interested, here’s my script. The final line just hides everything except Mailplane:
tell application "Finder" tell folder "Applications" of startup disk open application file "Mailplane.app" open application file "YoruFukurou.app" open application file "BBEdit.app" open application file "MarsEdit.app" open application file "Safari.app" open application file "OmniOutliner Professional.app" open application file "Launchbar.app" open application file "TextExpander.app" open application file "Keyboard Maestro.app" open application file "Evernote.app" open application file "Dropbox.app" open application file "Path Finder.app" open application file "Skitch.app" open application file "Alarms.app" end tell set visible of every process whose visible is true and name is not "Mailplane" to false end tell
Note: I’ve set preferences in many of these apps to reopen windows that were open when the app quit. Several of the apps listed above also open several documents automatically when they start up.
Comments and guest Tips
Do tell us in the Comments how you’re finding this new feature of Lion.
A quick note for those many readers who receive the Tips by RSS or by email: to leave a Comment please visit this Tip on the website and add your comment there.
Could you write a guest MacTip? If so, contact Miraz.
Credit where it’s due
This Tip was written by Miraz Jordan, http://mactips.info, and is available under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
These books will help you with Lion
I recommend the ebooks Take Control of Upgrading to Lion and Take Control of Using Lion to anyone moving to Lion. I’ve read them myself and they were extremely helpful. Click the covers below to buy through my affiliate link. Every book you buy through my link helps MacTips.