D-Bus

提供: ArchWiki
2021年7月29日 (木) 18:06時点におけるKusanaginoturugi (トーク | 投稿記録)による版 (序文の一部英文を翻訳)
ナビゲーションに移動 検索に移動

関連記事

D-Bus はプロセス間のやりとりを行うためのメッセージバスシステムです。システム全体とユーザーセッション両方で実行できるデーモンと、アプリケーションが D-Bus を使うためのライブラリのセットから構成されています。

dbussystemd の依存関係としてインストールされ、ユーザーセッションバスは各ユーザーごとに自動的に開始されます。

Alternative Implementations

dbus-broker

dbus-broker is a drop-in replacement for the libdbus reference implementation, which aims "to provide high performance and reliability, while keeping compatibility to the D-Bus reference implementation". [1]

To enable dbus-broker as the system bus, first disable the dbus service and then activate the dbus-broker one:

# systemctl disable dbus.service
# systemctl enable dbus-broker.service

To enable as a user bus, run as the desired user:

$ systemctl --user enable dbus-broker.service

Or, to enable for all users, run as root:

# systemctl --global enable dbus-broker.service

Reboot for these settings to take effect.

Tips and tricks

dbus サービスの無効化

~/.local/share/dbus-1/services にある dbus のサービスを上書きすることができます。

デバッグ

  • D-Feet — 使いやすい D-Bus デバッガ GUI ツールです。D-Feet を使うことで実行中のプログラムの D-Bus インターフェイスを調べることができます。
https://wiki.gnome.org/DFeet || d-feet
  • QDbusViewer — GUI D-Bus debugger. Can be used to inspect D-Bus services and invoke methods on them.
https://doc.qt.io/qt-5/qdbusviewer.html || qt5-tools

You can also use busctl(1) from systemd.

参照