Peculiar popup notification by gdbus

Dear Colleagues,

I’m developing a small application for IMAP/SMTP email checking; I need some additional customisation and integration over mailnag capabilities. Everythink is working except notification by popup under Gnome which I test with gdbus call --session --dest=org.freedesktop.Notifications --object-path=/org/freedesktop/Notifications --method=org.freedesktop.Notifications.Notify "" 0 "" 'Hello world!' 'This is an example notification.' '[]' '{"urgency": <1>}' 5000.

Commonly, there is no popup “bubble” issued. The notifications are clearly included in Notification area, also the indication bullet is visible. Only one way how to make the popup to appear is to switch-off all extensions
followed by another restart.

Notifications by other applications seems to be working correctly; the problem is computer specific, and I can reproduce one only on a single machine. I call the gdbus command both by a C++ code and directly on terminal. The C++ application has .desktop file with X-GNOME-UsesNotifications=true.

To provide additional user feedback, I try also play a sound by gdbus call --session --dest=org.freedesktop.Notifications --object-path=/org/freedesktop/Notifications --method=org.freedesktop.Notifications.Notify "" 0 "" 'Hello world!' 'This is an example notification.' '[]' '{"urgency": <1>, "sound-file": <"/path/.email.wav">}' 5000. Again, there is no response.

I’m working under Gnome 3.38.5 on Debian 11 (Bullseye).

Can you give me advices, tips to debug the difficulty? Also, If there is another way how to do, I can follow them. I prefers shell commands over a source code.

Thanks a lot,
FH

That suggests that an extension interferes with notification popups (either by accident or on purpose).

By my oppinion, it does not help. When I did switch-off all extensions, a fresh restart
“activates” gdbus testing notification which works great. Unfortunatelly, next call of gdbus inside my application show no popup as well as all following gdbus calls by hand in terminal are visualy muted.

Also, is it possible that some extension blocks actions of another application trought dbus?

Thanks for your response.
FH

Hm. I found the crutial point: notification popups stop appearing when the sound optional parameter is passed. It does not matter if extensions are activated or if one is called by hand or by an application.

It is the solution — a notification sound can be issued by another way. It can be considered as a bug or an unexpected property by Gnome enthusiasts?

notification popups stop appearing when the sound optional parameter is passed.

That’s a bug, with a proposed fix here.

1 Like