NetworkManager アプレットが応答せず、~/.xsession-errors に「org.freedesktop.Notifications: Timeout was arrived」というエラーが表示される

NetworkManager アプレットが応答せず、~/.xsession-errors に「org.freedesktop.Notifications: Timeout was arrived」というエラーが表示される

~/.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.

私は、ステータス バーに xfce ヘルパーを配置して、少し簡単にするために i3 を使用しています。

xfce4-notifyd を起動すると問題が解決され、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.

起動時またはログイン時に xfce4-notifyd を起動するにはどうすればいいですか。

答え1

いろいろ読んだ結果、以下の情報源がこの簡単な解決策に役立つことがわかりました。

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

dbus で設定されている他の通知サービスを確認する必要があるかもしれません。

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

また、すでに他の通知サービスが設定されていて、両方で問題が発生する可能性がある場合は、起動してみてください。

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

私の場合は、Arch の一種である Manjaro を使用しています。私の設定は少し異なります。

実行可能ファイルが別の場所にあったパス。

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

私の実行ラインは次のようになります

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

さらに、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: 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.

起動時にこれが起こるようにするには、次のコードを追加します。

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

関連情報