Skip to content

Re-implement freedesktop notifications via custom dbus implementation #959

Open
@bastimeyer

Description

I'm not happy with the freedesktop notifications on Linux emitted by Chromium's own API that gets used by the NotificationService's native provider. The data that gets sent on the dbus interface includes NW.js specific stuff that can't be changed via the Chromium API, and this messes with some notification servers. For example, notifications don't get included in the notification history, and other stuff is unsupported or missing.

method call time=1680734599.628142 sender=:1.1270 -> destination=org.freedesktop.Notifications serial=11 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Streamlink Twitch GUI"
   uint32 0
   string "file:///tmp/.io.nwjs.3ajVnx"
   string "Streamlink Twitch GUI"
   string "This is a test notification"
   array [
      string "default"
      string "Activate"
   ]
   array [
      dict entry(
         string "urgency"
         variant             uint32 1
      )
      dict entry(
         string "desktop-entry"
         variant             string "nw"
      )
      dict entry(
         string "image_path"
         variant             string "/tmp/.io.nwjs.4lmnVL"
      )
      dict entry(
         string "image-path"
         variant             string "/tmp/.io.nwjs.4lmnVL"
      )
   ]
   int32 -1

Re-implementing direct dbus communication allows fixing this, but the notification provider would be far more complex. In the past, I had already implemented a freedesktop notification provider, so most of it could be reverted:

While I don't see any feature issues with the dbus-native dependency required for implementing it, there's no recent project activity and its dependencies are outdated as well, with some reported vulnerabilities.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions