5

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 [email protected]

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

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

1 Answer 1

8
$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.

3
  • 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?)
    – clt60
    May 30, 2011 at 14:15
  • Hi @jm666, see whether the commandlinefu.com(commandlinefu.com/commands/view/5049/…) could help you with that.
    – karmatic
    May 30, 2011 at 14:24
  • Man - COOL - This is what i exactly want. Thanks. :) Can you pls add the link into the body of your answer?
    – clt60
    May 30, 2011 at 14:28

You must log in to answer this question.

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