Lion: failure to honor setting of "Restore windows when quitting and re-opening apps"

Discussion in 'Mac OS X Lion (10.7)' started by HippoMan, Aug 5, 2011.

  1. macrumors newbie

    Jul 19, 2008
    I have noticed an annoying "feature" of Lion, and I'm hoping that someone might have found a workaround.

    If I uncheck Preferences->General->Restore windows when quitting and re-opening apps, some of my apps seem to ignore that setting after a restart.

    Here's a scenario which illustrates the problem:

    1. Uncheck the Preferences setting mentioned above.
    2. Open up a few Finder windows.
    3. Open up a few Terminal windows.
    4. In the Terminal Preferences, disable everything related to Window Groups.
    5. Do a Logout or a Restart. Uncheck Reopen windows when logging back in.
    6. Relog in.
    7. Open one Terminal window.

    After step 6, all of the Finder windows which were previously open before Logout or Restart will also reopen. After step 7, all of the Terminal windows which were previously open before Logout or Restart will reopen, in addition to the single Terminal window which is manually opened after login.

    The only way I can prevent this from happening to Terminal is to add the following two lines right before the final </dict> tag in /Applications/Utilities/


    However, this has the undesirable side-effect of not showing anything about Terminal in the menu bar or the dock.

    None of this used to happen in Snow Leopard, Leopard, or Tiger. Does anyone know how I can disable this unwanted window-opening-after-relogin behavior in Lion?

    Thanks in advance.
  2. thread starter macrumors newbie

    Jul 19, 2008
    I found a solution!

    I got a solution for this problem from the Lion section of the site. Here's what I did to fix this problem:

    1. Open Terminal.
    2. Open up a Finder window to a work folder.
    3. In the Finder menu bar, hold down Option and select Go->Library.
    4. Navigate to Saved Application State and open it.
    5. Duplicate the folder (it will create copy).
    6. Drag copy to the work folder.
    7. In the work folder, rename that to
    8. Delete all the contents of in the work folder. In other words, that folder should now be empty.
    9. Go to Terminal and issue a Quit Terminal.
    10. Depending on your system settings, the folder might now have disappeared from Library/Saved Application State. If so, that is good. If not, delete from the Library/Saved Application State folder.
    11. Drag the empty folder from the work folder to Library/Saved Application State.
    12. Do a Control-Click on this folder, and select Get Info.
    13. In the Info window, select the Locked checkbox, then close the Info window.

    Now, the Terminal application will not save its state on restart, nor at any other time.

Share This Page