Bug 1861829

Summary: xfce4-notifyd never starts
Product: [Fedora] Fedora EPEL Reporter: David Mathog <mathog>
Component: xfce4-sessionAssignee: Mukundan Ragavan <nonamedotc>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel8CC: kevin, mathog, nonamedotc
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch that allows xfce4-notifyd to start none

Description David Mathog 2020-07-29 16:48:06 UTC
Description of problem:
xfce4-notifyd never starts following "startxfce4"


Version-Release number of selected component (if applicable):

xfce4-notifyd-0.6.1-1.el8.x86_64
CentOS 8

How reproducible:
100%

Steps to Reproduce:
1.  start CentOS 8, non graphical
2.  login
3.  run "startxfce4"

Actual results:
xfce4-notifyd does not start.  The failure results in these lines appearing 
in/var/log/message:

Jul 10 11:10:21 poweredge dbus-daemon[1587]: [session uid=0 pid=1587] Activating via systemd: service name='org.freedesktop.Notifications' unit='xfce4-notifyd.service' requested by ':1.54' (uid=0 pid=1771 comm="xfce4-power-manager --restart --sm-client-id 2b411" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jul 10 11:10:21 poweredge xfce4-notifyd[1829]: Unable to init server: Could not connect: Connection refused
Jul 10 11:10:21 poweredge systemd[1550]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
Jul 10 11:10:21 poweredge systemd[1550]: xfce4-notifyd.service: Failed with result 'exit-code'.


Expected results:
xfce4-notifyd does start

Additional info:
See discussion threads:
https://forum.xfce.org/viewtopic.php?id=14228
https://forums.centos.org/viewtopic.php?f=54&t=75141&p=316210#p316210

in the latter there is a patch to /etc/xdg/xfce4/xinitrc which fixes the issue.  The root of the problem is that when it gets down to the service which is supposed to start xfce4-notifyd "DISPLAY" is not defined.  I then worked backwards to a point in xinitrc where it could be set so that it would be inherited properly.  I believe the root of this problem is that originally all of the xfce4 pieces were started in a tree under xfce4-session, but on systemd machines some of that was migrated to systemd services, and the assumption that "DISPLAY" would be properly inherited, which was true originally, broke.

Comment 1 David Mathog 2020-07-29 16:55:05 UTC
Perhaps I cited the wrong package, since that is where the problem appeared, but not where my fix went in.  That would instead be in:

xfce4-session-4.14.2-1.el8.x86_64


which provides /etc/xdg/xfce4/xinitrc

Comment 2 David Mathog 2020-08-04 16:21:15 UTC
Created attachment 1710361 [details]
patch that allows xfce4-notifyd to start

Comment 3 Mukundan Ragavan 2020-08-04 22:14:41 UTC
Any idea why this would be needed for Centos/RHEL?

Comment 4 David Mathog 2020-08-04 22:38:10 UTC
My best guess is that it has something to do with flatpak, which appears to require (perhaps indirectly) all sorts of xdg related pieces.  Xfce4 was installed with:

dnf groupinstall Xfce

flatpak was installed manually to make this new system match all the components on the previous CentOS 7 system.  I do not have access to my notes at the moment for that older system, and cannot recall why it needed flatpak.  Probably somebody needed to run a program which was only distributed in that form.