Notification service will not start via systemctl

My notification xfce4-notifyd service will not start via systemctl. I am on xfce on the stable branch. I have the xfce4-notifyd-gtk3 package installed.

Service status:

$ 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: failed (Result: exit-code) since Fri 2019-08-02 10:37:51 EDT; 1min 21s ago
  Process: 108150 ExecStart=/usr/lib/xfce4/notifyd/xfce4-notifyd (code=exited, status=1/FAILURE)
 Main PID: 108150 (code=exited, status=1/FAILURE)

Aug 02 10:37:51 mbox systemd[1916]: Starting XFCE notifications service...
Aug 02 10:37:51 mbox xfce4-notifyd[108150]: Unable to init server: Could not connect: Connection refused
Aug 02 10:37:51 mbox xfce4-notifyd[108150]: cannot open display: 
Aug 02 10:37:51 mbox systemd[1916]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
Aug 02 10:37:51 mbox systemd[1916]: xfce4-notifyd.service: Failed with result 'exit-code'.
Aug 02 10:37:51 mbox systemd[1916]: Failed to start XFCE notifications service.

From journalctl --user -xe

Aug 02 11:58:09 mbox systemd[1916]: Starting XFCE notifications service...
-- Subject: A start job for unit UNIT has begun execution
-- Defined-By: systemd
-- Support: https://archived.forum.manjaro.org/c/technical-issues-and-assistance
-- 
-- A start job for unit UNIT has begun execution.
-- 
-- The job identifier is 461.
Aug 02 11:58:09 mbox xfce4-notifyd[111214]: Unable to init server: Could not connect: Connection refused
Aug 02 11:58:09 mbox xfce4-notifyd[111214]: cannot open display: 
Aug 02 11:58:09 mbox systemd[1916]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://archived.forum.manjaro.org/c/technical-issues-and-assistance
-- 
-- An ExecStart= process belonging to unit UNIT has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
Aug 02 11:58:09 mbox systemd[1916]: xfce4-notifyd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://archived.forum.manjaro.org/c/technical-issues-and-assistance
-- 
-- The unit UNIT has entered the 'failed' state with result 'exit-code'.
Aug 02 11:58:09 mbox systemd[1916]: Failed to start XFCE notifications service.
-- Subject: A start job for unit UNIT has failed
-- Defined-By: systemd
-- Support: https://archived.forum.manjaro.org/c/technical-issues-and-assistance
-- 
-- A start job for unit UNIT has finished with a failure.
-- 
-- The job identifier is 461 and the job result is failed.

This post seems to have the same issue, but solved it more or less by updating? I have an up to date system.

I can manually start it with /usr/lib/xfce4/notifyd/xfce4-notifyd, so it is not an enormous problem, but I would like have the service properly set up and controlled.

I'm wondering, have you tried reinstalling it?
Perhaps it's some kind of permissions issue?

see here the explanation

I have reinstalled it, and it had installed xfce4-notifyd-gtk3 by default.

I had tried this before and forgot to add it when composing the post, sorry:

$ sudo systemctl disable xfce4-notifyd.service --now
Failed to disable unit: Unit file xfce4-notifyd.service does not exist.
$ sudo systemctl --user enable xfce4-notifyd.service --now
Failed to connect to bus: No such file or directory

Run this commands from terminal
export XDG_RUNTIME_DIR="/run/user/$UID"
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"

then check if systemctl --user command i mentioned earlier works. However you should find out why those variable are not set. Maybe reinstall dbus package and reboot after that. Test again ...

They are already being set properly, and (the directories) do exist:

$ echo $XDG_RUNTIME_DIR 
/run/user/1000
$ echo $DBUS_SESSION_BUS_ADDRESS
unix:path=/run/user/1000/bus

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by