Ripcord Dev Logo Ripcord Development — View Ticket Login or Create Account
Ticket UUID: 54e3d9fef238b06aea19a95b6dd30742810a95a5
Title: Notifications not working on Linux (under a specific desktop configuration)
Status: Deferred Type: Bug
Severity: Minor Priority: Low
Subsystem: General Resolution: External_Bug
Last Modified: 2019-07-04 17:59:25
Version Found In: 0.4.3
severeoverfl0w2019-05-02 09:32:44

When I enable the desktop notifications, and then click "Test notification", I see a notification on ripcord but not in my desktop.

If I use notify-send 'foo' on the command line I see a notification though.

notify-send uses libnotify, which as far as I'm aware is the standard Linux notification protocol.

tmad40blue2019-05-02 20:38:31

You will probably need to enable the system tray icon to see desktop popup notifications from Ripcord.

cancel2019-05-03 03:11:49

Distro specific issues will need more information. We're probably not going to be able to do anything about it. Notifications in Linux work for me and other people. Please do not set the severity to "important" unless it's actually important. Marking as rejected unless more information is provided.

severeoverfl0w2019-05-03 07:50:24

I did enable it, but I don't actually have a system tray on my machine, so maybe it's related to that?

Generally, programs work because they use libnotify. All I do is run https://dunst-project.org/

cancel2019-05-03 08:48:03

Ripcord uses the standard freedesktop spec for notifications via dbus. If you are using a nonstandard setup that relies on custom behavior, there is nothing Ripcord can do about it. (invoking a shell program to display a notification is not a tenable solution.)

cancel2019-05-03 08:51:52

Do you know if libnotify is using its own custom fallback notifications instead of the dbus spec? I suspect that's what is happening.

severeoverfl0w2019-05-03 08:52:20

notify-send is just a command-line helper which sends things using the spec. https://wiki.archlinux.org/index.php/Desktop_notifications is suggesting to me that libnotify implements the freedesktop spec you are mentioning.

severeoverfl0w2019-05-03 09:11:20

I just tested this out using dbus directly from python:

>>> import dbus >>> item = "org.freedesktop.Notifications" >>> path = "/org/freedesktop/Notifications" >>> interface = "org.freedesktop.Notifications" >>> app_name = "Test Application" >>> id_num_to_replace = 0 >>> icon = "/usr/share/icons/Tango/32x32/status/sunny.png" >>> title = "Notification Title" >>> text = "This is the body" >>> actions_list = '' >>> hint = '' >>> time = 5000 # Use seconds x 1000 >>> >>> bus = dbus.SessionBus() >>> notif = bus.get_object(item, path) >>> notify = dbus.Interface(notif, interface) >>> notify.Notify(app_name, id_num_to_replace, icon, title, text, actions_list, hint, time) dbus.UInt32(5)

resulted in me seeing the notification.

cancel2019-05-03 09:20:33

Ah cool, thanks for trying that. Hmm. I reopened the ticket. I will try to set up a VM sometime soon to see why this isn't working.

cancel2019-05-03 09:24:28

Ok, I think this is because Qt is specifically using this https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem/

As you pointed out, you don't have a tray-like thing in your desktop, so it can't show anything. Qt's API for applications must be lying, then, since Ripcord should grey out the "Test Notification" button if the tray icon is said to not be available.

I might see if I can add another checkbox or toggle for Linux where I will just use QDBus directly to sent the notification using the org.freedesktop.Notifications spec.

severeoverfl0w2019-05-03 09:28:49

Sorry about the formatting, apparently the triple backtick didn't work :(.

I don't suppose ripcord is conditional on the system tray to send notifications is it? Is there any kind of debug mode I can turn on in order to see an attempt at making a notification?

Using dbus-monitor I can't see anything at all when I click "Send test notification", but I can when windows are opening/changing.

cancel2019-05-03 09:34:24

I think this must be a Qt quirk. It just gives up and does nothing if it can't create a status item.

cancel2019-07-04 17:59:25

Updating ticket title and status since there is nothing I can do about this right now.