xfce4-notifyd should be started on login, not by dbus
Submitted by Marcin Kocur
Assigned to Simon Steinbeiß @ochosi
Description
Current behavior: xfce4-notifyd is started by dbus when message comes Expected behavior: xfce4-notifyd is started on Xfce start, not by dbus.
Explanation:
Xfce4-notifyd installs a file /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service
KDE installs a file /usr/share/dbus-1/services/org.kde.plasma.Notifications.service
They both say: [D-BUS Service] Name=org.freedesktop.Notifications
In the effect, they conflict with each other and dbus doesn't know which one to launch.
So what happens if we're running Xfce and trying to receive a notification when KDE's file is installed? We get no notification because dbus tries to send it to plasma:
linux dbus-daemon[588]: [session uid=1000 pid=588] Activating service name='org.freedesktop.Notifications' requested by ':1.41' (uid=1000 pid=830 comm="notify-send test ") inux plasma_waitforname[834]: org.kde.knotifications: WaitForName: Service was not registered within timeout linux dbus-daemon[588]: [session uid=1000 pid=588] Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
What happens if we remove KDE's file? Well, everything works:
[mk@linux ~]$ systemctl --user status xfce4-notifyd ● xfce4-notifyd.service - XFCE notifications service Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor pre> Active: inactive (dead)
[mk@linux ~]$ notify-send "test" [mk@linux ~]$ systemctl --user status xfce4-notifyd ● xfce4-notifyd.service - XFCE notifications service Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor pre> Active: active (running) since Mon 2020-04-13 15:52:43 CEST; 2s ago Main PID: 840 (xfce4-notifyd) CGroup: /user.slice/user-1000.slice/user@1000.service/xfce4-notifyd.service └─840 /usr/lib/xfce4/notifyd/xfce4-notifyd
[mk@linux ~]$ journalctl |grep 'XFCE notifications' kwi 13 15:52:43 linux systemd[579]: Starting XFCE notifications service... kwi 13 15:52:43 linux systemd[579]: Started XFCE notifications service.
According to Yaakov Selkowitz in https://bugzilla.redhat.com/show_bug.cgi?id=484945 a desktop environment should launch the notification system on it's start. Indeed, launching xfce4-notifyd manually via systemctl --user status xfce4-notifyd resolves the issue, until next reboot.
What ToZ is saying on the forums (https://forum.xfce.org/viewtopic.php?pid=46014#p46014) "xfce4-notifyd should be started (and restarted as needed) via dbus".
So please consider if changing to autostart on login isn't a better idea.
Version: 0.6.0