---
title: 'Themed Tab Terminal for OSX Leopard'
url: 'https://maxwesten.nl/blog/articles/themed-osx-terminal'
markdown: 'https://maxwesten.nl/blog/articles/themed-osx-terminal.md'
date: '2008-12-28'
description: "If you're working a lot with remote sessions like I do, you inevitably type a command in the wrong window... Most of the time it's something harmless like an ls or an cd command, but if you're trying to clean stuff up with an rm command things can get bad. The easiest way to differentiate between local and remote sessions or different remote sessions is changing the background-color. When switching terminal, you immediately see/know where you are, without looking at the prompt or the window-title. So how do we implement this in the standard OSX Leopard Terminal.app ? I like the te"
taxonomy:
  category:
    - OSX
  tag:
    - Apple
    - Hack
    - OSX
    - Terminal
  archives_month:
    - dec_2008
  archives_year:
    - '2008'
---

# Themed Tab Terminal for OSX Leopard

[Home](https://maxwesten.nl/)  [Blog](https://maxwesten.nl/blog)  [Articles](https://maxwesten.nl/blog/articles)  Themed Tab Terminal for OSX Leopard 

## [ Themed Tab Terminal for OSX Leopard](https://maxwesten.nl/blog/articles/themed-osx-terminal)

    28th Dec 2008   [Apple](https://maxwesten.nl/tag:Apple#body-wrapper) [Hack](https://maxwesten.nl/tag:Hack#body-wrapper) [OSX](https://maxwesten.nl/tag:OSX#body-wrapper) [Terminal](https://maxwesten.nl/tag:Terminal#body-wrapper)  

If you're working a lot with remote sessions like I do, you inevitably type a command in the wrong window... Most of the time it's something harmless like an ls or an cd command, but if you're trying to clean stuff up with an rm command things can get bad.

The easiest way to differentiate between local and remote sessions or different remote sessions is changing the background-color. When switching terminal, you immediately see/know where you are, without looking at the prompt or the window-title. So how do we implement this in the standard OSX Leopard Terminal.app ?

I like the terminal in OSX Leopard a lot but it doesn't have support for some simple things like opening themed tabs or use the bookmark function like in iTerm. Because I prefer Terminal over iTerm, I tried hacking some scripts together

First I pick a theme I'd like to use on a daily basis from the Preferences - Settings window. In my case it's "[IR Black](http://blog.infinitered.com/entries/show/6)". Then I select the theme and duplicate it by pressing the small "cog" icon and selecting "Duplicate Settings". [ ![Duplicate the theme](https://maxwesten.nl/images/5/d/c/b/4/5dcb407ebefa1ad4bd45bfd2622af6666557dd7a-0013141895045.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/001_3141895045.jpg)

Rename the duplicated theme to something useful; I'm using one to connect to a server named "Pentagon", so I name it this way. Note that the duplicated theme automatically gets the Default theme being used when pressing ⌘T. You can select another theme and then click the "Default" button to set the original "IR Black" as default again. [ ![Set the default theme](https://maxwesten.nl/images/2/6/3/c/9/263c9f26b1ebf6195b3ad352227f3432c3fe4dd0-0023142722866.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/002_3142722866.jpg)

Select the newly created "Pentagon" theme, go to the "window" tab and press the "Background Color" selector. Pick a color of your liking here. Because I like a darker background, I choose a very subtle tint of red in my black; just enough to notice it when in the terminal.
[ ![Change the backgroundcolor](https://maxwesten.nl/images/4/7/9/f/5/479f5d2e9682210f8edd46e011b5d4ce2aa75d62-0033141895505.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/003_3141895505.jpg)[ ![Select the color](https://maxwesten.nl/images/2/9/2/b/6/292b6b3e6f8669fdc24f0d59b94e8e8d157e4f17-0043142723272.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/004_3142723272.jpg)

Right now we can manually open a new terminal window by going into the "Shell" "New Tab" menu and select the "Pentagon" theme there. If you like you can tweak the background color with the theme selected to see the changes immediately applied to your terminal screen.

Right now you have a different background-color, so you can start an ssh connection with the pentagon server, but I don't like to use the mouse first and then start the ssh session manually. [ ![Create a tab with the new theme](https://maxwesten.nl/images/b/c/1/9/1/bc1914f395a325d4ae9e30d95138e895a164f7ad-0053141895947.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/005_3141895947.jpg)

While looking around I came across a modification of [Marc Liyanage's](http://www.entropy.ch) "open terminal here" plugin, by [Geoff](http://geoff.mollyandgeoff.com/blog/2008/02/09/programmatically-create-new-tabs-in-leopards-terminal) using an applescript by [Jacob Rus](http://pastie.caboo.se/14358) to open the menus and submenus from OSX apps programmatically.

I've mixed-and-matched the scripts and the [ttterm (Themed Tab Terminal) script](https://maxwesten.nl/blog/articles/themed-osx-terminal/ttterm10.zip) is the result. For the script to work, you need to enable "Access for assistive devices" on the "Universal Access" screen in "System Preferences". [ ![Access Assistive Devices](https://maxwesten.nl/images/5/2/9/f/a/529fa4f9333b6456fd0f57955be4ee04d6ab7a60-3145175000f15b22612fo.jpg)](https://maxwesten.nl/user/pages/02.blog/01.articles/themed-osx-terminal/3145175000_f15b22612f_o.jpg)

If this script is placed in your path, it can be called in two ways:

**1)** Opens a new tab with the selected \[themename\]

```
ttterm [themename]

```

**2)** Opens a new tab with the selected \[themename\] and runs the \[command\] in the new terminal.

```
ttterm [themename] [command]

```

So if I want an ssh connection with pentagon, I can call:

```
ttterm Pentagon ssh max@pentagon

```

This is still quite long, so I add an alias to my .bashrc file and off we go.

 [ Previous Article](https://maxwesten.nl/blog/articles/my-adobe-max-report) [Next Article ](https://maxwesten.nl/blog/articles/installing-php-on-osx-leopard)

#### Related Posts

- 100 

     [Setting up MockSMTP on OSX 10.7(Lion) for local PHP development](https://maxwesten.nl/blog/articles/setting-up-mocksmtp-on-osx-10-7lion-for-local-php-development "Setting up MockSMTP on OSX 10.7(Lion) for local PHP development")
- 90 

     [Installing PHP 5.2.8 on OSX Leopard 10.5.6](https://maxwesten.nl/blog/articles/installing-php-on-osx-leopard "Installing PHP 5.2.8 on OSX Leopard 10.5.6")
- 80 

     [Installing xDebug 2.0.4 or 2.1 on OSX](https://maxwesten.nl/blog/articles/installing-xdebug-204-or-21-on-osx "Installing xDebug 2.0.4 or 2.1 on OSX")
- 75 

     [Easiest local development environment on OSX](https://maxwesten.nl/blog/articles/easiest-local-development-environment-on-osx "Easiest local development environment on OSX")
- 75 

     [Setting ACL on webfolders when using GIT or SVN](https://maxwesten.nl/blog/articles/setting-acl-on-webfolders-when-using-git-or-svn "Setting ACL on webfolders when using GIT or SVN")

[←](https://xn--sr8hvo.ws/%F0%9F%92%95%F0%9F%8E%89%E2%A4%B5%EF%B8%8F/previous)An IndieWeb Webring 🕸💍 [→](https://xn--sr8hvo.ws/%F0%9F%92%95%F0%9F%8E%89%E2%A4%B5%EF%B8%8F/next)

---

## Navigation

- Parent: [Articles](https://maxwesten.nl/blog/articles.md)
- Previous: [Installing PHP 5.2.8 on OSX Leopard 10.5.6](https://maxwesten.nl/blog/articles/installing-php-on-osx-leopard.md)
- Next: [My Adobe MAX report](https://maxwesten.nl/blog/articles/my-adobe-max-report.md)
