<!-- Bus that listens on a debug pipe and doesn't create any restrictions -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <type>system</type>
<listen>unix:tmpdir=/tmp</listen>
<standard_system_servicedirs />
<policy context="default"> <!-- Allow everything to be sent --> <allow send_destination="*" eavesdrop="true"/> <!-- Allow everything to be received --> <allow eavesdrop="true"/> <!-- Allow anyone to own anything --> <allow own="*"/> <allow user="*"/> </policy>
</busconfig>
先将这个文件放到 /etc/dbus-1/system.d/ 下,几个关键的配置说明
system dbus 服务的bus类型,分为system和session,我们要垮用户通信,就需要用system总线