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 here a way to changing the Terminal.app profile from the command line?

Here is already couple of questions about changing colors, but I need change the whole profile from the "Basic" (what is my default) to "Homebrew" or "Pro" from the shell script.

Looking for only clean command-line solution (e.g. without clicks, global shotcuts etc.), so probably with osascript. Need it because want change the Terminal.app behavior when ssh-ing into another computer, e.g. font-size, encoding, colors, emulation - the whole profile - not only colors.

Like something next:

some_commands_here to change the CURRENT terminal profile into another
ssh user@example.com

And no, I don't want use iTerm2. :)

Ps: ok, as the last resort, shortcuts are acceptable, but no clicks. :) :)

share|improve this question

1 Answer 1

up vote 4 down vote accepted
$function setTerm() { PROFILE=${1}; echo "tell app \"Terminal\" to set current settings of first window to settings set \"${PROFILE}\""|osascript; };

Source: commandlinefu.com

When you connect to a remote computer using ssh, the terminal.app settings will set according to the remote bash profile. Therefore you need to define the preferred settings on the remote machine first.

share|improve this answer
remote bash profile is OK. I want change the Terminal.app profile (from 'Basic' for example to 'Homebrew') before run my ssh command. And remote .bash_* does not set my local terminal settings. (Or, if yes, can you provide an example - how?) –  jm666 May 30 '11 at 14:15
Hi @jm666, see whether the commandlinefu.com(commandlinefu.com/commands/view/5049/…) could help you with that. –  karmatic May 30 '11 at 14:24
Man - COOL - This is what i exactly want. Thanks. :) Can you pls add the link into the body of your answer? –  jm666 May 30 '11 at 14:28

Your Answer


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.