Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to assign a global keyboard shortcut that will launch a new window of iTerm, with a specific profile. (I managed to do this to launch a new Chrome window with Automator and AppleScript, but this is proving more difficult)

This would be equivalent to activating iTerm, and in the top menu select Profiles -> "my profile", with "alt" or "option" pressed, so it'll open in a new window, not a new tab in the current window.

Any ideas how to do this with either Automator or AppleScript?

In case it's relevant, I have Mac OS Mountain Lion

(Sorry if this is an absolute noob question, I just moved from Windows to Mac, and I'm trying to optimize the things I do all the time)

Thank you!

share|improve this question
If you're new to OS X, why not give Terminal a try first? It's pretty good. – Daniel Beck Jul 31 '12 at 18:18
up vote 4 down vote accepted

Combining lines 11 and 58 of the AppleScript sample code on the iTerm website...

tell application "iTerm"
tell (make new terminal)
    launch session "Your Profile Name"
end tell
end tell
share|improve this answer
Awesome! That's EXACTLY what I needed. Thank you!! – Daniel Magliola Jul 31 '12 at 19:14
I'd love to see another answer that launches an new iTerm process, not a window in the existing app. – Sparr Sep 17 '14 at 22:23
@Sparr: You're usually running no user application multiple times on OS X. Some behave very weirdly (or break), others actively prevent it. Is there a real reason you're looking for this? – Daniel Beck Sep 18 '14 at 9:18
@DanielBeck because I want the OS to behave as if it's another application, the same way it does with Fluid web apps. – Sparr Sep 18 '14 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .