Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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 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 at 22:29
    
Just add the parameter to the start command. –  audiomason Mar 19 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 at 22:41

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.