Red Hat Bugzilla – Bug 1301604
notifyd cannot connect to X
Last modified: 2016-08-08 12:04:12 EDT
Description of problem:
Jan 25 14:43:00 oat dbus-daemon: Activating service name='org.freedesktop.Notifications'
Jan 25 14:43:00 oat org.freedesktop.Notifications: (xfce4-notifyd:2393): Gtk-WARNING **: cannot open display:
Jan 25 14:43:00 oat dbus-daemon: Activated service 'org.freedesktop.Notifications' failed: Process org.freedesktop.Notifications exited with status 1
No notifications are being displayed.
Version-Release number of selected component (if applicable):
How are you logging in? This is a Xfce session?
You reported this against rawhide, but you have f23 xfce4-notifyd installed?
Did this work correctly in the past?
It's rawhide. It did work in the past (usually).
$ cat .xinitrc
This looks very related to my issue:
When I source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, notifications start showing up.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.
More information and reason for this action is here:
> It's rawhide. It did work in the past (usually).
> $ cat .xinitrc
> exec startxfce4
> This looks very related to my issue:
> When I source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, notifications
> start showing up.
Hmmm. I recently noticed that I was having this exact problem - after doing a bit of research, I realized that startfluxbox wasn't sourcing /etc/X11/xinit/xinitrc-common which seems to be causing problems for lots of things, including xfce-notifyd - putting
at the top of my ~/.xinitrc has fixed the problems I had with xfce-notifyd not knowing how to open the display, along with the other bizzare errors I was getting at startup. Apparently this is not a unique problem with just xfce's wm.
ok. Moving this over to xinit for comment/patching then.
So if you define a .xinitrc in your homedir, then /etc/X11/xinit/xinitrc never gets executed, as xinit prefers using ~/.xinitrc when present.
So if you want the functionality provided by /etc/X11/xinit/xinitrc-common you indeed need to source it explicitly from your ~/.xinitrc. Alternatively you can create a ~/.Xclients which will get executed by /etc/X11/xinitrc after it has sourced /etc/X11/xinit/xinitrc-common, this will also ensure that a ssh-agent is started if installed.
So all in all this is not a bug, if you create ~/.xinitrc you are overriding everything done by /etc/X11/xinitrc and you will need to do all it does yourself. If you do not want that create a ~/.Xclients instead.