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 found the same question and a strong answer on SO: http://stackoverflow.com/q/4404242/147265

I'm looking to launch new terminals from the CLI in a different profile than my default. My current implementation opens a new terminal no problem, but I don't know the option to set the profile.

open_term () {                                                 
  osascript -e "tell app \"Terminal\"
     do script \"clear; hello $1 \"
  end tell"
}
open_term world

The new terminal will open and greet with "hello world"

I would expect there to be some option for Terminal to specify profile, like -p "Man Page".

Here is the closest I've found to docs, but no profile option or similar: Terminal.app readme

share|improve this question
up vote 0 down vote accepted

You can export your settings profile from the preferences window, then open the settings file with the open command. For example:

bash-3.2$ open "Documents/Man Page.terminal"
share|improve this answer
    
Wow! That's fantastic! Is there a way to pass a command while opening? – Adam Mar 19 '14 at 22:21
    
I found that I can dig into the props with this question: stackoverflow.com/questions/1150380/… I'm now looking at how to pass a parameter. – Adam Mar 19 '14 at 22:29
    
Just add the parameter to the start command. – audiomason Mar 19 '14 at 22:36
    
Yeah, I can do a hard coded one, but I'm looking to pass parameters. This question looks to be right in line with what I'm looking for: stackoverflow.com/questions/4404242/… – Adam Mar 19 '14 at 22:41

You must log in to answer this question.

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