在使用 dbus時,bus type 是system, dbus-daemon 也是以–system 模式拉起的。運行某個客戶端,向dbus 建立鏈接,並輸出bus name 時,出現如下錯誤:
org.freedesktop.DBus.Error.AccessDenied
修改system.conf中如下部分
<!-- Holes must be punched in service configuration files for
name ownership and sending method calls -->
<deny own="*"/>
<deny send_type="method_call"/>
爲
<!-- Holes must be punched in service configuration files for
name ownership and sending method calls -->
<allow own="*"/>
<allow send_type="method_call"/>