You are not logged in.
Pages: 1
For some reason on my test CentOS 8 system xfce4-notifyd.service does not run. Details here:
https://forums.centos.org/viewtopic.php … 10#p316210
It is hard to say why it does not run since so far everything just indicates "failed" or "exit-code" with nothing really informative.
I tried uninstalling and reinstalling it, but that made no difference.
Also, what does this do from an end user perspective? I only use Xterms and Firefox, nothing at all fancy on the desktop, and never even noticed the problem until I started reading through /var/log/messages carefully because of a different issue. I would prefer to fix it, but if it is just removed instead, how would that manifest in the xfce4 display?
Thanks.
Offline
I can't help directly, but maybe this thread has some hints for you: https://forum.xfce.org/viewtopic.php?pid=45989#p45989
Offline
To add to @alcornoqui's response, the two general culprits are:
1. xfce4-notifyd user service (systemctl --user) is not enabled and/or running
2. there is a conflicting notification service running (plasma, dunst, etc)
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Me either, but I can google:
--Seen this: https://docs.xfce.org/apps/notifyd/start
--If you just google your subject "xfce4-notifyd.service not running" you will find that you have lots of company.
MX-23 (based on Debian Stable) with our flagship Xfce 4.18.
Offline
The immediate cause is that when the actual process runs DISPLAY is not defined. Determined this as follows:
cp /usr/lib/systemd/user/xfce4-notifyd.service /tmp
cat >/usr/lib/systemd/user/xfce4-notifyd.service <<'EOD'
[Unit]
Description=XFCE notifications service
[Service]
Type=dbus
BusName=org.freedesktop.Notifications
ExecStart=/tmp/test_notifyd.sh
EOD
cat >/tmp/test_notifyd.sh <<'EOD'
#!/bin/bash
echo display1 is $DISPLAY
export DISPLAY=:0.0
echo display2 is $DISPLAY
/usr/lib64/xfce4/notifyd/xfce4-notifyd
EOD
systemctl --user start xfce4-notifyd.service
systemctl --user status xfce4-notifyd.service
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
Active: active (running) since Fri 2020-07-24 15:02:02 PDT; 3min 23s ago
Main PID: 8087 (test_notifyd.sh)
Tasks: 4 (limit: 49591)
Memory: 3.9M
CGroup: /user.slice/user-0.slice/user@0.service/xfce4-notifyd.service
├─8087 /bin/bash /tmp/test_notifyd.sh
└─8088 /usr/lib64/xfce4/notifyd/xfce4-notifyd
Jul 24 15:02:02 poweredge.cluster systemd[1233]: Starting XFCE notifications service...
Jul 24 15:02:02 poweredge.cluster test_notifyd.sh[8087]: display1 is
Jul 24 15:02:02 poweredge.cluster test_notifyd.sh[8087]: display2 is :0.0
Jul 24 15:02:02 poweredge.cluster systemd[1233]: Started XFCE notifications service.
This also works:
cat >/usr/lib/systemd/user/xfce4-notifyd.service <<'EOD'
[Unit]
Description=XFCE notifications service
[Service]
Type=dbus
BusName=org.freedesktop.Notifications
Environment=DISPLAY=:0.0
ExecStart=/usr/lib64/xfce4/notifyd/xfce4-notifyd
EOD
systemctl --user start xfce4-notifyd.service
systemctl --user status xfce4-notifyd.service
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
Active: active (running) since Fri 2020-07-24 15:21:55 PDT; 5s ago
Main PID: 8718 (xfce4-notifyd)
Tasks: 4 (limit: 49591)
Memory: 5.3M
CGroup: /user.slice/user-0.slice/user@0.service/xfce4-notifyd.service
└─8718 /usr/lib64/xfce4/notifyd/xfce4-notifyd
Jul 24 15:21:55 poweredge.cluster systemd[1233]: Starting XFCE notifications service...
Jul 24 15:21:55 poweredge.cluster systemd[1233]: Started XFCE notifications service.
So now the question becomes, why is DISPLAY not set when this service runs???
Last edited by mathog (2020-07-24 22:22:38)
Offline
I'm not that familiar with CentOS, but in Arch there is an /etc/X11/xinit/xinitrc.d/50-systemd-user.sh file that sets up the user dbus environment that among things, sets the DISPLAY. The contents of this file is:
#!/bin/sh
systemctl --user import-environment DISPLAY XAUTHORITY
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
fi
...and it is meant to be run as part of the user profile initiation process (user login).
Does Centos have something similar?
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
I'm not that familiar with CentOS, but in Arch there is an /etc/X11/xinit/xinitrc.d/50-systemd-user.sh file that sets up the user dbus environment that among things, sets the DISPLAY.
<snip>
Does Centos have something similar?
It has the exact same file. I modified it to:
#!/bin/sh
systemctl --user import-environment DISPLAY XAUTHORITY
NOW=`date`
echo "$NOW display $DISPLAY" >> /tmp/xinit_50.log
if command -v dbus-update-activation-environment >/dev/null 2>&1; then
dbus-update-activation-environment DISPLAY XAUTHORITY
echo "$NOW dbus-update-activateion-environment result $?" >> /tmp/xinit_50.log
fi
and verified that it wrote the expected information when run manually. However, it never executes when "startxfce4" is run.
The way I use this system is that it is booted with no X11 (because eventually it will once again be just a computer node with no attached display) and then once logged in, the "startxfce4" command is run. Most systems are set up to start X11 automatically, probably by running xinit directly. "startxfce4" does eventually run xinit:
ps -ef | grep xinit | grep -v grep
root 1307 1236 0 10:54 tty1 00:00:00 xinit /etc/xdg/xfce4/xinitrc -- vt1 vt1
but apparently it never runs the needed script.
Offline
Taking out all the other changes and just putting this in:
diff -au /etc/xdg/xfce4/xinitrc.dist /etc/xdg/xfce4/xinitrc
--- /etc/xdg/xfce4/xinitrc.dist 2020-07-27 11:47:42.698144011 -0700
+++ /etc/xdg/xfce4/xinitrc 2020-07-27 12:03:04.531924307 -0700
@@ -80,7 +80,9 @@
# if XAUTHLOCALHOSTNAME is not set in systemd user session, starting of xfce4-notifyd, DISPLAY etc. will fail
if command -v systemctl >/dev/null 2>&1 && systemctl --user list-jobs >/dev/null 2>&1; then # user session is running
- dbus-update-activation-environment --systemd XAUTHLOCALHOSTNAME=$XAUTHLOCALHOSTNAME
+ #Added DISPLAY and XAUTHORITY, because /etc/X11/xinit/xinitrc.d/50-systemd-user.sh is never run which would otherwise supply these values
+
+ dbus-update-activation-environment --systemd XAUTHLOCALHOSTNAME=$XAUTHLOCALHOSTNAME DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY
fi
resolves the issue. The note suggests they were trying to fix this problem at this location but did not quite succeed. What does Arch have in this part of the file? Does the /etc/xdg/xfce4/xinitrc in Arch run /etc/X11/xinit/xinitrc.d/50-systemd-user.sh explicitly or is it indirectly from some other line?
Offline
Does the /etc/xdg/xfce4/xinitrc in Arch run /etc/X11/xinit/xinitrc.d/50-systemd-user.sh explicitly or is it indirectly from some other line?
The display manager does. If you are not using a display manager, it is recommended to add it to your startup script. See the last note at https://wiki.archlinux.org/index.php/Xinit#xinitrc.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
mathog wrote:Does the /etc/xdg/xfce4/xinitrc in Arch run /etc/X11/xinit/xinitrc.d/50-systemd-user.sh explicitly or is it indirectly from some other line?
The display manager does. If you are not using a display manager, it is recommended to add it to your startup script. See the last note at https://wiki.archlinux.org/index.php/Xinit#xinitrc.
xfwm4 is running. This could be because of the way these things are started. Note the process and parent PIDs in the following:
ps -ef | head -2 | tail -1
root 1 0 0 08:42 ? 00:00:02 /usr/lib/systemd/systemd --switched-root --system --deserialize 18
ps -ef | grep 855
root 855 1 0 08:42 ? 00:00:00 login -- root
root 1237 855 0 08:43 tty1 00:00:00 -bash
ps -ef | grep 1237
root 1237 855 0 08:43 tty1 00:00:00 -bash
root 1309 1237 0 08:43 tty1 00:00:00 xinit /etc/xdg/xfce4/xinitrc -- vt1 vt1
ps -ef | grep 1309
root 1309 1237 0 08:43 tty1 00:00:00 xinit /etc/xdg/xfce4/xinitrc -- vt1 vt1
root 1314 1309 12 08:43 tty1 00:04:12 /usr/libexec/Xorg :0 vt1 vt1
root 1325 1309 0 08:43 ? 00:00:00 xfce4-session
ps -ef | grep 1325
root 1325 1309 0 08:43 ? 00:00:00 xfce4-session
root 1368 1325 0 08:43 ? 00:00:01 xfwm4
root 1373 1325 0 08:43 ? 00:00:01 xfce4-panel
root 1379 1325 0 08:43 ? 00:00:00 Thunar --daemon
root 1387 1325 0 08:43 ? 00:00:00 xfdesktop
root 1395 1325 0 08:43 ? 00:00:00 /usr/libexec/xfce-polkit
ps -ef | grep 1222
root 1222 1 0 08:43 ? 00:00:00 /usr/lib/systemd/systemd --user
root 1227 1222 0 08:43 ? 00:00:00 (sd-pam)
root 1236 1222 0 08:43 ? 00:00:00 /usr/bin/pulseaudio --daemonize=no
root 1262 1222 0 08:43 ? 00:00:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root 1339 1222 0 08:43 ? 00:00:00 /usr/libexec/at-spi-bus-launcher
root 1348 1222 0 08:43 ? 00:00:00 /usr/libexec/at-spi2-registryd --use-gnome-session
root 1351 1222 0 08:43 ? 00:00:00 /usr/lib64/xfce4/xfconf/xfconfd
root 1423 1222 0 08:43 ? 00:00:00 /usr/lib64/xfce4/notifyd/xfce4-notifyd
I suspect that even if xfwm4 does run /etc/X11/xinit/xinitrc.d/50-systemd-user.sh here it would have no effect on the processes started through systemd, since the systemd processes are not children (by any path) of xfwm4 or xfce4-session.
Last edited by mathog (2020-07-28 16:19:13)
Offline
xfwm4 doesn't start things. Generally startxfce4 starts xfce4-session and that kicks things off.
Here is my .xinitrc file. Before running startxfce4, it runs the dbus activation routines:
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
[[ -f ~/.xsession-errors ]] && mv ~/.xsession-errors ~/.xsession-errors.old
startxfce4 > ~/.xsession-errors 2>&1
Note: the .xsession-errors piece is to capture X session errors to that file.
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
xfwm4 doesn't start things. Generally startxfce4 starts xfce4-session and that kicks things off.
Here is my .xinitrc file. Before running startxfce4, it runs the dbus activation routines:
if [ -d /etc/X11/xinit/xinitrc.d ] ; then for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" done unset f fi [[ -f ~/.xsession-errors ]] && mv ~/.xsession-errors ~/.xsession-errors.old startxfce4 > ~/.xsession-errors 2>&1
Note: the .xsession-errors piece is to capture X session errors to that file.
On Arch does systemd start any of the processes shown in my last post, or is it all in a tree under xfce4-session? It looks to me like the scripts originally assumed the latter but as pieces were migrated to systemd starts at least one of the assumptions inherent in that (that DISPLAY would be correctly inherited) broke.
Offline
Here is my "pstree" (vm system with no display manager):
$ pstree
systemd─┬─2*[VBoxClient───VBoxClient───2*[{VBoxClient}]]
├─VBoxClient───VBoxClient───3*[{VBoxClient}]
├─VBoxDRMClient
├─VBoxService───8*[{VBoxService}]
├─dbus-daemon
├─dhcpcd─┬─dhcpcd───dhcpcd
│ └─2*[dhcpcd]
├─login───bash───startx───xinit─┬─Xorg
│ └─xfce4-session─┬─Thunar───2*[{Thunar}]
│ ├─xfce4-panel─┬─panel-10-notifi───2*[{panel-10-notifi}]
│ │ ├─panel-14-action───2*[{panel-14-action}]
│ │ ├─panel-6-systray───2*[{panel-6-systray}]
│ │ ├─panel-7-statusn───2*[{panel-7-statusn}]
│ │ ├─panel-8-pulseau───2*[{panel-8-pulseau}]
│ │ ├─panel-9-power-m───2*[{panel-9-power-m}]
│ │ └─2*[{xfce4-panel}]
│ ├─xfdesktop───2*[{xfdesktop}]
│ ├─xfwm4───2*[{xfwm4}]
│ └─2*[{xfce4-session}]
├─lvmetad
├─ntpd───{ntpd}
├─polkitd───5*[{polkitd}]
├─rtkit-daemon───2*[{rtkit-daemon}]
├─systemd─┬─(sd-pam)
│ ├─at-spi-bus-laun─┬─dbus-daemon
│ │ └─3*[{at-spi-bus-laun}]
│ ├─at-spi2-registr───2*[{at-spi2-registr}]
│ ├─dbus-daemon
│ ├─dconf-service───2*[{dconf-service}]
│ ├─gpg-agent
│ ├─gvfs-udisks2-vo───3*[{gvfs-udisks2-vo}]
│ ├─gvfsd─┬─gvfsd-dnssd───2*[{gvfsd-dnssd}]
│ │ ├─gvfsd-network───3*[{gvfsd-network}]
│ │ ├─gvfsd-trash───2*[{gvfsd-trash}]
│ │ └─2*[{gvfsd}]
│ ├─gvfsd-fuse───5*[{gvfsd-fuse}]
│ ├─pulseaudio─┬─gsettings-helpe───3*[{gsettings-helpe}]
│ │ └─2*[{pulseaudio}]
│ ├─xfce4-notifyd───2*[{xfce4-notifyd}]
│ ├─xfce4-screensav───2*[{xfce4-screensav}]
│ └─xfconfd───2*[{xfconfd}]
├─systemd-journal
├─systemd-logind
├─systemd-udevd
├─udisksd───4*[{udisksd}]
├─upowerd───2*[{upowerd}]
├─xfce4-power-man───2*[{xfce4-power-man}]
├─xfce4-terminal─┬─bash───pstree
│ └─2*[{xfce4-terminal}]
├─xfce4-volumed-p───2*[{xfce4-volumed-p}]
└─xfsettingsd───2*[{xfsettingsd}]
Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline
Pages: 1
[ Generated in 0.016 seconds, 9 queries executed - Memory usage: 619.96 KiB (Peak: 652.8 KiB) ]