! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfce4-notifyd does not start if a notification is created very early
Status:
RESOLVED: MOVED
Product:
Xfce4-notifyd
Component:
general

Comments

Description Peter F. Patel-Schneider 2020-04-23 13:59:41 CEST
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
Comment 1 Simon Steinbeiss editbugs 2020-04-23 15:50:25 CEST
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?
Comment 2 Peter F. Patel-Schneider 2020-04-23 16:42:33 CEST
How would I set that up?
Comment 3 Simon Steinbeiss editbugs 2020-04-23 17:04:33 CEST
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"
Comment 4 Peter F. Patel-Schneider 2020-04-23 18:02:09 CEST
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
Comment 5 Peter F. Patel-Schneider 2020-04-23 18:06:31 CEST
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?).
Comment 6 Peter F. Patel-Schneider 2020-04-23 18:16:14 CEST
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.
Comment 7 Peter F. Patel-Schneider 2020-04-23 18:25:19 CEST
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.
Comment 8 Peter F. Patel-Schneider 2020-04-23 18:39:11 CEST
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.
Comment 9 Git Bot editbugs 2020-05-24 20:08:23 CEST
-- 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

Bug #16746

Reported by:
Peter F. Patel-Schneider
Reported on: 2020-04-23
Last modified on: 2020-05-24

People

Assignee:
Simon Steinbeiss
CC List:
0 users

Version

Attachments

Additional information