Bug 1301604 - notifyd cannot connect to X
Summary: notifyd cannot connect to X
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-25 13:51 UTC by Tomas Tomecek
Modified: 2016-08-08 16:04 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-08 16:04:12 UTC
Type: Bug


Attachments (Terms of Use)

Description Tomas Tomecek 2016-01-25 13:51:33 UTC
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 19:20:02 UTC
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 13:37:54 UTC
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 14:20:32 UTC
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 20:28:29 UTC
> 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 14:41:59 UTC
ok. Moving this over to xinit for comment/patching then.

Comment 6 Hans de Goede 2016-08-08 16:04:12 UTC
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.