xfce4-notifyd works fine when I log in after rebooting, but when I log out and log in again it fails to start. idefix Solaar> systemctl --user status xfce4-notifyd ● xfce4-notifyd.service - XFCE notifications service Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2020-04-23 07:25:58 EDT; 30min ago Process: 74269 ExecStart=/usr/lib64/xfce4/notifyd/xfce4-notifyd (code=exited, status=1/FAILURE) Main PID: 74269 (code=exited, status=1/FAILURE) CPU: 17ms Apr 23 07:25:58 idefix systemd[1345]: Starting XFCE notifications service... Apr 23 07:25:58 idefix xfce4-notifyd[74269]: Invalid MIT-MAGIC-COOKIE-1 keyUnable to init server: Could not connect: Connection refused Apr 23 07:25:58 idefix xfce4-notifyd[74269]: cannot open display: :0 Apr 23 07:25:58 idefix systemd[1345]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE Apr 23 07:25:58 idefix systemd[1345]: xfce4-notifyd.service: Failed with result 'exit-code'. Apr 23 07:25:58 idefix systemd[1345]: Failed to start XFCE notifications service. Manually starting via systemctl works fine. This might be related to https://bugzilla.xfce.org/show_bug.cgi?id=16690
To get a better understanding as to whether this is limited to systemd, have you tried to not start notifyd via systemd but via DBUS?
How would I set that up?
What distribution are you on? You shouldn't have to set anything up. If notifyd is installed normally it comes with a dbus file and you can simply disable systemd. It will then be auto-started by the system as soon as the first notification is sent. You can e.g. use notify-send no the commandline or use the Notification Settings dialog to "Show preview"
On further investigation this does not appear to be related to bug 16690 as there is only one Notification listener idefix ~> ls -l /usr/share/dbus-1/services/*Notifi* -rw-r--r--. 1 root root 132 Jul 27 2019 /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service
I'm running Fedora 31. I don't think I changed anything recently but the problem may have been around for quite some time as I very seldom log in without rebooting. Part of the problem may be that I see notifications that appear to be queued up to view at login (maybe from the previous login?).
Even if I disable via systemctl --user disable xfce4-notifyd.service the service is started, probably as part of xfce4 startup. I'll try a reboot and see what systemd looks like.
When I try to enable the unit I get a warning saying that there is nothing that needs enabling. The message indicates that one reason for this is that the unit is started via D-Bus. So maybe the problem is that if there are notifications to show at login time then the unit is started somehow too early? I'll try to see if I can do a clean login.
Yes, if there is a very early notification (in my case from emacs starting up and complaining) then xfce4-notifyd fails to start, probably because the authentication mechanism is not fully set up. So it looks like xfce4-notifyd needs to delay startup if authentication is not fully set up.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/xfce4-notifyd/-/issues/29. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev