Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Set the default location of Terminal windows Apps
For a while now it's irritated me that my Terminal window would always open up a little way in from the left of the screen, while for others (who have their Dock pinned to the left) new Terminal windows would open too far to the left; i.e. under the Dock. A recent forum thread deals with this issue but I thought the solution warranted posting here.

The preference file for Terminal ("/Users/username/Library/Preferences/com.apple.Terminal.plist") appears to include data regarding a window's location as follows:

  <key>WinLocX</key>
  <string>21</string>
  <key>WinLocY</key>
  <string>0</string>
However, while this data is saved when you create a .term file, ordinary Terminal windows don't seem to pay any attention to these settings. The solution is as follows. You need to open /Applications -> Utilities -> Terminal.app (Control-click and show package contents, then...) Contents -> Resources -> English.lproj -> Term.nib with Interface Builder and move the 'Terminal' window to where you want your default Terminal.app window to appear. Save this file then launch Terminal.app. The new window will appear at the location you just set in Interface Builder.


Panther proven!
    •    
  • Currently 1.50 / 5
  You rated: 2 / 5 (2 votes cast)
 
[9,583 views]  

Set the default location of Terminal windows | 15 comments | Create New Account
Click here to return to the 'Set the default location of Terminal windows' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set the default location of Terminal windows
Authored by: Paul Burney on May 06, '03 11:03:48AM

Excellent! Thanks for this tip. I bet when they last upgraded the OS, they forgot to move it to the right place before saving. It was annoying but I was getting used to it.

FYI, in Project Builder, if you want to use exact coordinates, click on the terminal window and then go to:

Tools -> Show Info

Select "Size" from the pop-up menu in the inspector and adjust the values in the "Content Rect" section. Note: 44 is the size of the menu bar so the y value shouldn't (can't?) be less than that.

HTH.



[ Reply to This | # ]
Set the default location of Terminal windows
Authored by: kirkmc on May 06, '03 11:23:03AM

Doesn't change anything for me. I edited the .plist file then opened the Terminal, and the window's still in the same place. I checked the .plist file again, and my setting's there...

Kirk



[ Reply to This | # ]
Set the default location of Terminal windows
Authored by: kirkmc on May 06, '03 11:24:23AM

Sorry about my above comment - my mistake. It works fine.

Kirk



[ Reply to This | # ]
Much easier way
Authored by: stewby on May 06, '03 11:50:57AM

No need to mess with plists and project builder: just move the window where you want it, Save it, and in the save dialog make sure "What to save" is set to Main Window, and check the "Open this file when Terminal starts up"



[ Reply to This | # ]
RE: Much easier way
Authored by: kingshrimp on May 06, '03 11:56:27AM

that REALLY helped - thanx!

if you would like to have more than one window opened at start
(like I do) place as much windows as you want and do like
stated above only make sure to select "All Windows" in the
"What to save:" dialog.



[ Reply to This | # ]
Much easier way
Authored by: djn1 on May 06, '03 01:04:26PM

Which is ok if you want to open a .term file each time you start
Terminal but my - admittedly more laborious method - gets
round that issue.



[ Reply to This | # ]
Much easier way
Authored by: dbueno on May 27, '04 09:40:44AM

Well, not really. If you just check "Open this file every time Terminal starts up," it will do just that. No need to click on any .term file.

---
Denis Bueno



[ Reply to This | # ]
Much easier way
Authored by: pete on May 07, '03 11:50:51AM
  That never worked for me. Terminal always opened 1/2 way down my monitor - all the time. Didn't matter where I saved the window or trashing of the pref's. Now it opens where I want it to open. All the time.

  I suppose this would work with just about any program also. Some pc programmers are not well versed on the needs of a Mac user!

[ Reply to This | # ]
I may be missing something...
Authored by: jiclark on May 07, '03 12:03:47AM

I can get the first window to open where I want (in the upper right corner of my second monitor, which is to the left of my primary one), but as soon as I exit that shell and open a new window, it goes back to the cascading upper-left-of-main-monitor location. Am I doing something wrong?

TIA,
John-o

---



[ Reply to This | # ]
I may be missing something...
Authored by: djn1 on May 07, '03 02:48:46AM

No, I don't think you're missing anything. The setting only
seems to hold when you start Terminal.app rather than open
new windows ... unfortunately.



[ Reply to This | # ]
I may be missing something...
Authored by: guybrush on May 07, '03 03:35:13AM

It will always cascade if you opens a new window in the same terminal.app, but starts to cascade where the main window was.
I like it this way tho else it would open up a window exactly above your old window.

And thanks again djn1 ;)



[ Reply to This | # ]
Finally!!
Authored by: jeb1138 on May 07, '03 12:29:04AM

THANK YOU!!! :)



[ Reply to This | # ]
Can I do something like this with Safari?
Authored by: big_oaf on May 07, '03 02:40:12PM

Safari always opens its first window 20-30 pixels from the left-hand side of the screen! Any ideas on doing something similar to Safari?



[ Reply to This | # ]
Can I do something like this with Safari?
Authored by: MJCube on Dec 18, '03 04:48:54PM
For Safari I just make sure to place the last window opened at my preferred default location. On quitting and relaunching, Safari uses that window placement.

(I am so particular about this that I made a QuicKeys macro to reposition it exactly the same way, in case other windows screw up the preference. Since tabbed browsing came to Safari, I haven't needed it much, since I use 1 window for almost everything now.)

[ Reply to This | # ]

Opening Multiple Terminals in Position
Authored by: beleff on May 07, '03 06:23:08PM

I have a small terminal that launches in the lower right hand corner from a term file when I login, and, being a command-line kinda guy, I use it as my primarily launcher (using an alias o='open $1'). At work, my normal setup involves 4 additional terminals @ 80x25 layed out in a square, and every morning I was CMD-N'ing 4 times and then dragging them into place. I finally decided to save off a file, "term#.term" for each of my 4, in the position I want them. Now I can call them (again with open) one at a time or use the additional alias I set called 4term which calls them all - they pop-up a little slower than CMD-N but it's a lot more convienent than trying to position everything 5 days a week. -beleff



[ Reply to This | # ]