Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Terminal won't stop opening two windows.

Every time I open Terminal, it opens two windows. One window has a bunch of text at the top that appears to be old commands(perhaps that I had typed? I don't remember all that I've typed into Terminal since the beginning of time 😝) in grey and then the normal Terminal prompt in the usual green(that's the theme I have) after all the text. The second window is in a fullscreen space thingy(Lion's mission control interface) and it looks similar except the text is different and there is a LOT more of it.


I'm not quite sure what to do to make this stop. I've tried deleting the plist file for Terminal. I've tried restarting the computer. I've tried closing both windows, opeing a new one, positioning how I'd like it posistioned, then quitting Terminal by holding alt/option and cliking "Quit and Keep All Windows" from the Terminal menu.


Is there a place where there are setting files for an app's window positions/defaults?


It may also be good to mention, as it seems possibly relevant, that every time I open iPhoto, it opens in a fullscreen space much like the second Terminal window. I've tried similar things on iPhoto to get IT to stop doing this.


Thanks for any help!

Posted on Jan 11, 2012 3:45 PM

Reply
Question marked as Best reply

Posted on Jan 11, 2012 4:54 PM

It's the Lion "Resume" feature.


Close all windows before quitting Terminal, or hold down the option key while quitting; or


Hold down the shift key while launching Terminal; or


Disable Resume globally in System Preferences > General.

3 replies

Jan 11, 2012 10:24 PM in response to Linc Davis

I've had Resume disabled for a while (since before the problem), I found that feature particularly annoying. 😝 I'd already tried all of the other things you suggested before I posted this, thanks tho! I know they work for problems less stubborn than mine.


The only thing that does help is holding shift when opening it, I only get one window then, and in the default theme. But of course, I wouldn't want to have to hold shift every single time I open terminal, I use it a lot. What is is exactly that holding shift is invoking? Is there possibly a preference somewhere that will make it always do whatever it's doing then?

Jan 11, 2012 11:01 PM in response to dro8654

Okay, so I actually found a solution to the problem!

I cannot claim it as my own since I found it on another discussion page as well as CNET, but I'll post what I did here for others to see.


The two helpful pages were:

http://reviews.cnet.com/8301-13727_7-20083707-263/managing-mac-os-x-lions-applic ation-resume-feature/

and

https://discussions.apple.com/thread/3241843?answerId=15859853022#15859853022


What I did was:


1. Enable "Restore windows when quitting and re-opening apps" under General in System Preferences(I don't know for sure if this is necessary, but it seemed harmless with my new found knowledge as you'll see in a moment)

2. Navagate to "~/Library/Saved Application State/" in Finder

3. Find the folder named "com.apple.Terminal.savedState"

4. Move it to the trash

This resets the state that the application uses to open each time it opens, when you open it now, it'll recreate the folder

5. Launch Terminal

6. Open the Get Info dialog for the newly created "com.apple.Terminal.savedState" and tick the "Lock" checkbox

This prevents the contents of the folder from being changed, resultantly preventing ONLY Terminal from saving the state of it's windows on closing.


Not only did this solve THIS problem, but it opened up some cool options:


-By Locking any of these folders, one can keep a sort of template for how they'd like the windows of an application to open every time.

-One can leave on the "Reopen windows" preference but select applications for which they do not wan't it to work. It is a semi useful feature, and I can understand why it was added, it just seems like an oversigt that it was only a global or no feature.

-One can reset the window options of any trouble making apps in the future.



Note: This also solved the problem I was having with iPhoto!

Terminal won't stop opening two windows.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.