Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Is it possible to set up Terminal to launch a new window by default? I recently came from running Ubuntu and I normally open hundreds of terminals a day. It's a pain to have to always right-click on the shortcut and select "New Window". If I could use Spotlight and have it open a new window instead of giving focus to the existing window, it would speed things up a lot.

share|improve this question
    
How many windows do you usually have open? Can you re-use any of them? –  CajunLuke Sep 21 '11 at 18:50
    
This question could be clearer. What do you mean by "by default"? By default when you do what? Terminal normally opens a new terminal window when you open it for the first time, for example. What do you mean by "the shortcut"? Are you referring to the Terminal application icon in the Dock? –  Chris Page Sep 22 '11 at 4:36
    
If you mean that you want Terminal to create a new terminal window whenever you click on its Dock icon, I suspect that could be annoying to some people, because there'd be no way to bring Terminal to the front without creating a new terminal window. –  Chris Page Sep 26 '11 at 13:57

3 Answers 3

If you want to have a means to quickly open a new Terminal window whether or not Terminal is already open, and whether or not it is the active application, you could use an AppleScript "applet" to do so. By placing the applet in the Dock, you can click on it to open a new Terminal window.

This script will create a new Terminal window:

tell application "Terminal"
    activate
    do script
end tell

To create an applet containing this script from the command line:

osacompile -o "New Terminal Window.app" -e 'tell application "Terminal"' -e 'activate' -e 'do script' -e 'end'

To reveal it in Finder so you can drag it to the Dock:

open -R "New Terminal Window.app"
share|improve this answer

You can create a AppleScrip with this command:

open -n /Applications/Utilities/Terminal.app

And add a global shortcut to call this script ;)

share|improve this answer
    
Or, even better, set up an Automator application to call the AppleScript. –  zpletan Sep 21 '11 at 20:53
    
If it's already open, that will merely bring Terminal to the front, but won't create a new terminal window. I believe the question is how to have it create a new terminal window. –  Chris Page Sep 26 '11 at 13:56
    
@zpletan Scripts wrapped as Automator apps or services are often slower. And arguably less convenient to edit and manage than regular files. –  Lri Sep 26 '11 at 15:08

Not precisely the answer you asked for, but when Terminal is open, hitting Command-N will open a new window. Also, the first set of Terminal preferences (Settings tab, the "On startup, open:" buttons might be useful to play with.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.