「D-Bus」の版間の差分
Kusakata.bot (トーク | 投稿記録) 細 文字列「http://www.freedesktop.org/」を「https://www.freedesktop.org/」に置換 |
Kusanaginoturugi (トーク | 投稿記録) 全体的に古いので差し替え(英語版準拠) |
||
| 9行目: | 9行目: | ||
{{Related articles end}} |
{{Related articles end}} |
||
[[Wikipedia:ja:D-Bus|D-Bus]] はプロセス間のやりとりを行うためのメッセージバスシステムです。システム全体とユーザーセッション両方で実行できるデーモンと、アプリケーションが D-Bus を使うためのライブラリのセットから構成されています。 |
[[Wikipedia:ja:D-Bus|D-Bus]] はプロセス間のやりとりを行うためのメッセージバスシステムです。システム全体とユーザーセッション両方で実行できるデーモンと、アプリケーションが D-Bus を使うためのライブラリのセットから構成されています。 |
||
==インストール== |
|||
{{Pkg|dbus}} は systemd の依存パッケージなので [[systemd]] を使っているなら D-Bus は自動で有効にされています。 |
|||
{{Pkg|dbus}} is pulled and installed as a dependency of {{Pkg|systemd}} and user session bus is [https://archlinux.org/news/d-bus-now-launches-user-buses/ started automatically] for each user. |
|||
==ユーザーセッションの起動== |
|||
D-Bus セッションが起動していない場合 [[GNOME|gnome-session]], [[KDE|startkde]], [[Xfce|startxfce4]] はセッションを自動で起動します。{{ic|~/.xinitrc}} ({{Pkg|xorg-xinit}} の {{ic|/etc/skel/.xinitrc}}) のスケルトンファイルも同じことを実行します。あなたの {{ic|~/.[[xinitrc]]}} がスケルトンファイル {{ic|/etc/skel/.xinitrc}} に基づいていることを確認してください。 |
|||
== Alternative Implementations == |
|||
=== dbus-broker === |
|||
{{Pkg|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". [https://github.com/bus1/dbus-broker] |
|||
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 == |
|||
=== Disable dbus service === |
|||
You can override dbus services in {{ic|~/.local/share/dbus-1/services}}. |
|||
==デバッグ== |
==デバッグ== |
||
{{ |
* {{App|D-Feet|使いやすい D-Bus デバッガ GUI ツールです。D-Feet を使うことで実行中のプログラムの D-Bus インターフェイスを調べることができます。 |https://wiki.gnome.org/DFeet|{{Pkg|d-feet}} |
||
}} |
|||
* {{App|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|{{Pkg|qt5-tools}}}} |
|||
You can also use {{man|1|busctl}} from [[systemd]]. |
|||
==参照== |
==参照== |
||
2021年7月29日 (木) 18:01時点における版
関連記事
D-Bus はプロセス間のやりとりを行うためのメッセージバスシステムです。システム全体とユーザーセッション両方で実行できるデーモンと、アプリケーションが D-Bus を使うためのライブラリのセットから構成されています。
dbus is pulled and installed as a dependency of systemd and user session bus is started automatically for each user.
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
Disable dbus service
You can override dbus services in ~/.local/share/dbus-1/services.
デバッグ
- D-Feet — 使いやすい D-Bus デバッガ GUI ツールです。D-Feet を使うことで実行中のプログラムの D-Bus インターフェイスを調べることができます。
- QDbusViewer — GUI D-Bus debugger. Can be used to inspect D-Bus services and invoke methods on them.
You can also use busctl(1) from systemd.
参照
- D-Bus page at freedesktop.org
- Introduction to D-Bus on freedesktop.org