image ResEx Logo
ResExcellence www : Powered by Google
Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets
[an error occurred while processing this directive]


Files are in Stuffit 5 or greater format.
Free download.

Tell us about a bad link.

Thank You!


Running 55 days
without a restart.

Creating and using .term files to set individual Terminal window prefs.
by Matt O'Hara

We know that the Terminal application in MacOS X has a lot of preferences. You can change the window size and shape, opacity, location, title, default shell, font size and type and color, and more. But did you know that by using .term files individual windows can have their own predefined preferences? In fact you can have a library of window settings, each one specific to particular uses of the Terminal.

For example, I have most of my windows fairly transparent with small white text, but this is not very useful when viewing man pages. So I made a .term file just for man pages that has a completely opaque white window with larger black text, and placed in the center of my screen. I also have .term files for the curl and wget apps, netris, and hx servers I frequent. I'm sure you can think of a several good uses for .term files in your work.

The basic parameters can be found in the file

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

Look over these parameters and see which you can recognize and which you can't. The most obvious candidates for customization are:

  • Columns
  • CustomTitle
  • Rows
  • TerminalOpaqueness
  • TextColors

Don't change the values in this file yourself, because if you make a mistake the Terminal won't open!

Now to start off making your own .term files, go to:

Home/Library/Application Support/Terminal

If that directory does not exist, create it yourself and copy over a template to get you started. Use the terminal commands shown below.

> mkdir "~/Library/Application Support/Terminal"
> cd "~/Library/Application Support/Terminal"
> cp ~/Library/Preferences/com.apple.Terminal.plist .
> ls

com.apple.Terminal.plist

The last comand lists the folder where you should see one file.

To edit the file, I used TextEdit, but you can use the application of your choice, as long as the files are saved as Plain Text.

Edit the <key> parameters as you wish, being careful NOT to change the <key> items names at all, just changing the values between the <key> items. Save your modifications to the Home/Library/Application Support/Terminal directory, making sure that it has the extension .term and is a Plain Text file.

Here are some <key> items you can add that might not be in the default com.apple.Terminal.plist file. Make sure you add them in Alphabetical order! If you don't, or if you make a mistake, Terminal won't start up.

  • <key>Columns</key>
    <string>110</string>

  • <key>CursorShape</key>
    <string>0</string>


    <this can be 0, 1, or 2: block, underline, or vertical>


  • <key>CustomTitle</key>
    <string>Your Window Title Here</string>

  • <key>ExecutionString</key>
    <string>cd Downloads/curl</string>


    <here you can execute any command you want, like moving to a certain directory or opening an app>


  • <key>Rows</key>
    <string>9</string>

  • <key>TerminalOpaqueness</key>
    <string>0.10</string>


    <1 is fully opaque, 0 is fully transparent>


  • <key>TextColors</key>
    <string>1.000 0.059 0.036 0.000 0.000 0.000 0.055 0.067 0.916 0.055 0.067 0.916 0.000 0.000 0.000 1.000 0.059 0.036 0.944 0.899 0.455 0.969 0.943 0.198 </string>


    <the best way to get text color values is to change the Terminal prefs to the colors you want, then quit Terminal and open up the com.apple.Terminal.plist file, then copy and paste into your .term file>


  • <key>WinLocULY</key>
    <string>160</string>

  • <key>WinLocX</key>
    <string>3</string>

  • <key>WinLocY</key>
    <string>20</string>

    <these are window placement prefs. Experiment, quit the Terminal, open the .plist file, open it to get the new values, copy and paste them into your .term file to see how they work, then experiment again.>


Finishing Up

When you're happy with the .term file's settings, make sure it's in the right place: Home/Library/Application Support/Terminal If it is, and you did your editing correctly, your .term file should be selectable under the Shell/Library menu item in the Terminal app. Congratulations! You now can build a library of Application-Specific Terminal Settings! Remember, you must quit and restart the Terminal application to test your .term files. Many thanks go to T.H.E.M. for the information I used in this How-To.

Cell Phone Themes Icons Mighty Mouse Cursors Software Reviews Widgets & Widgets

Maintained by the Staff of ResExcellence. This entire site ©1997-2006 ResExcellence
Privacy Statement? Sure we gotta Privacy Statement. [an error occurred while processing this directive]