Ricky Gervais on Noah »« 25 blasphemous quotes

How Thunderbird’s Lightning color scheme under Ubuntu pissed me off (and how to fix it)

This is a bit of a UI complaint, moreso than a coding one. Fair cop. Most programmers aren’t designers, and most programmers have a mistaken idea that all programmers can do design.

Mozilla Thunderbird is an excellent e-mail client, though with the advent of very good webmail clients, the e-mail client is slowly moving into the cloud and becoming a thing of the past. In the business world, though, e-mail clients are still a virtual necessity — not the least reason being that people have press-ganged the venerable e-mail technology to do just about every business function, from meeting invitations to calendar management to file transfer and even instant messaging. The e-mail client has become your personal information manager, with notes, to-do lists, address books that go well beyond the simple “name and e-mail address” functionality they began with. They have become the central repository for shared business contacts with remote address directories like LDAP and Active Directory (a Microsoft LDAP extension). And the ability to synchronize your handheld personal information manager (née: cellular phone) has become a virtual necessity for businesses today.

I have been using Thunderbird in defiance of the corporate de facto standard of Microsoft Outlook for the five years I’ve been with this company. With the addition of the Lightning calendar extension, which can do meeting requests and accept invitations in a manner compatible with Microsoft Outlook, nobody’s known the difference. So I get to keep my Linux desktop, and I won’t even get forced into installing MS Office under WINE. Win-win for all involved — company doesn’t have to shell out the extra $500 for MS Office Pro, and I don’t have to subject myself to that inferior proprietary software. (What auto junkie wants to buy a car with the hood welded shut?)

However, there was one minor issue after I changed my laptop’s desktop theme. I made the sin of daring to change something unrelated, and suddenly Thunderbird’s to-do list became completely unusable — it was displaying all my tasks in light-gray-on-white. After playing around with some of the other themes available under Ubuntu 10.10’s stock set, I realized what was going on — the to-do tasks were being displayed using the application menu’s font color, rather than the window’s font color. You know, that application menu that says “File, Edit, View” — that one. Not exactly the most intuitive color choice in the world, given that the window background is not usually the background a menu item is rendered against — the menus have their own background color, so themes won’t make menus unreadable accidentally.

Under Windows, those colors probably can’t ever be different. In Linux, under Gnome at least, they most assuredly can. My system menus were configured under the Shiki-Human color theme to match the title bar, so that the application proper starts below where the menus were. It is quite aesthetically pleasing — all the OS bits are dark, and the main application is light, meaning you can focus on one or the other but not both at the same time all that easily.

So, despite tasks being very obviously not menus, Lightning decided to set the rendering for them to something that, in most of the dark-based themes in my collection, would be completely unreadable — nearly invisible in fact — on a white background. This is not a choice the UI designers had to make, in any respect. The fact that the menu color is usually only rendered against the menu background color in themes, means it may never have been tested for contrast against the window background color, or it could intentionally be very close to the window background color. It is not a set of colors that were ever supposed to render against themselves.

Granted, I’m happy that Lightning has switched to using system colors at all — in its earliest versions, all the colors were hard-coded, so no matter what Thunderbird theme or system theme you configured, you’d end up with the same unskinnable (and rather ugly) user interface. So kudos for picking system-based colors at all. However, guys, you definitely picked the wrong ones in this case.

So how to fix it? Luckily, that’s pretty simple, actually!

You’ll want to close out of Thunderbird, obviously, before you go digging around under the hood. It should be relatively non-destructive, but you may also want to make a backup of your mail profile directory just in case — and anyway, it’s good practice to go no longer than a month or so without a good reliable backup.

Firefox and Thunderbird both use the XPI extension format, which is essentially a Java JAR file. When installed, most of these extensions create folders in your profile’s Extensions folder named after themselves (or their UUIDs), and these folders generally contain all the bits of important stuff the extension needs to run — the code, the images, databases it uses, etc. Luckily, Lightning’s chrome — its user interface, not to be confused with Google Chrome, the web browser — is contained in a set of Jar files that are actually named JAR, rather than XPI.

A Jar file is, basically, a RAR file with a specific structure inside. A RAR file is a compressed archive, like the zip file format, only higher compression. If you’re using Windows, you probably won’t need these instructions at all due to the menu font probably being the same as the window font, but just in case, you can get a Windows-based RAR file manager called WinRAR at http://rarlabs.com . Otherwise, your built-in archive manager should probably be able to handle it, but depending on your Linux distribution, you might have to install packages for “rar” and “unrar”. Apt-based distros can find them under those names; you’re on your own for finding RPMs or compiling from source otherwise. Consult your distribution’s documentation or their help forums if need be.

The first step is to locate your profile folder. On Linux, it’s usually in ~/.thunderbird/ and has a funny name like yctyr5bs.default — usually ends with .default, depending on whether you’ve configured Thunderbird to have multiple profiles per user. If you have, then choose the funny-named folder named with .yourprofile (where yourprofile is your profile name… naturally.). This is the folder you’ll want to back up when you’re doing your recommended mail backup — compress it, or just copy it, whatever your preference.

In that folder, there’s an extensions folder. And in THAT folder, as long as you have Lightning installed, you’ll find a folder named {e2fda1a4-762b-4020-b5ad-a41df1933103} — this is Lightning’s UUID. Inside that folder (yes, you’ll keep doing this), there’s a folder named “chrome” — that’s where the jar file you’re looking for is located. It’s calendar.jar . There are other jar files there, with other bits of code you could conceivably mess with if you want to play with them, but you’re on your own with that. If you’re a power user, you might want to run your archive program directly, without all that nonsense of double-clicking in Nautilus or Konqueror. To do that, you could open a terminal and run a command directly. The command, assuming you want to use file-roller to open it, would be:

file-roller ~/.thunderbird/yctyr5bs.default/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103}/chrome/calendar.jar

Note the backslashes before the curly brackets. They’re important. Bash (your terminal shell under Ubuntu) considers stuff inside curly brackets to be special commands, normally — like an inline command inside a command — so the backslashes tells Bash to leave it alone and just process the bracket like it’s a bracket.

Once you’re in the archive, most archive programs will allow you to browse into subfolders, open files in a different editor, edit them, and have the archive automatically updated when you save and close the file. File-roller does, so all you need to do at this point is browse into the skin folder, into the lightning folder, then find and double-click on calendar-task-tree.css. To recap for power users who don’t like reading sentences, the path within the archive is skin/lightning/calendar-task-tree.css .

If you’re playing along at home, using Gnome under Ubuntu, double-clicking this CSS file should open it in GEdit, the Gnome text editor. Hitting Ctrl-F will bring up a Find dialog, which will search for text. We want to search for “MenuText”, without quotes. There are three. Replace them with WindowText, hit the Save button, and file-roller will ask you if you want to update the archive now. You’ll want to do that, so hit Update to update the archive. Close out of all your windows, open Thunderbird, and check your to-do list, they should now take on the same font as every other item within the scope of the window itself. Meaning, you can see it all again, and no longer have an excuse to not get your work tasks done.

So get back to work, slacker.

Let me know if you want pictures of all this, and maybe I’ll get around to doing so someday.

Comments

  1. says

    We frequently find issues with default colors in many applications. My wife and I both use what most people would consider an “inverse” color scheme (darker background with lighter text). There are still a lot of applications that don’t work or play well with some system-defined color schemes.

  2. says

    Heh, thanks Aaron. Didn’t realize that was the case — just always opened with WinRAR under Windows, and carried that behaviour over to Linux. That’s a grandfathered behaviour that’s at least eight years old, in other words. That, and the similarity between “jar” and “rar”, obviously led to my confusion.

    Dan: at least most modern apps are finally taking to properly using system colors, instead of defining their own hard-coded colors. The hard-coded colors are an integration and user experience nightmare. I’m not saying I’m a fantastic UI programmer, but at least I know what makes sense from a user perspective in most cases.

  3. says

    Thanks! I’ve had this problem for some time, but since I wasn’t using the TODO list much I just lived with it.
    I need now that part of Lightning and your page appeared in the first page of Google results.

    Additional thanks for taking the time to put the exact file paths. :-)

    I’ve also found that it’s now reported as a bug in Ubuntu: http://bugs.launchpad.net/ubuntu/+source/lightning-extension/+bug/733578

    Linked from there there is a page where someone explains how to do this withough modifying the JAR file, by putting the style in userChrome.css in your profile directory instead:
    http://getsatisfaction.com/mozilla_messaging/topics/in_lightning_how_to_change_the_text_color_for_task_lists

  4. Andrew Davis says

    Thank you for this post, being so step-by-step, explaining each step and not leaving anything out!

Trackbacks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>