Fixing colors in Terminal.app on 10.6

It’s Snow Leopard day zero, so of course I had to upgrade. All in all, everything is great. (Especially the multiple monitor window migration fix!)

But the #1 thing that annoys me about all OS X releases in the colors in Terminal.app. They’re pretty much unusable on a dark background (especially the blue). For some time, there have been hacks to fix the problem. Well of course these hacks didn’t work on 10.6 anymore.

Never one to shy away from the problem, I dove in. And we have success!

Here’s how to make it work:

  • Find Terminal.app in Finder (/Applications/Utilities), right click, “Get Info”
  • There is a checkbox “Open in 32-bit mode”, Check it!
  • Install SIMBL. Plugsuit was installed on my machine before, it freaks out because of the 10.6 changes. SIMBL silently just works or doesn’t.
  • Get My updated TerminalColours SIMBL plugin. See the original post for details on how to install it.
  • Restart Terminal.app
  • Enjoy your readable colors!

This works because InputManagers still work in 32bit mode, but not 64bit mode. So by forcing Terminal.app to run in 32bit mode, SIMBL can still hook in. I just had to update TerminalColours to swizzle a new method that 10.6 uses to pick colors.

Hope you enjoy!

Update: I’ve changed the tar.gz download link to one that should work better.

About these ads

84 thoughts on “Fixing colors in Terminal.app on 10.6

  1. I had issues with untarring the file you linked. Ended up just grabbing HEAD off of GitHub and building myself. In the future, you might find it easier to use the “Downloads” tab to post pre-built things for download rather than including it in actual version control.

    Thanks for the fix though!

  2. I’ve moved the download URL to the downloads section on github. Should work better. It’s weird that that linked worked for me in Safari, but I guess not for other people.

  3. Hello, thanks for the update so much!

    Maybe you know how to fix this issue then. Many colors in vim coloure schemes (like vibrantink, tango, etc) just… blink! I know that this is now my vim or anything, cause same setup shows correct colours in screen and on other terminals.

    • Sadly you can’t fix the blinking colors in vim, etc without switching to 16 color color schemes. Sadly since Tiger Apple has reverted the Terminal to be 16 color vs 256 color. ;(

  4. Any idea how we can get apple to include this ANSI color pref pane within the Terminal.App directly?

    Its been 3 upgrades now and this issue has been a constant headache for me. (Really the only reason I even have SIMBL installed). Someone in Cupertino has to have noticed that the blue is too dark/should be adjusted! :D

    Thank you for your work to resolve this tho.

  5. I just checked terminal today when loggin on my webserver. In my opinion the blue has changed with 10.6. In 10.5 it was barely readable, while now in Snow Leopard I can read it really well. No idea why, but I think they changed something….

  6. I can’t believe that with all of the smaller, sensible Snow Leopard UI improvements that a built-in ANSI color picker for Terminal *still* didn’t make the cut. Kind of nutty.

    Thanks for this, though – worked like a charm.

  7. From a clean Snow Leopard install, I needed two more steps to get this to work:

    1. $ sudo chmod a+rx /Library/ScriptingAdditions

    For some reason, this directory was created with no permissions for group/other.

    2. $ open /Library/LaunchAgents /net.culater.SIMBL.Agent.plist and set the key RunAtLoad to false

    Otherwise, the agent runs as root and isn’t allowed to inject into Terminal.

  8. Any idea when you might have a 64-bit version? Seems that keeping Terminal running in 64-bit would be optimal.

    Thanks for your efforts!

  9. Any plans to update the bundle to be 64-bit native? SIMBL 0.9.x is out in beta, which enables 64-bit bundles on snow leopard.

    thanks for the great plugin, can’t wait for 64-bit support!

    cheers,

    – michael

  10. Works fine for me as 64 bit, too. Just fire up Xcode, Edit Project Settings, and set Architectures to Standard (32/64 bit Universal).

  11. I’m having an issue where the colors displayed locally on the system are in white however when I SSH to another host they are accurately displayed. Any thoughts or solutions?

  12. I’m still getting an error message 75% of the time when I load Terminal.app:

    Error

    Terminal 2.1 (v272) has not been tested with the plugin TerminalColours (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer for further information.

    But it still seems to work. Any ideas?

  13. I don’t understand what this does?

    In my standard terminal preferences I have the choice of background colour, along with Text, Bold, Selection and Cursor colours, each has a standard Apple colour picker.

    Can someone enlighten me.

  14. Hey there.

    I’ve just taken the plunge from my old Ubuntu machine to a new Macbook, and changing the 16 ANSI colours in Terminal.app was pretty high up on my list of customisations.

    However, I just noticed while rooting around in the preferences UI, there’s already a sneaky “more..” button in there that lets you do it. Did something change?!

  15. Ack, looks like it’s busted in 10.6.3 (worked in 10.6.2) anyone have a fix yet?

    Error message:

    Terminal 2.1.1 (v273) has not been tested with the plugin TerminalColours (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer for further information.

  16. To get it working on 10.6.3, the Info.plist has a property called MaxBundleVersion that needs to be set to at least “273″. Do that (and follow the other instructions) and it’ll work on the latest version.

  17. @Carl, did you recheck the 32-bit box in the “Get Info” for terminal?

    Here’s the full modified Info.plist that I’m using from Evan’s tgz file (found at ~/Library/Application Support/SIMBL/Plugins/TerminalColours.bundle/Contents after installing per instructions)

    (remove the surrounding pre tags if they show up, not sure if this comment box takes html) :

    
    
    
    
    
    	CFBundleDevelopmentRegion
    	English
    	CFBundleExecutable
    	TerminalColours
    	CFBundleIdentifier
    	sh.ciaranwal.terminal-colours
    	CFBundleInfoDictionaryVersion
    	6.0
    	CFBundleName
    	TerminalColours
    	CFBundlePackageType
    	BNDL
    	CFBundleSignature
    	????
    	CFBundleVersion
    	1.0
    	NSPrincipalClass
    	TerminalColours
    	SIMBLTargetApplications
    	
    		
    			BundleIdentifier
    			com.apple.Terminal
    			MaxBundleVersion
    			273
    			MinBundleVersion
    			240
    		
    	
    
    
    
    
  18. Is there a reason we need to run simbl+plugins to get terminal to show nice colors? I understand the flexibility it gives users, but for a simple approach could we just have someone export the LGCOLORS env var and paste it into our .profile?

    Would love to see a simplified example of getting some nicer colors than default from bash/osx.

    Thanks!

  19. Ted, I’m still getting the error after copying your gist exactly and checking 32-bit. Can you post a link to the particular version of the plugin that you are running? I think I may be running the wrong version.

  20. Carl, dumb question, but you’ve installed SIMBL, right? (I actually forgot to install it on one of my computers and nothing was happening). You need the 0.9.7a version of SIMBL installed:

    http://www.culater.net/dl/files/SIMBL-0.9.7a.zip

    Beyond that, I’m just using Evan’s modified version of the terminal colours plugin linked above with the tweak to the xml file.

    You know it’s working if there’s a “More…” button on the Preferences->Settings->Text tab of the terminal preferences.

  21. Yes, Ted, I’ve installed all the versions you mention exactly as you specified. Have you noticed that the link in this post points to a 64-bit version of the plugin? Perhaps Evan updated the post after you set yours up?

  22. Carl i was having the same issues as you, make sure you have installed the plugin to the correct folder.

    ie: ~/Library/Application\ Support/SIMBL/PlugIns/

    and not /Library/Application\ Support/SIMBL/Plugins/

  23. I had this working fine in 10.5.8, upgraded to 10.6.3, followed all the steps above, and it’s still not working for me. I do have the “More…” button from the Terminal Preferences -> Setting -> Text tab.

    The problem is that when I change the colors, none of them seem to apply. I still have the impossible-to-read ANSI blue on black even though I have the ‘Blue’ color set to something else. Thoughts?

  24. Is this supposed to work immediately? I’ve followed the instructions. SIMBL doesn’t say anything, which is to be expected, I guess. But… I don’t see any colors with the color test script on the site with the IR_Black theme.

    I was pretty sure I installed SIMBL, since I get the “more” option in the text pane of Terminal preferences.

    This is driving me crazy…

  25. So I had the same problem as Ted. I edited the .plist because I was getting the message “Terminal 2.1.1 (v273) has not been tested with the plugin TerminalColours (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer for further information.”

    After downloading IR_Black and putting into the Terminal, low and behold the More… button is there! However, I still get the error message every time I open the Terminal, which is quite annoying

  26. So, let me add a little more detail. As it turns out, Even though I get the “More…” button and different colors in my terminal (which I see the settings for when I click the “More…” button), I am unable to change these colors to what I’d like. If I edit a color under “More…”, it doesn’t take, even though the color appears changed in the setting. When I restart the terminal, the color in the setting is back to the default.

    Also, the message “Terminal 2.1.1 (v273) has not been tested with the plugin TerminalColours (null) (v1.0). As a precaution, it has not been loaded. Please contact the plugin developer for further information.” now always appears when I launch the terminal, even when I remove the TerminalColours.bundle from ~/Library/Application\ Support/SIMBL/PlugIns/!!!!

    The message says TerminalColours.bundle is v1.0. I opened the Info.plist in the Contents folder, and changed the version #’s, but I still get the SAME EXACT error message.

    What this leads me to believe is that there is some other file or setting in terminal which points to TerminalColours.bundle which needs to be edited. However, I could be wrong. I am a newb at this stuff.

    I am going to try to make sure I have the newest version of TerminalColours.bundle, but my hopes aren’t high.

    please reply if you can help. thank you!

    Mac OSX 10.6.4
    Terminal 2.1.1
    (currently, i have terminal opening in 32 bit mode)

  27. Mareo, did you update the terminal colours Info.plist file in the bundle as described above so that it knows about version 273?

    I’ve got things working with that, SIMBL installed, and 32 bit checked.

  28. Ted, I edited the .plist file to accept the version. The funny thing is that the “More…” button appears, meaning the TerminalColours.bundle must be working, right? And yet, I still recieve the error message saying “it has not been loaded”.

    I am also getting a terminal “blinking” issue on startup, thanks to a glitch in Visor. I removed that bundle also and still get the blink. there must be something stored in my computer remembering bundle information!

    do you know where the most up to date version of terminalColours.bundle is?

    Also, do you think uninstalling and reinstalling the terminal could solve this? (if that’s even possible)

    thanks!
    Mac OSX 10.6.4
    SIMBL (newest version, something like 0.9.7)
    Terminal 2.1.1
    (currently, i have terminal opening in 32 bit mode)

  29. *Correction, when visor is removed, the blink issue goes away.* Still the terminalcolours.bundle error message refuses to go away.

    Thanks to visor, color editing now seems to be working and saving my edits. For some reason, I believe it was by installing an OLDER version of visor (2.0 and/or 2.0.1) (I ran the two “exe” files in 2.0 and I don’t know if that did anything) that changing colors in visor began actually working. Now I put the newest 2.2 version on my computer and it works great.

    I still get the window “blink” when terminal first launched, but I think this is unavoidable. It seems that terminal must launch normally before visor adds its effects.

    So my only problem now is the error message which will not go away. Do you think re-installing terminal could fix this?

    thanks very much for your help. if anyone needs info on how i got visor to start working I will be happy to elaborate.

  30. IMPORTANT

    alright, so i figured out that its the version on github (i’m guessing that’s the NEWER one) which is causing the error message.

    the termialcolours link below causes no error message for me AND works perfectly.

    http://bwaht.net/code/TerminalColours.bundle.zip

    (unfortunately, i still can’t get RID of the messages which already began appearing. once one of them is there, they don’t go away)

    • @Mareo thanks for the new package — that did the trick for me on 10.6.4. I can even use Terminal.app in 64 bit mode.

  31. Problem Resolved! Thanks to tips from you guys and some troubleshooting on my own, I have fixed the issue on my SnowLeopard (10.6.4) and would like to post the solution for anyone else with the same problem.

    Requirements:
    Snow Leopard (I have 10.6.4)
    Terminal running in 64 bit mode, version 2.1.1
    SIMBL (0.9.7) (older version should be fine)
    Visor 2.2 or TerminalColours.bundle (NOT newest version: will explain shortly)

    Procedure:
    If you are getting the following error message “Terminal 2.1.1 (v273) has not been tested with the plugin TerminalColours (null) (v1.0). As a precaution…”, and you can’t get rid of it by removing TerminalColours.bundle, then you must completely remove SIMBL and re-install it. This includes the simbl.osax file. Before removing SIMBL, store any .bundle files you might have currently installed temporarily on your desktop. Delete the TerminalColours.bundle. They are located at ~/Library/Application Support/SIMBL.

    The files you must remove are:

    1. /Library/ScriptingAdditions/simbl.osax
    2. /Library/Application Support/SIMBL
    3. ~/Library/Application Support/SIMBL

    Now re-intall SIMBL (http://www.culater.net/software/SIMBL/SIMBL.php) and the error message should be GONE. If not, you didn’t completely uninstall SIMBL.

    Now you should install Visor 2.2 (http://visor.binaryage.com/) or if you don’t want visor, just the TerminalColours.bundle which DOESN’T cause the error message (http://bwaht.net/code/TerminalColours.bundle.zip). That said, I really really recommend Visor. Even if you don’t want the dropdown, you don’t have to enable this feature in Visor. Also, I have tested this method using Visor on two computers and it works.

    If you decide to use TerminalColours.bundle, you need to right click on the bundle in finder, and click “Show Package Contents…”, open the “Info.plist” file and change the MaxBundleVersion to 273, and CFBundleIdentifier to sh.ciaranwal.terminal-colours, or just see Ted Naleid’s post above.

    The next step is to create a text file called .bash_profile which has the following content:

    #colorize the Terminal
    export GREP_OPTIONS=’–color=auto’
    export CLICOLOR=1;

    save the file in your home directory (~)

    Open Terminal and it should be working.

    If you are annoyed by the “window blinking” issue when Terminal Opens (caused by Visor), i highly recommend adding Terminal to your login items and checking the “Hide” box.

  32. thanks!! I’ve been trying this all day, but never none of the sites I used mentioned the 32 bit part. I searched for the “more” button for probably a total of an hour! Works perfect now.

  33. After switiching from Ubuntu to Mac OS X, how can you be as productive as a programmer?…

    The default Terminal.app is great, pretty customizable, and I’ve rarely heard anyone complain about it (not sure why you don’t like it, perhaps you could elaborate?). Here’s a link that solves my biggest problem with Terminal.app http://blog.falling…

    • If this doesn’t work on OS X Lion, you night also try iTerm 2 which has better color support than Terminal.app.

      However, I seem to remember reading that Apple made improvements to Terminal.app in Lion, so better color support might be baked in now.

  34. I’ve found Lion by default supports colors quite well. In your theme (Basic or Pro or Novel, or whatever you have setup as your default theme) just change the colors that are now shown clearly on the right in the Preferences window of Terminal. That’s it. You don’t need any TerminalColors etc

    • It would have to be recompiled. This isn’t really maintained since it was added natively in 10.7 and thusly the plugin isn’t needed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s