Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
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.

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

iTerm supports background images.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

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