Ubuntu

wishlist: integrate libnotify in Thunderbird notifications

Reported by Caspar Clemens Mierau on 2009-02-25
208
This bug affects 34 people
Affects Status Importance Assigned to Milestone
Mozilla Thunderbird
Fix Released
Wishlist
Thunderbird Indicator
Undecided
ikus060
thunderbird (Ubuntu)
Wishlist
Rolf Leggewie
Declined for Jaunty by Brian Murray
Nominated for Lucid by Ryan Li

Bug Description

Binary package hint: thunderbird

Jaunty introduces a new central notification scheme via libnotify that already displays information like joined wireless networks or status changes from Pidgin. As Thunderbird is able to display notifications on incoming mail it would increase user experience to integrate those Thunderbird notifications in the new scheme.

Currently you can do this manually by installing the Thunderbird add-on "Mail Alert", the package "libnotify-bin" and add something like

/usr/bin/notify-send -i /usr/share/pixmaps/mozilla-thunderbird.xpm %sendername %subject

to the Mail Alert configuration.

xref bug 469880 which added it to firefox

Adding this demo of notifications from Shuttleworth's blog, see URL above.

Created an attachment (id=363937)
Libnotify Support

This patch uses LIBNOTIFY by default to show notifications.

(In reply to comment #3)
> Created an attachment (id=363937) [details]
> Libnotify Support
>
> This patch uses LIBNOTIFY by default to show notifications.

I haven't looked at this in detail yet. My immediate question is given the code you are removing, what happens if libnotify isn't installed?

Binary package hint: thunderbird

Jaunty introduces a new central notification scheme via libnotify that already displays information like joined wireless networks or status changes from Pidgin. As Thunderbird is able to display notifications on incoming mail it would increase user experience to integrate those Thunderbird notifications in the new scheme.

Currently you can do this manually by installing the Thunderbird add-on "Mail Alert", the package "libnotify-bin" and add something like

/usr/bin/notify-send -i /usr/share/pixmaps/mozilla-thunderbird.xpm %sendername %subject

to the Mail Alert configuration.

John Vivirito (gnomefreak) wrote :

Do you not receive notifactions in the lower right corner when new incoming mail is downloaded? I get this by default in tb 2.0.0.19 and 3.0

Changed in thunderbird:
importance: Undecided → Wishlist
status: New → Incomplete

Hi John,

yes I do receive the normal notifications from Thunderbird. But beginning with Jaunty Ubuntu pushed a centralized notification scheme as you can see on Mark's blog:

http://www.markshuttleworth.com/archives/265

So the point about following the guideline and integrating Thunderbird in it as it is confusing to have notifications from apps like pidging coming from notification-daemon, while Thunderbird serves them on his own. It breaks user experience.

Created an attachment (id=364802)
Notification when Libnotify is installed and enabled.

Notification Looks like this image, when Libnotify is installed and enabled.

Created an attachment (id=364803)
Notification when Libnotify is not installed.

Notification looks like this image when Libnotify is not installed in the machine.

Created an attachment (id=364831)
Adding Libnotify Support

I have checked that this patch works fine when Libnotify is not installed in the machine.
The only issue with this patch is that it shows libnotify notifications only with trunk build, not with 1.9.1 branch.

In the trunk there is a check at line
http://mxr.mozilla.org/mozilla-central/source/toolkit/components/alerts/src/nsAlertsService.cpp#78 available. It checks wether Libnotify is available or not. If it there, use Libnotify notifications.

But this check is not available in the 1.9.1 branch.

I have checked the patch with latest mozilla trunk and it worked pretty well.

IMO, this patch is not enough for thunderbird. The new notification system involves improvement to the notification bubbles, but since it removes the ability to use actions, it is supposed to go in together with a more stateful indicator for message notifications: libindicate.

Just this patch would be a regression, as it a) doesn't support accumulated notifications (e.g. notify more than one new message) and b) libnotify implementation on trunk doesn't provide actions - which is why we didn't pull this to 1.9.1 branch yet; and c) notification daemon in ubuntu will not have action support.

The complete approach would be:
 1. design a toolkit interface for abstract messaging notifications
 2. implement a default implementation that is xul based (in xulrunner)
 3. implement libindicate/libnotify support which is used if both are available on the system (in xulrunner)
 4. make thunderbird (and other messagin/chat apps based on xulrunner) use new messaging notification component.

Since Ventnor is responsible for the toolkit code, I think his thoughts would be helpful here. Adding him to the CC.

So how is libindicate different from libnotify exactly?

I can't find any API documentation on libindicate.

(From update of attachment 364831)
Based on comments 8 and 10, this seems a little early.

If I understand "action" correctly, as being able to click on the alert and Thunderbird will come up, then loosing that certainly isn't acceptable.

Additionally, as there isn't libnotify support on 1.9.1 branch, I expect we'd either want to ifdef MOZILLA_1_9_1_BRANCH or hold off a month or two until we do a formal comm-central branch if its going to regress functionality.

If I've understood wrong, feel free to re-request review.

Changed in thunderbird:
status: Incomplete → Confirmed

No its allright. We don't want this patch without libindicate support in thunderbird/messaging.

Maybe some background on libindicate.

In short libindicate is supposed to answer the frequently asked question: "What to do with notifications where actions are valid use case".

So, the canonical design team found that there are a few use cases where actions in notification make sense. One is messaging notifications. However, they found that actions in notifications are only one possible answer and that one should rather use a more stateful messaging indicator on the desktop. This is why ubuntu now ships a messaging indicator on the gnome-panel by default; apps like evolution and pidgin add their messages there.

Similarly, the idea would be that thunderbird adds its messages there. ... chatzilla too or other xulapps that want to provide messaging.

To make the transition smooth, we could make that toolkit component sensitive on whether the right facilities are available on the desktop or otherwise fallback to actionful notifications.

Oh, I will provide more info on the libindicate API details once we have them. so stay tuned.

ikus060 (ikus060) wrote :

Hi,

I developed a plugin for thunderbird that use libnotify to display NewMail notification.

I attach the .xpi file

I hope it's can be useful.

pleiades (jg-nelox) wrote :

The addon isn't working for me.

After installing the addon, Thunderbird notification behaviour is unchanged.

Thunderbird version 2.0.0.21 (20090319)
Ubuntu jaunty (development branch) \n \l

ikus060 (ikus060) wrote :

Hum,

I should mention the plugin doesn't replace the default notification of thunderbird. I didn't manage to do it. So you need to change your preference and uncheck 'Show an alert'

Also, ensure you have 'notify-send' command line by running the following command :
$ notify-send coucou

it's should display a notification.

Marques Johansson (marques) wrote :

You can bump up the maxversion in the install.rdf of your xpi file. I've tested it on Shredder/3.0b3pre (the development branch of Thunderbird) and it works fine.

Kilbasar (kilbasar) wrote :

ikus060,

Thanks a lot, your plugin works great! It has some minor bugs ("Summary/Body" alert when starting up, alerts for sent messages, sometimes alerts saying "2 messages" when it's just one), but otherwise makes thunderbird fit in perfectly with jaunty, and does a great job of replacing the ugly built-in notifications. I suggest you try and get this added to the official Mozilla Add-ons directory, as once Jaunty is officially released, many many people will want this.

Cristian KLEIN (cristiklein) wrote :

I totally agree. This plugin is definitely a very good start for integrating Thunderbird with the new notification framework.

ikus060 (ikus060) wrote :

Hi all,

As suggest, I put the add-on on public domain. Starting by Mozilla Add-ons web site : https://addons.mozilla.org/en-US/firefox/addon/11530/. I invite people to submit comments or reviews. (Note: the add-on is in nomination for public domain)

Also, I create a new project in launchpad for bugtraking, translation, source code hosting and publishing release. See https://launchpad.net/libnotify-mozilla.

Alexander Sack (asac) wrote :

> As suggest, I put the add-on on public domain. Starting by Mozilla Add-ons web site : https://addons.mozilla.org/en-US/firefox/addon/11530/.

please remember to include a LICENSE file in the top level of your .xpi; also remember to add a license boiler plate to all source files. otherwise its difficult for us to distribute your xpi as we need properly licensed sources.

Alexander Sack (asac) wrote :

note: i am not saying that we will use this by default; but we definitly would like to have that packaged in the archive so we can gather feedback on how well the integration is done.

Alexander Sack (asac) wrote :

oh, forgot. if you extension has binary components we definitly need the full sources (also properly licensed)

ikus060 (ikus060) wrote :

Hi Alexander Sack,
Check version 0.1.1. I include license information. (https://launchpad.net/libnotify-mozilla/+download)

OrelEagle (oreleagle) wrote :

Hello,

it works well, thanks a lot!

One small issue though: I get a notification each time I move a message to another folder, including the trash.

I also noticed that the extension was uploaded as a Firefox extension although it's for Thunderbird: https://addons.mozilla.org/en-US/firefox/addon/11530/. As the installation process is different, new users might have problems...

John Vivirito (gnomefreak) wrote :

can you right click the .xpi than click save as (save it somewhere) than use thunderbirds add extension and select that? That is how you normally install extensions for Thunderbird. if you click it normally to install it it defaults to Firefox. That is normal and has been that way for a long time. If we get it in repos than installing the .deb will add it to Thunderbird. Assuming he lists depends on thunderbird I'm not sure that firefox should be a depend however i wouldnt use anything but Thunderbird and maybe Seamonkey mail news.
This would be great to have in repos.

Aaron Kelley (aaronkelley) wrote :

I think it works with both Firefox and Thunderbird, the idea being you can install it in Firefox to get "Download complete" and such notifications. Change the URL to Thunderbird (https://addons.mozilla.org/en-US/thunderbird/addon/11530/) and you'll see that it is added for Thunderbird as well. You have to save the .xpi file and manually install it, though.

Anyways, my complaint is that, with Thunderbird, it likes to notify when new junk mail arrives. This doesn't happen with Thunderbird's regular notifier.

OrelEagle (oreleagle) wrote :

I think it works with both Firefox and Thunderbird, the idea being you can install it in Firefox to get "Download complete" and such notifications.

That would be great indeed! However, I've installed it in Firefox and the notifications don't change...

 Change the URL to Thunderbird (https://addons.mozilla.org/en-US/thunderbird/addon/11530/) and you'll see that it is added for Thunderbird as well.

Cool. I didn't know extensions were displayed for both applications. Thanks for the explanation.

 You have to save the .xpi file and manually install it, though.

That's what I meant with the different process ;) Fortunately mozilla's website behaves correctly.

Anyways, my complaint is that, with Thunderbird, it likes to notify when new junk mail arrives. This doesn't happen with Thunderbird's regular notifier.

Yes, it seems you get a notification every time something has been added in a folder, regardless of which folder and if it's a new mail or if you just moved the email.

Harry Rickards (hrickards) wrote :

OrelEagle: That would be great indeed! However, I've installed it in Firefox and the notifications don't change...

According to https://launchpad.net/libnotify-mozilla/+announcement/2516 Firefox support is being developed.

ikus060 (ikus060) wrote :

Hi All,

I thing I have to give some explanation here.

>I think it works with both Firefox and Thunderbird, the idea being you can install it in Firefox to get
>Download complete" and such notifications.

Yep, at the beginning, the add-ons as create in the need for Thunderbird and Firefox. Now that firfox team move on. I don't plan to work on Add-on for Firefox. In fact, I'm working with Thunderbird team to put the notification feature upstream instead of a add-on. But I alway find Thunderbird team work slowly. So I write the add-on.

> I also noticed that the extension was uploaded as a Firefox extension although it's for Thunderbird

Yep, and I don't understand why. The add-on setting doesn't include support for firefox.

> Anyways, my complaint is that, with Thunderbird, it likes to notify when new junk mail arrives. This
> doesn't happen with Thunderbird's regular notifier.

Yep, I run into this problem. I think I fix it know. In fact, it's only happen for IMAP account (in my case).

> Yes, it seems you get a notification every time something has been added in a folder, regardless of
> which folder and if it's a new mail or if you just moved the email.

It's been fix in trunk. I'm gonna release a new version very soon. Because I don't want to release a new version every week. I'm waiting a bit to see if there is any more problem to solved. Next version should include most of the fix (junk mail, move mail, encoding, etc.). Also, it's gonna be ready of translation. :)

I invite people to visit the launchpad project : https://launchpad.net/libnotify-mozilla

Regards,

Patrik Dufresne

Would love to look into providing a service for this but I still cannot find any documentation on the API (which is strange, Ryan Paul said he got libindicate working in his messaging program).

That gives some examples on how to use libindicate in a couple of languages and has some pointers (Disclaimer: I didn't try it myself, just googled it to help Michael).

Maybe I'm missing something, but I find this a really braindead API decision: indicate_server_set_desktop_file

1) How are we supposed to find out where the desktop file is?
2) What about users who don't have a desktop file for Thunderbird or any other Mozilla application that will use this?
3) Why can't we set the name and icon of our application directly (and anything else the library reads from the desktop file)?

ikus060 (ikus060) on 2009-06-21
Changed in libnotify-mozilla:
assignee: nobody → ikus060 (ikus060)
status: New → Fix Released
Changed in thunderbird:
status: Unknown → Confirmed
Micah Gersten (micahg) wrote :

Marking this Triaged as we have an upstream bug.

Changed in thunderbird (Ubuntu):
status: Confirmed → Triaged
Christoph Korn (c-korn) wrote :

It seems to me that upstream work on a fix is currently stalled because they don't know where to get the desktop file from.
If there is no other way to set the information provided by the desktop file would it be wise to create an Ubuntu specific patch for thunderbird which fixes this bug ?
We know where the desktop file will be.

I asked asac to provide the information upstream for the bug. There's
still plenty of time before Lucid to do this right. :)

On 12/23/2009 06:24 PM, Christoph Korn wrote:
> It seems to me that upstream work on a fix is currently stalled because they don't know where to get the desktop file from.
> If there is no other way to set the information provided by the desktop file would it be wise to create an Ubuntu specific patch for thunderbird which fixes this bug ?
> We know where the desktop file will be.
>
>

Micah Gersten (micahg) on 2009-12-24
Changed in thunderbird (Ubuntu):
milestone: none → ubuntu-10.04-beta-1

(just adding Fedora me too from bug https://bugzilla.redhat.com/show_bug.cgi?id=550689)

(In reply to comment #17)
> (just adding Fedora me too from bug
> https://bugzilla.redhat.com/show_bug.cgi?id=550689)
Can you use the see also function for that ?

Shat is the status of libindicate? If you want to support it, is it available/supported by any other linux distribution? Is it a part of any desktop environment? I can't find any Fedora package for instance.

The reason that we used the desktop file is becuase it provides a lot of nice information. The high resolution icon, the name, the description and those are already translatable. Desktop applications on Linux do have desktop files whether they get added by upstream sources or distributors. For instance, Thuderbird wouldn't show up in the software center to be installed unless it had a desktop file.
We haven't uploaded the API documentation anywhere on the web officially. It is included in the libindicate-doc package. I have uploaded that here:
  http://people.canonical.com/~ted/libindicate/current/
Hopefully that helps.

Jeremy Nickurak (nickurak) wrote :

Some information was provided upstream, but the questions still haven't been answered:

> Michael Ventnor 2009-06-10 20:19:57 PDT
>
> Maybe I'm missing something, but I find this a really braindead API decision:
> indicate_server_set_desktop_file
>
> 1) How are we supposed to find out where the desktop file is?
> 2) What about users who don't have a desktop file for Thunderbird or any other
> Mozilla application that will use this?
> 3) Why can't we set the name and icon of our application directly (and anything
> else the library reads from the desktop file)?

Also troubling from upstream:

> Martin Stránský 2010-01-06 07:07:59 PST
>
> Shat is the status of libindicate? If you want to support it, is it
> available/supported by any other linux distribution? Is it a part of any
> desktop environment? I can't find any Fedora package for instance.

> Ted Gould added the following comment to Launchpad bug #334344:
>
> The reason that we used the desktop file is becuase it provides a lot of nice
> information. The high resolution icon, the name, the description and those are
> already translatable. Desktop applications on Linux do have desktop files
> whether they get added by upstream sources or distributors. For instance,
> Thuderbird wouldn't show up in the software center to be installed unless it
> had a desktop file.
> We haven't uploaded the API documentation anywhere on the web officially. It
> is included in the libindicate-doc package. I have uploaded that here:
> http://people.canonical.com/~ted/libindicate/current/
> Hopefully that helps.

I couldn't find this comment in this bug... but if true, the lack of an officially presented API anywhere standard is a barrier towards anyone other than Ubuntu taking this up.

Created an attachment (id=423907)
patch v2 for comm-central

You know, libnotify supports from 1.9.2. The target of comm-central is 1.9.2 and trunk (1.9.3). So we should cleanup code for this.

Micah Gersten (micahg) on 2010-03-08
Changed in thunderbird:
milestone: none → 3.1
Changed in thunderbird:
status: Confirmed → Fix Released

(In reply to comment #22)
> landed
> http://hg.mozilla.org/comm-central/rev/5c4928d99bad

As discussed with Makoto, partly as a result of bug 555536, I've just backed this out from the comm-1.9.2 branch:

http://hg.mozilla.org/releases/comm-1.9.2/rev/e54fc70745ba

Therefore updating the target milestone accordingly.

*** Bug 296683 has been marked as a duplicate of this bug. ***

Thunderbird 3.1 final is out. How do you make it to use this feature?

You don't. It has been moved to target Thunderbird 3.2 according to comment 23 above: https://bugzilla.mozilla.org/show_bug.cgi?id=478463#c23

However, there is an extension that works with libnotify and the indicator applet. See here for more details: http://ubublogger.wordpress.com/2010/06/28/new-version-of-libnotify-for-mozilla-0-2-stable/

Why is this marked as Resolved/Fixed?

My thought exactly. Such important feature is missing.

RESOLVED/FIXED does indeed appear to be a mistake. Reopening.

Now I'm confused. Comment 22 says this landed on trunk. Comment 23 says this was backed out of TB 3.1 (but that means it stays on trunk = TB 3.2). A bug is "FIXED" when it landed on trunk (independent of any releases).

Quite right; my mistake. Good catch, Ben!

SnoStorm (n0nl1nearsb0x) wrote :

According to the upstream bug, this has been delayed until 3.2.

Micah Gersten (micahg) on 2010-08-20
Changed in thunderbird:
milestone: 3.1 → none
Oleg O Andreev (olegoandreev) wrote :

Then fun fact is that even when 3.2 is release, it won't support notifications with NotifyOSD but will show its' own box a-la "Downloads complete" in Firefox. This is due to the inability of NotifyOSD to respond to actions (see comment: https://bugs.launchpad.net/ubuntu/+source/notify-osd/+bug/501393/comments/85). You can try current Thunderbird (3.2a1pre at the time of writing) with NotifyOSD and with vanilla notification-daemon.

I think it's a bit inappropriate, but I would like to point out this very nice addon for Thunderbird: https://addons.mozilla.org/thunderbird/addon/191033/

It "highlights" the Thunderbird window in window list when new message arrives, thus making it much easier to switch to it. It is certainly not a full replacement for proper libnotify/libindicate support.

Changed in thunderbird:
importance: Unknown → Wishlist
Rolf Leggewie (r0lf) wrote :

Anything left to be done for TB in Ubuntu?

Changed in thunderbird (Ubuntu):
assignee: nobody → Rolf Leggewie (r0lf)
milestone: ubuntu-10.04-beta-1 → none
status: Triaged → Incomplete
Rolf Leggewie (r0lf) on 2014-03-26
Changed in thunderbird (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.