Skip to content

[Bug] Session daemon doesn't claim org.freedesktop.Notifications — notify-send broken out of the box #140

@machin3io

Description

@machin3io

Description

notify-send (and any other tool using the standard org.freedesktop.Notifications D-Bus interface) fails on a fresh Pop!_OS 24.04 COSMIC install:

$ notify-send "hello" "there"
GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name is not activatable

gdbus and dbus-send targeting org.freedesktop.Notifications fail with the same error.

Root cause

The cosmic-notifications daemon started by the COSMIC session exposes the /org/freedesktop/Notifications object path (visible via busctl --user tree) but never claims the well-known name org.freedesktop.Notifications on the session bus. There is also no D-Bus activation service file shipped for it.

From busctl --user list | grep notif on a running session, the daemon only appears under its ephemeral connection names (:1.50, :1.52) — org.freedesktop.Notifications is absent.

Workaround

Creating a D-Bus service file manually and reloading:

mkdir -p ~/.local/share/dbus-1/services

cat > ~/.local/share/dbus-1/services/org.freedesktop.Notifications.service << 'EOF'
[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/bin/cosmic-notifications
EOF

busctl --user call org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus ReloadConfig

After this, notify-send works — but it spawns a second instance of cosmic-notifications (D-Bus activated) that runs outside the compositor session. This new instance displays notifications at the top-right corner, while the original session daemon displays them at the center-top (the expected COSMIC position). So the workaround gives functional notifications but with wrong positioning and a duplicate process.

The D-Bus-activated instance also logs:

ERROR cosmic_notifications::subscriptions::notifications: Failed to setup panel dbus server DAEMON_NOTIFICATIONS_FD is not set.

This confirms the standalone instance cannot properly integrate — it requires DAEMON_NOTIFICATIONS_FD, a file descriptor presumably passed by the COSMIC session compositor. A D-Bus service file alone cannot fix this; the session-launched daemon is the only one that can work correctly.

Expected behavior

The session-managed cosmic-notifications daemon should claim org.freedesktop.Notifications on the session bus at startup, so that notify-send and other standard notification tools route through the properly integrated compositor instance and work out of the box.

Environment

  • Pop!_OS 24.04 LTS (VERSION_ID=24.04, UBUNTU_CODENAME=noble)
  • Kernel: 6.18.7-76061807-generic
  • cosmic-notifications version 0.1.0~1771346893~24.04~b58fb29
  • Binary: /usr/bin/cosmic-notifications
  • libnotify-bin installed
  • Session: Wayland / COSMIC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions