Launch New Terminal in OSX with Specified Profile from Command Line

macosterminal.app

I found the same question and a strong answer on SO: https://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

Best Answer

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"