O miniaplicativo NetworkManager não responde e vejo erros 'org.freedesktop.Notifications: Tempo limite atingido' em ~/.xsession-errors

O miniaplicativo NetworkManager não responde e vejo erros 'org.freedesktop.Notifications: Tempo limite atingido' em ~/.xsession-errors

Vejo os seguintes erros em meus ~/.xsession-errors

(nm-applet:1122): nm-applet-WARNING **: 11:12:56.101: Failed to show notification: Error calling StartServiceByName for org.freedesktop.Notifications: Timeout was reached
[1342:1937:0821/111259.646185:ERROR:object_proxy.cc(619)] Failed to call method: org.freedesktop.Notifications.GetCapabilities: object_path= /org/freedesktop/Notifications: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Estou usando o i3, com ajudantes do xfce na minha barra de status para tornar algo um pouco mais simples.

Eu sei que se eu iniciar o xfce4-notifyd ele resolverá os problemas e corrigirá os erros no xsession-errors.

systemctl --user start xfce4-notifyd

systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
   Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
   Active: active (running) since Wed 2019-08-21 12:52:28 SAST; 10s ago
 Main PID: 10783 (xfce4-notifyd)
   CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
           └─10783 /usr/lib/xfce4/notifyd/xfce4-notifyd

Aug 21 12:52:28 aaron-pc systemd[1088]: Starting XFCE notifications service...
Aug 21 12:52:28 aaron-pc systemd[1088]: Started XFCE notifications service.

Como faço para que o xfce4-notifyd inicie na inicialização ou no login.

Responder1

Depois de muita leitura, descobri que as seguintes fontes me ajudaram com esta solução simples

sudo vim /usr/share/dbus-1/system-services/org.freedesktop.Notification.service

[D-BUS Service]
Name=org.freedesktop.Notifications
Exec=/usr/lib/x86_64-linux-gnu/xfce4/notifyd/xfce4-notifyd

Você pode procurar e ver quais outros serviços de notificação foram configurados no dbus.

ls /usr/share/dbus-1/services/ | grep -i noti
org.kde.plasma.Notifications.service
org.xfce.xfce4-notifyd.Notifications.service

E se você já tiver algum outro serviço de notificação configurado que possa causar problemas em ambos, tente iniciá-lo.

sudo rm /usr/share/dbus-1/services/org.kde.plasma.Notifications.service

No meu caso, usando Manjaro que é um sabor de arco. Minha configuração foi um pouco diferente.

O caminho do executável estava em um local diferente.

pacman -Ql xfce4-notifyd | grep 'xfce4-notifyd$'
xfce4-notifyd /usr/lib/xfce4/notifyd/xfce4-notifyd

Minha linha executiva é assim

Exec=/usr/lib/xfce4/notifyd/xfce4-notifyd

Além disso, o xfce4-notifydserviço precisa ser iniciado

systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
Active: inactive (dead)

systemctl --user start xfce4-notifyd

systemctl --user status xfce4-notifyd
● xfce4-notifyd.service - XFCE notifications service
Loaded: loaded (/usr/lib/systemd/user/xfce4-notifyd.service; static; vendor preset: enabled)
Active: active (running) since Tue 2020-03-10 08:34:10 SAST; 5s ago
Main PID: 7991 (xfce4-notifyd)
CGroup: /user.slice/user-1000.slice/[email protected]/xfce4-notifyd.service
        └─7991 /usr/lib/xfce4/notifyd/xfce4-notifyd

Mar 10 08:34:10 aaron-pc systemd[1456]: Starting XFCE notifications service...
Mar 10 08:34:10 aaron-pc systemd[1456]: Started XFCE notifications service.

Para garantir que isso aconteça na inicialização. Eu adiciono o seguinte

cd ~/.config/systemd/user/
ln -s /usr/lib/systemd/user/xfce4-notifyd.service 

informação relacionada