Bug 1301604 - notifyd cannot connect to X
notifyd cannot connect to X
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: X/OpenGL Maintenance List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-25 08:51 EST by Tomas Tomecek
Modified: 2016-08-08 12:04 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-08 12:04:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Tomecek 2016-01-25 08:51:33 EST
Description of problem:

Jan 25 14:43:00 oat dbus-daemon[1452]: Activating service name='org.freedesktop.Notifications'
Jan 25 14:43:00 oat org.freedesktop.Notifications[1452]: (xfce4-notifyd:2393): Gtk-WARNING **: cannot open display:
Jan 25 14:43:00 oat dbus-daemon[1452]: 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):

xfce4-notifyd-0.2.4-8.fc23.x86_64


How reproducible:

notify-send asd
Comment 1 Kevin Fenzi 2016-01-25 14:20:02 EST
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?
Comment 2 Tomas Tomecek 2016-01-26 08:37:54 EST
It's rawhide. It did work in the past (usually).

$ cat .xinitrc 
exec startxfce4


This looks very related to my issue:

https://bbs.archlinux.org/viewtopic.php?pid=1567668#p1567668


When I source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh, notifications start showing up.
Comment 3 Jan Kurik 2016-02-24 09:20:32 EST
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Comment 4 tmhikaru 2016-08-05 16:28:29 EDT
> It's rawhide. It did work in the past (usually).
> 
> $ cat .xinitrc 
> exec startxfce4
> 
> 
> This looks very related to my issue:
> 
> https://bbs.archlinux.org/viewtopic.php?pid=1567668#p1567668
> 
> 
> 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

. /etc/X11/xinit/xinitrc-common

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.
Comment 5 Kevin Fenzi 2016-08-08 10:41:59 EDT
ok. Moving this over to xinit for comment/patching then.
Comment 6 Hans de Goede 2016-08-08 12:04:12 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.