2

I did a clean arch install with only XDM and i3 to serve as login/window managers. I have also installed dunst package; and according to arch wiki nothing else is required for it to work.

However, when trying to send notifications, I receive:

Unable to send notification: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached

The troubleshoot section on same wiki page suggests assignment of DISPLAY variable. I have the following in my .xinitrc:

source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh

which does exactly this:

➜ cat /etc/X11/xinit/xinitrc.d/50-systemd-user.sh     
#!/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

Checking at dunst's FAQ, it mentions availability of DBUS_SESSION_BUS_ADDRESS variable. And to check the gdbus command for running notification daemons:

➜ gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/Dbus --method org.freedesktop.DBus.ListNames
(['org.freedesktop.DBus', ':1.40', 'org.freedesktop.systemd1', 'org.a11y.Bus', ':1.20', ':1.21', 'net.tenshu.Terminator20x1a6021154d881c', ':1.0', ':1.1', 'org.PulseAudio1', 'org.pulseaudio.Server', ':1.2', ':1.16', ':1.17', ':1.18', ':1.19'],)

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

➜ echo $DISPLAY 
:0

I do have the dunst service listed in /usr/share/dbus-1/services directory.

-rw-r--r-- 1 root root  64 Oct 23 03:43 ca.desrt.dconf.service
-rw-r--r-- 1 root root 107 Sep  6 00:40 org.a11y.Bus.service
-rw-r--r-- 1 root root  68 Feb 20 10:29 org.dharkael.Flameshot.service
-rw-r--r-- 1 root root 116 Aug  1  2018 org.freedesktop.ColorHelper.service
lrwxrwxrwx 1 root root  51 Feb 20 18:37 org.freedesktop.systemd1.service -> ../system-services/org.freedesktop.systemd1.service
-rw-r--r-- 1 root root  60 Oct 27 22:09 org.gnome.GConf.service
-rw-r--r-- 1 root root 111 Sep  5 05:36 org.gtk.GLib.PACRunner.service
-rw-r--r-- 1 root root 100 Jan  2 17:13 org.knopwob.dunst.service
-rw-r--r-- 1 root root  56 Nov 22  2017 org.xfce.calendar.service
-rw-r--r-- 1 root root 115 Jan 28 05:22 org.xfce.FileManager.service
-rw-r--r-- 1 root root  56 Nov 22  2017 org.xfce.orage.service
-rw-r--r-- 1 root root 124 Jan 28 05:22 org.xfce.Thunar.FileManager1.service
-rw-r--r-- 1 root root 110 Jan 28 05:22 org.xfce.Thunar.service

According to this blog post; I should switch to dunst as my notification service. But I have no idea which notification service is my current one!

I do have 2 separate dbus.service listed as running in my systemctl status list; one in the system.slice tree and another in user@1000.service tree.

Any pointers as to how should I configure my dbus daemon would be helpful,

1 Answers1

2

I had a similar issue with dunst after installing plasma. Plasma had registered it's own dbus service which was conflicting, causing notify-send, slack,... to hang when notifications were sent.

You can check whether this applies to you:

grep -ri freedesktop.Notifications /usr/share/dbus-1/services/

If you have multiple services registered, pick one and remove the others (preferably through a package manager, not rm)

Valer
  • 121