You are not logged in.
command like:
dbus-monitor interface=org.freedesktop.Notifications | grep --line-buffered '^\s*string "Keybase"$' | while read; do play -q /usr/share/sounds/freedesktop/stereo/message.oga; done
how to add this command so that it works every time the system starts in the background (xfce4)?
Offline
https://wiki.archlinux.org/title/Xfce#Autostart however as this is technically something desktop agnostic I'd do an user service
Something like
[Unit]
Description=Play sound on notification
[Service]
Type=simple
ExecStart=$pathtoScriptcontainingcommand$
[Install]
WantedBy=default.target
Online