I know how to change the background color in Terminal in Mac OS X by using the Preferences window. I would like to be able to use an image as my Terminal background instead, but I don't see an option to set an image as the background.

Is it possible to set an image as my Terminal background? If so, how would I do this? I am using Mac OS 10.5.8.

link|improve this question
feedback

5 Answers

up vote 6 down vote accepted

In Tiger you could select background images in Preferences, but that went away in Leopard. The .terminal files can be exported and imported as a xml property list. The plist "key" node value for the background image is BackgroundImagePath followed by a "data" node that contains a base64 encoded binary property list that has a "string" node pointing to an image file.

<key>BackgroundImagePath</key>
<data>
...base64 encoded binary plist here....
</data>

You can use openssl to decode the data content.

openssl enc -d -base64 

Then convert the binary plist to xml using plutil.

plutil -convert xml1

You will see something like this...

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
 <key>$archiver</key>
 <string>NSKeyedArchiver</string>
 <key>$objects</key>
 <array>
  <string>$null</string>
  <string>/Users/user/Pictures/myimage.png</string>
 </array>
 <key>$top</key>
 <dict>
  <key>root</key>
  <dict>
   <key>CF$UID</key>
   <integer>1</integer>
  </dict>
 </dict>
 <key>$version</key>
 <integer>100000</integer>
</dict>
</plist>

Change the image path and convert the xml plist back to binary and base64 encode it.

plutil -convert binary1
openssl enc -base64

Then set the value of the "data" node to the base64 string.

link|improve this answer
+1 for the clever hack! :) – FrustratedWithFormsDesigner Jan 7 '11 at 0:48
feedback

iTerm supports background images.

link|improve this answer
feedback

I don't believe so. Why would you want an image on there anyways? You would scrap any readability.

link|improve this answer
1  
I dunno, I've seen it done in lots of screenshots of other terminals (usually linux desktops). I agree it's hard on readability, but usually a "tint" effect is applied to the image so that it's washed or faded or darkened to make the text easier to read. In reality, I think this is usually done for making cool screenshots, but if someone can recommend an image file that makes it easier to work, I'd try it. Also, I have a feeling this was possible in early versions of OS X (10.0, 10.1, maybe 10.2), but I don't know about current. – FrustratedWithFormsDesigner Aug 9 '10 at 20:16
second that: I want a white terminal, black letters, plus selective colouring (syntax in vi, some ls colouring). Less distraction! – Henno Aug 9 '10 at 20:17
@FrustratedWithFormsDesigner: that 'tint' is called 'alpha channel', basically making it somewhat transparent. You can usually change the opacity/transparency anywhere from 0% opaque (no image) to 100% opaque (full image). I don't recommend it. If you do, use a n image with large areas of color. you don't want to confuse a dot in the background with a period or whatever. – Rich Homolka Aug 10 '10 at 3:35
@Rich Homolka: Darkening an image, or washing it with a certain color is not the same as alpha-blending it. Alpha-blending != color-blending. I agree with the rest of your comment. – oKtosiTe Jan 6 '11 at 21:10
“Images” can contain solid colors or subtle patterns that retain readability. – Chris Page Jan 5 at 20:53
feedback

If you don't have a pre-existing .term file you can do this as follows:

  1. create a Terminal settings with everything else the way you would like it -- fonts, colors, opacity, etc.

  2. using a text editor create a file named "new.term" containing the following:

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>WindowSettings</key> <array> <dict> <key>BackgroundImagePath</key> <string>/path/to/your/picture.png</string> </dict> </array> </dict> </plist>

  3. run that new.term file in Terminal, quit Terminal, then run Property List Editor.app and open ~/Library/Preferences/com.apple.Terminal.plist

  4. drill down root -> window settings -> new, and right-click->cut the line that says "BackgroundImagePath", and then in root -> window settings find the Terminal setting name you created in the first step, open it up and right-click-> paste the line into there.

link|improve this answer
feedback

As of Mac OS X Lion 10.7, Terminal provides explicit support for background images in Preferences:

Terminal > Preferences > Settings > [profile] > Window > Background > Image

You can even select a folder of images and it will randomly select one each time you create a new terminal with that settings profile. e.g., see the built-in default “Solid Colors”, which uses a folder containing images of…you guessed it…solid colors.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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