0

Notify-send (also zenity --notification --text "") stops working after logging in. Not sure how long it takes to fail but it starts failing silently in that no notification is put up.

Sorry, adding more details:

I'm on Ubuntu 21.10.

As for stops working I mean that after logging in I can do things like "notify-send 'Hello world'" and I get a notification "bubble" in the upper right-hand corner saying "Hello world". Try that again in say a few hours or and notify-send does nothing - no notification is displayed and the exit code is 0.

zenity, however, seems as if it does the same thing as notify-send but with more parameters fails like this:

Earth:zenity --notification --text 'Hello world'
Gtk-Message: 10:55:47.450: Failed to load module "xapp-gtk3-module"

** (zenity:109656): WARNING **: 10:55:47.503: Error showing notification: GDBus.Error:org.freedesktop.Notifications.MaxNotificationsExceeded: Exceeded maximum number of notifications Earth:

So how do I increase the maximum number of notifications (and why is there a limit anyway?).

Searched for GDBus.Error:org.freedesktop.Notifications.MaxNotificationsExceeded: Exceeded maximum number of notifications and found https://jacekkowalczyk.wordpress.com/2013/06/12/how-to-workaround-a-bug-exceeded-maximum-number-of-notifications-on-linux/ but there is no notification-daemon running. Tried running /usr/lib/notification-daemon/notification-daemon, doesn't run - just comes back to the command line with no error. And yes, there was no notification-daemon running after I logged in and notify-send (and zenity) were able to put up notifications. Over some period of time after logging in, this breaks.

Oh, and if important, I'm running compiz with flashback and an X server instead of wayland.

Andrew DeFaria
  • 379
  • 1
  • 3
  • 13
  • Read https://askubuntu.com/help/how-to-ask Are you using Ubuntu? Which supported release? "stops working" is an overly broad problem description. – waltinator Jan 11 '22 at 00:00
  • 1
    the max number is 21... and you have to acknowledge them before you will see any more notifications... I believe it's been like that for at least 10 years that I know of. And with you running flashback, you probably don't see the notification applet. You have to add it to your panel(and it's invisible when you add it)... I tried to answer a similar question a couple of months ago. I suggested they capture the notifications and send them off somewhere permanent or cause a better notification. https://askubuntu.com/questions/1393138 – WU-TANG Apr 07 '22 at 02:15

2 Answers2

0

The solution seems to be to move from Gnome2 -> Mate.

Andrew DeFaria
  • 379
  • 1
  • 3
  • 13
0

My notification daemon locks up when I send notifications to quickly.

  • I like a keyboard with a very fast repeat rate.
  • I like a volume with tiny steps, especially when the volume gets low (adjust by db).
  • I invoke the short delay fast repeat when I want to make a major volume change.
  • My volume changer displays a notification with every step.

The Result:

  • Deadlock happens.
  • notify-send stops working properly.
  • notify-send might not finish execution.
  • notifications that do appear, do so very late.
  • deep evaluation (my very limited abilities) reveals dbus complaints.
/usr/lib/notification-daemon/notification-daemon

The above command directly runs an application and notify-send starts working again. It worked... test again... it didn't work. Here I go again.

I don't understand how notify-send boots, but I cannot find it as a system service via systemctl. If notify-send used systemctl, then crash recovery could be automated (a repair would be better).

@see Debian Bug report logs - #747465 - notification-daemon crashes

He created file /usr/share/dbus-1/services/org.freedesktop.mate.Notifications.service containing:

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/notification-daemon/notification-daemon

I'm sure that's not gong to be enough for me...

pkill notify-send # wow the running instance count that appears
pkill dunst # the notification manager that I use
/usr/lib/notification-daemon/notification-daemon # lets try again

It worked... Test... Crash... Do it again... Didn't work. When will this problem disappear? Edit this post. Test ... working.

Ok. A pause after the restart is required or /usr/lib/notification-daemon/notification-daemon won't exit.

I could slow my keyboard to normal, reduce my volume levels by 99%, and/or pull up a GUI and masturbate my mouse, but that's not why I use Debian. :-)

Paul
  • 340