dbus.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-system-dbus" role="wrap" revision="systemd">
  8. <?dbhtml filename="dbus.html"?>
  9. <sect1info condition="script">
  10. <productname>dbus</productname>
  11. <productnumber>&dbus-version;</productnumber>
  12. <address>&dbus-url;</address>
  13. </sect1info>
  14. <title>D-Bus-&dbus-version;</title>
  15. <indexterm zone="ch-system-dbus">
  16. <primary sortas="a-dbus">D-Bus</primary>
  17. </indexterm>
  18. <sect2 role="package">
  19. <title/>
  20. <!--para>D-Bus is a message bus system, a simple way for applications to talk
  21. to one another. D-Bus supplies both a system daemon (for events such as
  22. "new hardware device added" or "printer queue changed") and a
  23. per-user-login-session daemon (for general IPC needs among user
  24. applications). Also, the message bus is built on top of a general one-to-one
  25. message passing framework, which can be used by any two applications to
  26. communicate directly (without going through the message bus daemon).</para-->
  27. <para>D-bus 是一个消息总线系统,即应用程序之间互相通信的一种简单方式。
  28. D-Bus 提供一个系统守护进程(负责 <quote>添加了新硬件</quote>
  29. 或 <quote>打印队列发生改变</quote> 等事件),
  30. 并对每个用户登录会话提供一个守护进程
  31. (负责一般用户程序的进程间通信)。
  32. 另外,消息总线被构建在一个通用的一对一消息传递网络上,
  33. 它可以被任意两个程序用于直接通信(不需通过消息总线守护进程)。</para>
  34. <segmentedlist>
  35. <segtitle>&buildtime;</segtitle>
  36. <segtitle>&diskspace;</segtitle>
  37. <seglistitem>
  38. <seg>&dbus-ch6-sbu;</seg>
  39. <seg>&dbus-ch6-du;</seg>
  40. </seglistitem>
  41. </segmentedlist>
  42. </sect2>
  43. <sect2 role="installation">
  44. <title>安装 D-Bus</title>
  45. <para>准备安装 D-Bus:</para>
  46. <screen><userinput remap="configure"> ./configure --prefix=/usr \
  47. --sysconfdir=/etc \
  48. --localstatedir=/var \
  49. --disable-static \
  50. --disable-doxygen-docs \
  51. --disable-xml-docs \
  52. --docdir=/usr/share/doc/dbus-&dbus-version; \
  53. --with-console-auth-dir=/run/console</userinput></screen>
  54. <variablelist>
  55. <title>配置选项的含义:</title>
  56. <varlistentry>
  57. <term><parameter>--with-console-auth-dir=/run/console</parameter></term>
  58. <listitem>
  59. <para>该选项指定 ConsoleKit 认证目录位置。</para>
  60. </listitem>
  61. </varlistentry>
  62. </variablelist>
  63. <para>编译该软件包:</para>
  64. <screen><userinput remap="make">make</userinput></screen>
  65. <para>该软件包有测试套件,但需要 LFS 没有包含的一些软件包。
  66. 阅读 BLFS 手册中的
  67. <ulink url="&blfs-book;general/dbus.html"/>,
  68. 以查阅运行测试套件的说明。</para>
  69. <para>安装该软件包:</para>
  70. <screen><userinput remap="install">make install</userinput></screen>
  71. <para>需要将共享库移动到
  72. <filename class="directory">/lib</filename>,因此
  73. <filename class="directory">/usr/lib</filename> 中的
  74. <filename class="extension">.so</filename> 符号链接需要重新建立:</para>
  75. <screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib
  76. ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
  77. <para>创建符号链接,使 D-Bus 和 systemd 使用同样的
  78. <filename>machine-id</filename> 文件:</para>
  79. <screen><userinput remap="install">ln -sfv /etc/machine-id /var/lib/dbus</userinput></screen>
  80. </sect2>
  81. <sect2 id="contents-dbus" role="content">
  82. <title>D-Bus 的内容</title>
  83. <segmentedlist>
  84. <segtitle>安装的程序</segtitle>
  85. <segtitle>安装的库</segtitle>
  86. <segtitle>安装的目录</segtitle>
  87. <seglistitem>
  88. <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
  89. dbus-run-session, dbus-send, dbus-test-tool,
  90. dbus-update-activation-environment, 以及 dbus-uuidgen</seg>
  91. <seg>libdbus-1.{a,so}</seg>
  92. <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
  93. /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;,
  94. 以及 /var/lib/dbus</seg>
  95. </seglistitem>
  96. </segmentedlist>
  97. <variablelist>
  98. <bridgehead renderas="sect3">简要描述</bridgehead>
  99. <?dbfo list-presentation="list"?>
  100. <?dbhtml list-presentation="table"?>
  101. <varlistentry id="dbus-cleanup-sockets">
  102. <term><command>dbus-cleanup-sockets</command></term>
  103. <listitem>
  104. <para>用于清理目录中遗留的套接字</para>
  105. <indexterm zone="ch-system-dbus dbus-cleanup-sockets">
  106. <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
  107. </indexterm>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry id="dbus-daemon">
  111. <term><command>dbus-daemon</command></term>
  112. <listitem>
  113. <para>D-Bus 消息总线守护程序</para>
  114. <indexterm zone="ch-system-dbus dbus-daemon">
  115. <primary sortas="b-dbus-daemon">dbus-daemon</primary>
  116. </indexterm>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry id="dbus-launch">
  120. <term><command>dbus-launch</command></term>
  121. <listitem>
  122. <para>从 shell 脚本启动 <command>dbus-daemon</command></para>
  123. <indexterm zone="ch-system-dbus dbus-launch">
  124. <primary sortas="b-dbus-launch">dbus-launch</primary>
  125. </indexterm>
  126. </listitem>
  127. </varlistentry>
  128. <varlistentry id="dbus-monitor">
  129. <term><command>dbus-monitor</command></term>
  130. <listitem>
  131. <para>监视通过一个 D-Bus 消息总线的消息</para>
  132. <indexterm zone="ch-system-dbus dbus-monitor">
  133. <primary sortas="b-dbus-monitor">dbus-monitor</primary>
  134. </indexterm>
  135. </listitem>
  136. </varlistentry>
  137. <varlistentry id="dbus-run-session">
  138. <term><command>dbus-run-session</command></term>
  139. <listitem>
  140. <para>从 shell 脚本启动一个 <command>dbus-daemon</command>
  141. 的会话总线实例,并在该会话中启动给定程序</para>
  142. <indexterm zone="ch-system-dbus dbus-run-session">
  143. <primary sortas="b-dbus-run-session">dbus-run-session</primary>
  144. </indexterm>
  145. </listitem>
  146. </varlistentry>
  147. <varlistentry id="dbus-send">
  148. <term><command>dbus-send</command></term>
  149. <listitem>
  150. <para>向 D-Bus 消息总线发送消息</para>
  151. <indexterm zone="ch-system-dbus dbus-send">
  152. <primary sortas="b-dbus-send">dbus-send</primary>
  153. </indexterm>
  154. </listitem>
  155. </varlistentry>
  156. <varlistentry id="dbus-test-tool">
  157. <term><command>dbus-test-tool</command></term>
  158. <listitem>
  159. <para>一个帮助软件包测试
  160. <application>D-Bus</application> 的工具</para>
  161. <indexterm zone="ch-system-dbus dbus-test-tool">
  162. <primary sortas="b-dbus-test-tool">dbus-test-tool</primary>
  163. </indexterm>
  164. </listitem>
  165. </varlistentry>
  166. <!-- This is a very long command name. Excuse the long <primary> statement below. -->
  167. <varlistentry id="dbus-update-activation-environment">
  168. <term><command>dbus-update-activation-environment</command></term>
  169. <listitem>
  170. <para>更新将会为 <application> D-Bus </application>
  171. 会话服务设置的环境变量</para>
  172. <indexterm zone="ch-system-dbus dbus-update-activation-environment">
  173. <primary sortas="b-dbus-update-activation-environment">dbus-update-activation-environment</primary>
  174. </indexterm>
  175. </listitem>
  176. </varlistentry>
  177. <varlistentry id="dbus-uuidgen">
  178. <term><command>dbus-uuidgen</command></term>
  179. <listitem>
  180. <para>产生通用唯一识别码</para>
  181. <indexterm zone="ch-system-dbus dbus-uuidgen">
  182. <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
  183. </indexterm>
  184. </listitem>
  185. </varlistentry>
  186. <varlistentry id="libdbus-1">
  187. <term><filename class="libraryfile">libdbus-1</filename></term>
  188. <listitem>
  189. <para>包含用于和 D-Bus 消息总线通信的 API 函数</para>
  190. <indexterm zone="ch-system-dbus libdbus-1">
  191. <primary sortas="c-libdbus-1">libdbus-1</primary>
  192. </indexterm>
  193. </listitem>
  194. </varlistentry>
  195. </variablelist>
  196. </sect2>
  197. </sect1>