DBusサービス名の所有者を学びます。

DBusサービス名の所有者を学びます。

どのプログラムがサービスを実装しているかを見つける方法がありませんorg.freedesktop.Notifications。 DBusが提供するプログラムを教えてください。

この質問をする理由は簡単です。使用したい新しいデスクトップ通知デーモンを見つけましたが、開始されず、代わりにこのメッセージについて文句を言います。

名前が消えました。他の通知デーモンが実行されていますか?

しかし、何がプログラムなのかわかりません。はい名前をつかむ他のすべての通知デーモンを削除し、Xサーバーを再起動し、コンピュータも再起動しました。

ただし、このコマンドを実行すると、次のようになります。

dbus-send --session --dest=org.freedesktop.DBus --type=method_call \
--print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames

string "org.freedesktop.Notifications"出力に現れるので名前は保持されますが、目的のデーモンを起動できません。

ベストアンサー1

PID発信者に応答できる方法は次のとおりです。org.freedesktop.DBus.GetConnectionUnixProcessID:

qdbus  org.freedesktop.DBus /org/freedesktop/DBus \
org.freedesktop.DBus.GetConnectionUnixProcessID org.freedesktop.Notifications
第737話

それがすべてですPID
必要に応じてdbus-sendqdbusKDEに従って)、次の操作を行います。

dbus-send --session --print-reply --dest=org.freedesktop.DBus / \
org.freedesktop.DBus.GetConnectionUnixProcessID string:org.freedesktop.Notifications
uint32 737

必要に応じてgdbus(GNOMEのみ)以下を実行してください。

gdbus call --session --dest org.freedesktop.DBus --object-path / --method \
org.freedesktop.DBus.GetConnectionUnixProcessID org.freedesktop.Notifications
(uint32 737,)

更新された設定では、以下もsystemd使用できますbusctl

busctl --user call org.freedesktop.DBus /org/freedesktop/DBus  \
org.freedesktop.DBus GetConnectionUnixProcessID s org.freedesktop.Notifications
あなた 737

おすすめ記事