While I'm sure I need to use defaults write com.apple.Terminal to do this, I'm not sure how to use a terminal theme file like IR_Black.terminal and set it to the default theme for a user.

Basically, I'd like to be able to do something like defaults write com.apple.Terminal Default Window Setting IR_Black.terminal

anyone know how to do this?

link|improve this question
feedback

migrated from stackoverflow.com Jul 21 '11 at 18:51

This question came from our site for professional and enthusiast programmers.

1 Answer

up vote 2 down vote accepted

Just configure your window the way you want it and then choose the Shell->Use Settings as Default command. There's no need to do anything from the command line.

From your comment, I understand that you want to be able to set the preferences for Terminal from a script as part of configuring a machine automatically. The easiest way to do that is probably to configure Terminal the way you want, and then make a copy of

/Users/*yourname*/Library/Preferences/com.apple.Terminal.plist

If you then copy that file to the target machine's

/Library/Preferences/com.apple.Terminal.plist

it'll become the default Terminal preferences for every user on that machine. Or, you can copy it to:

/Users/*username*/Library/Preferences/com.apple.Terminal.plist

to set the Terminal preferences just for user username.

You probably already know at least some of this. I know this answer skirts the question of how to do the equivalent thing with the defaults command, but if you do:

% defaults read com.apple.Terminal

you'll see that the value for the "Window Settings" key is a fairly complex dictionary that's going to be difficult to manipulate with defaults. I think it'll be much safer to let Terminal write the settings, and for you to simply copy the entire settings file.

link|improve this answer
Caleb - I'm deploying environments to multiple users. I can't rely on them to do this on their own (don't get me started on why) – Cory Collier Jul 21 '11 at 14:56
@CoryCollier: Edited my answer to help (I hope) with your situation. Good luck. – Caleb Jul 21 '11 at 22:16
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.