Notifications from Firefox

If i receive some notifications from Firefox, they are gone after a hile. But it seems they are not in the Gnome notification centre. Is there a way to include the in to the notification center?

Firefox uses the Freedesktop notification API to implement web notifications. That’s one of the notification backends supported in GNOME, so Firefox notifications should already appear in the notification list until they are closed (but note that “closed” doesn’t necessarily mean “closed by the user”).

Can you confirm that when you receive a notification, it is in the list (superv)?

When the notification is no longer displayed as banner (that is, as popup underneath the date+time), is it still in the list?

If the answer is yes in both cases, and the notification disappears unexpectedly later, then I may have an idea what’s going on, and we could address it on the GNOME side.

If not, then either there’s a custom notification implementation in play (so we don’t know about them at all), or either Firefox or the web app closes the notification programmatically (for example to implement a timeout).

I have made a test with Browser Notification Tester - KenHerbert.dev and HTML5 Web Notifications Test - Bennish.net

At the time, the notification is visible, it is also visible in the Gnome notification center. After i open the notification center, the notification itself disappears. If i now open the center again , the notification is gone there also.

I expected that it only disappears in the notification center, when i clicked the notification itself or the one in the notification center.

BTW: I have installed standard Manjaro Gnome edition. I don’t know if there is something installed, what impacts the notifications besides the standard. Since in new to Linux desktop, i have no idea for what application/library’s should look.

BTW: Normally, i see a little dot, when there is a new notification in notification center. This is not the case with Firefox notifications. I have now tested also Chromium. The behavior is completely identical there.

Update: If i search for installed things with the term “notification”, i get the following:

I’m running Gnome, XFCE is only installed as fallback DE. That’s why there is an XFCE app in the list.

For running processes, i get this:

grafik

Mmh, that’s actually what I see with both test sites you suggested (Firefox 101 from flathub).

Can you run the following in a terminal and repeat the test?

$ dbus-monitor --session 'interface=org.freedesktop.Notifications' | grep Close

Tell should tell us when the notification is closed programmatically.

Browsers follow the notification spec which states that notifications without an associated service worker are supposed to be closed after a couple of seconds: Notifications API Standard

I get the following results (using the above testpages):

dbus-monitor --session 'interface=org.freedesktop.Notifications' | grep Close
signal time=1655021893.421216 sender=:1.13 -> destination=(null destination) serial=1505 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021893.421319 sender=:1.30 -> destination=:1.118 serial=35 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021931.595005 sender=:1.13 -> destination=(null destination) serial=1515 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021931.595031 sender=:1.30 -> destination=:1.118 serial=39 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021957.614614 sender=:1.13 -> destination=(null destination) serial=1525 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021957.614855 sender=:1.30 -> destination=:1.118 serial=43 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021963.024945 sender=:1.13 -> destination=(null destination) serial=1536 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed
signal time=1655021963.025770 sender=:1.30 -> destination=:1.118 serial=47 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=NotificationClosed

Interesting, so the notifications are not closed programmatically by the browser itself.

I’m quite confident that I know what’s going on. To confirm, can you try out this extension?

I also opened a merge request to change the behavior of gnome-shell proper.

Sorry, maybe this is a noob question, but how can i install this extension?

Ignore the question, found the answer at https://www.pragmaticlinux.com/2021/06/manually-install-a-gnome-shell-extension-from-a-zip-file/

Update: After installing the extension, it works as expected. The notification stays in the center until i clicked it. Many thx. I keep this testing a little bit and wil inform you, if i found something interesting. Greetings from Bavaria.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.