Integrate with indicator-applet

Bug #429395 reported by Harald Solheim on 2009-09-14
This bug affects 71 people
Affects Status Importance Assigned to Milestone
Thunderbird Indicator

Bug Description

It would be very nice to have the plugin integrating thunderbird with indicator-applet in addition to notify-osd.

I guess most of the information needed is already retrieved, and that a reasonable approach would be to call a python script interfacing with libindicate.

Ruben Verweij (ruben-verweij) wrote :

Thanks for your suggestion.
I have updated my branch with the support for indicator-applet. Could you please test if it works as you expected?
I don't use an application that uses the indicator-applet right now, so I'm uncertain of its supposed behaviour.
Thanks in advance.

Changed in libnotify-mozilla:
assignee: nobody → Ruben Verweij (ruben-verweij)
importance: Undecided → Wishlist
status: New → Fix Committed
Harald Solheim (harald-solheim) wrote :

Thanks for responding so quickly.
With the version from your branch thunderbird does not show in indicator-applet. I will see if I can figure out what the problem might be, but I do not have too much experience with this.

Ruben Verweij (ruben-verweij) wrote :

Yes, I installed the necessary packages and saw that there's something wrong with the python script. I will look into that.

Changed in libnotify-mozilla:
status: Fix Committed → In Progress
Harald Solheim (harald-solheim) wrote :

So far I haven't figured out why the plugin does not register in indicator-applet.

I also noticed that the notification buffer is not emptied, so that when I receive a new email it is shown by notify-osd as the (x+1)'th element in a list including the x emails received since the notify-osd or thunderbird was started.

Ruben Verweij (ruben-verweij) wrote :

I have updated my branch with a correct python file, so it works now.
I am only not sure of what is supposed to be displayed, so maybe you could help me out.

Changed in libnotify-mozilla:
status: In Progress → Fix Committed
Harald Solheim (harald-solheim) wrote :

The plugin shows "Dependency error" ... "the python-indicate package needs to be installed". I am on karmic and have installed
python-indicate 0.0.3+1-0ubuntu1

Okay, that's strange. Could you please post any error messages in
Tools->Error Console?

Harald Solheim (harald-solheim) wrote :

Error: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://libnotifypopups/content/overlay.js :: sendNotification :: line 277" data: no]
Source File: chrome://libnotifypopups/content/overlay.js
Line: 284

Error: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://libnotifypopups/content/overlay.js :: sendNotification :: line 277" data: no]
Source File: chrome://libnotifypopups/content/overlay.js
Line: 240

Error: uncaught exception: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://libnotifypopups/content/overlay.js :: sendNotification :: line 277" data: no]

Ruben Verweij (ruben-verweij) wrote :

Stranger and stranger. Could you verify that you have in
the extensions folder?
It should be here:
/home/username<email address hidden>
Thanks again for your help so far.

On my setup the extension is found at /home/username/.<email address hidden> was not there. I have now copied it to content/ manually. Now I don't get any error message.
Now every time I received an email an entry like this is added to the indicator-applet:

Mozilla Thunderbird Mail/News
(icon) New Mail Received 0m

I get multiple instances of this in the menu and they do not disappear - not when the mail is read and not when I click on it.

What is expected to happen is that when thunderbird starts up it adds an entry "Thunderbird" with a list of tracked mailboxes with the number of unread mails since last user action on the specified mailbox. Should look something like this (no icons):

Mozilla Thunderbird Mail/News
  Inbox (Gmail) 0
  Inbox (Local) 2

Clicking "Mozilla Thunderbird..." should give focus thunderbird. Clicking "Inbox (Local)" should preferable focus this folder, and it should set the counter to zero. If the user acts in that folder in thunderbird the counter is also set to zero.


Ruben Verweij (ruben-verweij) wrote :

Okay, I will try to fix it.
Already asked the Indicator Applet developers for support.
Thanks for your excellent suggestions and advice!

Changed in libnotify-mozilla:
status: Fix Committed → In Progress

Thanks. When this works I think we will better integration with the new notification system on ubuntu than what is presently done for evolution.

I have seen that the FireTray addon shows number of unread mails for thunderbird. Maybe it is possible to find some ideas for how to do things there. It also has the option that the close button hides the taskbar entry which would be very nice in combination with indicator-applet.

Jens Janssen (jayjay) wrote :

So far I also use FireTray and libnotify combination (like Harald). Perfect team together. But in Ubuntu Karmic things changed. We have the new notification system and FireTray's trayicon (number of unread mails) becomes redundant. FireTray's option to start Thunderbird minimized remains. This is very useful for me, because I added Thunderbird to autostart. So every Login Thunderbird gets started and directly minimized to Tray. Cool thing.

Is it possible to put the Minimize-Thing into libnotify, so only one Plug-In is needed?

Don't know how this is done with Evolution Mail. There must also be some Autostart and Minimize-Thing.

Sorry for little Off-Topic :-)

Ruben Verweij (ruben-verweij) wrote :

Thanks for your suggestions.
It is indeed possible to add the minimize effect you describe. I will
look into this.
Actual integration with the applet is a bit harder though, so that will
require some more time.

Ruben Verweij (ruben-verweij) wrote :

I have some experimental implementation in my branch.
Could you please test it and give suggestions on how to improve it?
Thank you in advance.

Changed in libnotify-mozilla:
status: In Progress → Fix Committed
Ruben Verweij (ruben-verweij) wrote :

I'm working on the appearance suggested in this post:, but currently it is not implemented.

Ruben Verweij (ruben-verweij) wrote :

It is now, though it still needs some work.

YS (yamisonic) wrote :

Firstly, thank you for developing such an extension! :)

Then, I've got a problem with Ubuntu Karmic and experimental branch. I built and installed the .xpi and manually copied in the "~/.mozilla-thunderbird/[profile_number].<email address hidden>/content/" (thanks to #10 comment). Everything seems to be allright but, even if notify works, I don't see any changes with indicator-applet.

Are there any options to enable?

Andreas B. (andreas-b123) wrote :

I can confirm this problem. I create a shortcut to Thunderbird like you wrote on your blog and installed "python-indicate" (sudo apt-get install python-indicate) because of an import error shown on the commandline.

Now I don't see any error, but it don't work.

YS (yamisonic) wrote :

Mea culpa, Installing python-indicate corrects my problem. Thunderbird is now able to communicate with the indicator-applet (it gives folder and time).

However, I can't access to thunderbird by clicking on the indicator applet, which is not able to detect when I close thunderbird. When I launch thunderbird twice, there are to instances in the indicator applet.

Ruben Verweij (ruben-verweij) wrote :

I can't replicate your issue of seeing two indicators with two Thunderbird windows open. Are you sure you are using the version from the experimental branch?
The clicking on the indicator and the close detection are things I'm working on, I will report back when they're implemented. Thanks for your feedback!

YS (yamisonic) wrote :

I built the extension after having downloaded your work with bazaar (bzr branch lp:~ruben-verweij/libnotify-mozilla/experimental).

I'm trying to replicate my issue but I can't... Thanks a lot for your work! :)

YS (yamisonic) wrote :

I let thunderbird running for a while, and here we are:

Should I copy and paste some logs?

PS: french guy spotted!

Ruben Verweij (ruben-verweij) wrote :

Yes, please.
I updated the branch with code that has (rudimentary) click and raise support.

YS (yamisonic) wrote :

Where will I find interesting logs? :/

I updated to 9th review, and /content/ is needed. :P

Brutus (brutus-dmc) wrote :

I've installed "python-indicate", created a file in '~/.config/indicators/messages/applications', downloaded the latest bzr version (revno: 12), build it and installed the xpi through the "install new add-on" dialog in Thunderbird.

After installation I got the following error: "Something went wrong with adding an indicator to the indicator Applet.". The directory '~/.<email address hidden>' contains three files ('chrome.manifest', 'install.rdf' and 'LICENSE') and one directory ('chrome'). In the chrome folder I only got one file: 'libnotify-mozilla.jar'

I extracted 'libnotify-mozilla.jar' to 'libnotify-mozilla' under the 'chrome' folder but I still got the same error. The folder got two subfolders ('chrome/libnotify-mozilla/content' & 'chrome/libnotify-mozilla/locale') I then linked both to all upper folders and now the error is gone until I quit Thunderbird.

Everything else seems to work so far. Thunderbird shows up in the indicator menu, new mail is shown correctly and if I click it, it pops up in Thunderbird. There are a few glitches though:

* The "description" under the Thunderbird heading in the indicator menu remains,even when Thunderbird is started.With Empathy or Evolution this is not the case, the descriptions is gone after the program is started.

* Thunderbird won't get the focus when i click it or new mail notices, when it is not on the same workspace. I got the same problem with Empathy so this might be unrelated.

So it seems your branch works fine, it probably just bailed on the install. Do I need to extract the jar? Or just put it somewhere ellse? What are the correct places for all the subfolders?

Anyway, great work!

Brutus (brutus-dmc) wrote :

I also noted that the indicator shows new mail in the 'Drafts' folder. I think this folder should better be ignored.

sanmiguel9 (againsttcpa84) wrote :

Hello Ruben,
thanks a lot for your great work!

Today I downloaded the latest version (no 13) in bzr, run ./ to build the extension, made sure python-indicate was already installed ("sudo apt-get install python-indicate"), installed the extension inside Thunderbird 3 and enabled the indicator option in the preferences menu of the extension.

Unfortunately the indicator applet does not work. When a new email arrives, I get the same error message as Brutus (comment #26) and the following error message appears in the error console of Thunderbird:

Error: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://libnotifypopups/content/overlay.js :: sendIndicators :: line 156" data: no]
Source File: chrome://libnotifypopups/content/overlay.js
Line: 170

Once I close Thunderbird, a similar error message shows up in the error console:

Error: [Exception... "Component returned failure code: 0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST) [nsIProcess.init]" nsresult: "0x80520006 (NS_ERROR_FILE_TARGET_DOES_NOT_EXIST)" location: "JS frame :: chrome://libnotifypopups/content/overlay.js :: libnotifypopups_unLoad :: line 388" data: no]
Source File: chrome://libnotifypopups/content/overlay.js
Line: 397

Then I tried the trick of Brutus and extracted the "libnotify-mozilla.jar" and linked the two subfolders ("content" and "locale") to the two folder levels above. -->

<email address hidden>
-- content (link)
-- locale (link)
-- chrome
-- -- content (link)
-- -- locale (link)
-- -- libnotify-mozilla
-- -- -- content
-- -- -- locale

This configuration solved the problem, no error messages anymore and new emails are shown in the indicator applet :-)

By the way, once Thunderbird is closed, there is no entry in the indicator applet anymore. However, Empathy, Evolution and Pidgin do still have an entry once they are closed and these entries can be used to launch the corresponding programs. Would this also be possible for Thunderbird, or was the current behavior of Thunderbird implemented on purpose?

sanmiguel9 (againsttcpa84) wrote :

Ok, I got the information from Ruben's (?) blog ( how to add a starter entry in the indicator applet.

"[...] launch Thunderbird from the Indicator Applet, you can create a file named ‘thunderbird’ in the /usr/share/indicators/messages/applications/ folder with the following contents: ‘/usr/share/applications/thunderbird.desktop’ "

In my case I had to use /usr/share/applications/thunderbird-3.0.desktop

Ruben Verweij (ruben-verweij) wrote :

@sanmiguel9 & Brutus: I will look into the problem with the jar file that is not properly handled, this should work automatically. ;-)
The Draft and Template folders are now properly ignored, the code can be found in the main branch.

@sanmiguel9: That's indeed my blog. ;-) I think I will create a ppa for easy install of the addon.

Thanks for all your interest and helpful feedback!

Ruben Verweij (ruben-verweij) wrote :

The files are now properly installed. I'll make a ppa so the addon can be easily installed.

Ruben Verweij (ruben-verweij) wrote :

Update: the indicator applet is now updated every 1 minute with all the unread mail from all the accounts. I'm planning on merging this into trunk and releasing a new version, but firstly I would like to have some feedback. Is it ready and stable enough already?
Thanks again for your useful feedback.

Jens Janssen (jayjay) wrote :

Hi Ruben, today, I started to test experimental branch. Any idea how to make Thunderbird invisible and running in background (like firetray does)?

bodypilot (gerjohultink) wrote :

Hi ruben,

I ran bzr branch lp:~ruben-verweij/libnotify-mozilla/experimental and ./ about an hour ago updating to the 28th revision. I noticed the following bugs;

1)When I receive new mail I get notified through Notify-OSD. There's also a "<emailaccountname: <# of unread emails> 0m" line added to the indicator (the envelop) (Thunderbird and Empathy are also listed).
However the indicator does not change color. It stays transparent while the expected behavior is to become dark grey (which it did when I had from your blog installed).

2)With the .xpi from your blog installed clicking on the "<emailaccountname: <# of unread emails> 0m" indicator-entry would bring focus to the Thunderbird window. It doesn't do that with the latest revision (clicking the Thunderbird entry does bring focus to the Thunderbird window).

3)Draft folder does not get properly ignored. Unread mails in the Drafts folders get ignored until new mail arrives. When new mail arrives two lines get added to the indicator.
One "<emailaccountname: <# of unread emails> 0m" entry for the account wich received mail and one "<emailaccountname: <# of unread emails> 0m" for the account which has the unread mail in the Drafts folder.

4)It takes about a minute for the "<emailaccountname: <# of unread emails> 0m" line to dissapear from the applet when I've read all my mail. Is that what you ar revering to in post #32? It seemed to go a lot faster (almost instantaneously) with the .xpi from your blog.

Ruben Verweij (ruben-verweij) wrote :

Thanks for your comments. It should be fixed now.
It seems libnotify and libindicate are going to be supported by default in Thunderbird 3. I'll wait for some more tidings before expanding this extension.

Pete Stucke (pstucke) wrote :

I'm really enjoying this feature, but I have one question: is it possible to notify me about new stuff from the News & Blogs portion of Thunderbird? The lack of notifications for RSS feeds is the only thing keeping me from dumping my mailbox alert add-on and going with yours full-time.

John Talbot (jwtalbot) wrote :

The Experimental Alpha1 plug-in for Thunderbird 3.0.5pre (Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20100428 Lightning/1.0b1 Shredder/3.0.5pre) is brilliant...

Did find a bug though...
changing the state of an email from unread to read (ie reading the email) does not reflect in the indicator drop down menu..
Please check attachment :)

Running Lucid

i did the same as "bodypilot" and get the notifications with libnotify, but Thunderbird still doesn't use the indicator-applet like Evolution would that be an option in the future?

correction: it uses indicator-applet, but only if there's new mail (what is great ;-), would it be an option for the future to let Thunderbird sit in the applet like Evolution and closes to the applet so it runs in the background?

Ruben Verweij (ruben-verweij) wrote :

Thank you all for your suggestions.
@Baron Flopsy: Right now the code only checks the folders every minute, I am planning on converting this into some kind of listener, it is being worked upon.
@Jan Schuermann: This is also something I am planning to work on after the holidays.
I will keep you updated on any progress.

Changed in libnotify-mozilla:
status: Fix Committed → In Progress

There's another problem with the experimental plugin.

I only see the item in indicator-applet when I've got new mail. But if I later receive MORE mail, then Thunderbird is listed TWICE in indicator-applet. Well, the second one disappears after a while, but it's a bug nevertheless.

Wait, no, it doesn't disappear. I still have two Thunderbirds in indicator-applet

Brian (rephorm) wrote :

I have a large modification of the indicator support at
(one of these days I'll learn how to use bzr).

One issue with the current indicator support is that a separate instance of is run every few seconds. If the old one hasn't quit yet, a duplicate menu item appears. I tried to solve this by creating a fifo which can connect to. Thunderbird just sends some 'show' and 'hide' messages through the fifo, keeping the running in the bg.

I also changed it to only show indicators on new messages as the messaging menu wiki entry recommends. (I often have a lot of unread email and don't want a green icon showing all of the time).

Any way, if anyone wants to try it out, the link is above.

fosk (oscarrdg) wrote :

@Brian: is there any .xpi to download somewhere in order to try out your new modifications?

Anyway, thank you very much for your work!

Ruben Verweij (ruben-verweij) wrote :

@Brian: Thanks for your efforts. I've been very busy lately, and I was meaning to improve this, but it's great you already have code available. I will look into your code and import it into launchpad. Thanks again!

Ruben Verweij (ruben-verweij) wrote :

I have pushed the code into trunk, it was looking good. So it's available for testing now.

Dasha (daria-shubina) wrote :

First, I want to thank you for your work!

And then I want to tell about the bug in experimental alpha1 version:
Indicator-applet icon in tray doesn't want to be transparent again after you have read all new messages (but it isn't a new bug). But if you have 2 new messages, then you read one, it turns from 2 to 1, but after you read the last new message, it doesn't want to turn from 1 to 0.

And in addition, I think this pop-up notification is useless, because we already have one notification from thunderbird itself (but such comment I've also seen here).

One more thing: it would be very nice to add following feature: when you press close thunderbird, it minimizes to tray (like firetray extension does).

Dasha: Notify-OSD is a transparent message that only notifies for a few seconds. The indicator applet needs to have the message in order to be consistent with what it was designed for.

And yes, closing thunderbird should minimize it to the indicator. I hate that behavior, but in order to be consistent with the current methods, it needs to be done. But I'm sure this is known.

emgsilva (godsiem) wrote :

I also want to show my appreciation for this nice work!

However, I have weird behaviour in my panel notification, this was already referred before... I get a notification that I have new messages, after I read all the messages in Thunderbird, the notification in the panel keeps the state that there is a new message (the green envelope)... Is there any solution for this? I have installed it yesterday (8 Jun) from the lp:libnotify-mozilla.


Ruben: This really is a fantastic job you've done here. I salute you. I'd help out more but I'm not a programmer.

However, I will point out that it might be wise to capitalize the "E" in "Compose email". Every other applet capitalizes the words as if it were a title.

Awesome work, finally found a solution.
A quick note that might help other users browsing for a solution:
The thunderbird addon for fixing this issue (notifications, tray indicator-applet) you can find over at . ( direct link: ).

Comment #31 mentions a PPA, but I didn't find it while looking over the comments..

Claude LaFrenière (climenole) wrote :

A "No Choice" for users is always a bug imho.

This apply for this indicator about the email client (here Thunderbird)
but also for the other options: Instant Messaging/VoIP (e.g. Skype) and µblogging...

Let users choose. :-)

DaDummy (dadummy) wrote :

You wrote in your blog that you wanted to implement the minimize Thunderbird to Indicator Applet but didn't know how to archieve that..
While browsing through the web I stumbled upon this Addon that does almost the same from the PoV of Thunderbird.


I'm not sure that minimizetotray would help because it's dealing with the notification area. It'd be cool if it were usable; however, I'm guessing the indicator-applet uses a different approach and thus code.

It'd be nice to be proven wrong. I'd like this minimize ability as much as you can :P

Hello Ruben,
thanks a lot for your great work! I use your Thunderbird Indicator 1.3 (xul-ext-indicator) from, - and it work good on my ubuntu 10.10.
But i have 2 little problems.
1) I want translate menu (contact and compose message). Coulde you say me, that file i must edit?
2) Thunderbird don`t minimize to tray (so i use add-on minimize to tray, that view own icon, - it is not good((( May be you know, how hide icons some application from indicator area?... (like black-list)
Thanks for help!

arno_b (arno.b) wrote :

@Nadezhda Bakhromkina Please use the "answers" feature to ask questions (see at the top of this page). Bug reports are not forum ;)

Changed in libnotify-mozilla:
assignee: Ruben Verweij (ruben-verweij) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related questions