123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
- "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
- <!ENTITY % general-entities SYSTEM "../general.ent">
- %general-entities;
- ]>
- <sect1 id="ch-system-dbus" role="wrap" revision="systemd">
- <?dbhtml filename="dbus.html"?>
- <sect1info condition="script">
- <productname>dbus</productname>
- <productnumber>&dbus-version;</productnumber>
- <address>&dbus-url;</address>
- </sect1info>
- <title>D-Bus-&dbus-version;</title>
- <indexterm zone="ch-system-dbus">
- <primary sortas="a-dbus">D-Bus</primary>
- </indexterm>
- <sect2 role="package">
- <title/>
- <!--para>D-Bus is a message bus system, a simple way for applications to talk
- to one another. D-Bus supplies both a system daemon (for events such as
- "new hardware device added" or "printer queue changed") and a
- per-user-login-session daemon (for general IPC needs among user
- applications). Also, the message bus is built on top of a general one-to-one
- message passing framework, which can be used by any two applications to
- communicate directly (without going through the message bus daemon).</para-->
- <para>D-bus 是一个消息总线系统,即应用程序之间互相通信的一种简单方式。
- D-Bus 提供一个系统守护进程(负责 <quote>添加了新硬件</quote>
- 或 <quote>打印队列发生改变</quote> 等事件),
- 并对每个用户登录会话提供一个守护进程
- (负责一般用户程序的进程间通信)。
- 另外,消息总线被构建在一个通用的一对一消息传递网络上,
- 它可以被任意两个程序用于直接通信(不需通过消息总线守护进程)。</para>
- <segmentedlist>
- <segtitle>&buildtime;</segtitle>
- <segtitle>&diskspace;</segtitle>
- <seglistitem>
- <seg>&dbus-ch6-sbu;</seg>
- <seg>&dbus-ch6-du;</seg>
- </seglistitem>
- </segmentedlist>
- </sect2>
- <sect2 role="installation">
- <title>安装 D-Bus</title>
- <para>准备安装 D-Bus:</para>
- <screen><userinput remap="configure"> ./configure --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --disable-static \
- --disable-doxygen-docs \
- --disable-xml-docs \
- --docdir=/usr/share/doc/dbus-&dbus-version; \
- --with-console-auth-dir=/run/console</userinput></screen>
- <variablelist>
- <title>配置选项的含义:</title>
- <varlistentry>
- <term><parameter>--with-console-auth-dir=/run/console</parameter></term>
- <listitem>
- <para>该选项指定 ConsoleKit 认证目录位置。</para>
- </listitem>
- </varlistentry>
- </variablelist>
- <para>编译该软件包:</para>
- <screen><userinput remap="make">make</userinput></screen>
- <para>该软件包有测试套件,但需要 LFS 没有包含的一些软件包。
- 阅读 BLFS 手册中的
- <ulink url="&blfs-book;general/dbus.html"/>,
- 以查阅运行测试套件的说明。</para>
- <para>安装该软件包:</para>
- <screen><userinput remap="install">make install</userinput></screen>
- <para>需要将共享库移动到
- <filename class="directory">/lib</filename>,因此
- <filename class="directory">/usr/lib</filename> 中的
- <filename class="extension">.so</filename> 符号链接需要重新建立:</para>
- <screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib
- ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen>
- <para>创建符号链接,使 D-Bus 和 systemd 使用同样的
- <filename>machine-id</filename> 文件:</para>
- <screen><userinput remap="install">ln -sfv /etc/machine-id /var/lib/dbus</userinput></screen>
- </sect2>
- <sect2 id="contents-dbus" role="content">
- <title>D-Bus 的内容</title>
- <segmentedlist>
- <segtitle>安装的程序</segtitle>
- <segtitle>安装的库</segtitle>
- <segtitle>安装的目录</segtitle>
- <seglistitem>
- <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor,
- dbus-run-session, dbus-send, dbus-test-tool,
- dbus-update-activation-environment, 以及 dbus-uuidgen</seg>
- <seg>libdbus-1.{a,so}</seg>
- <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0,
- /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;,
- 以及 /var/lib/dbus</seg>
- </seglistitem>
- </segmentedlist>
- <variablelist>
- <bridgehead renderas="sect3">简要描述</bridgehead>
- <?dbfo list-presentation="list"?>
- <?dbhtml list-presentation="table"?>
- <varlistentry id="dbus-cleanup-sockets">
- <term><command>dbus-cleanup-sockets</command></term>
- <listitem>
- <para>用于清理目录中遗留的套接字</para>
- <indexterm zone="ch-system-dbus dbus-cleanup-sockets">
- <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-daemon">
- <term><command>dbus-daemon</command></term>
- <listitem>
- <para>D-Bus 消息总线守护程序</para>
- <indexterm zone="ch-system-dbus dbus-daemon">
- <primary sortas="b-dbus-daemon">dbus-daemon</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-launch">
- <term><command>dbus-launch</command></term>
- <listitem>
- <para>从 shell 脚本启动 <command>dbus-daemon</command></para>
- <indexterm zone="ch-system-dbus dbus-launch">
- <primary sortas="b-dbus-launch">dbus-launch</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-monitor">
- <term><command>dbus-monitor</command></term>
- <listitem>
- <para>监视通过一个 D-Bus 消息总线的消息</para>
- <indexterm zone="ch-system-dbus dbus-monitor">
- <primary sortas="b-dbus-monitor">dbus-monitor</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-run-session">
- <term><command>dbus-run-session</command></term>
- <listitem>
- <para>从 shell 脚本启动一个 <command>dbus-daemon</command>
- 的会话总线实例,并在该会话中启动给定程序</para>
- <indexterm zone="ch-system-dbus dbus-run-session">
- <primary sortas="b-dbus-run-session">dbus-run-session</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-send">
- <term><command>dbus-send</command></term>
- <listitem>
- <para>向 D-Bus 消息总线发送消息</para>
- <indexterm zone="ch-system-dbus dbus-send">
- <primary sortas="b-dbus-send">dbus-send</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-test-tool">
- <term><command>dbus-test-tool</command></term>
- <listitem>
- <para>一个帮助软件包测试
- <application>D-Bus</application> 的工具</para>
- <indexterm zone="ch-system-dbus dbus-test-tool">
- <primary sortas="b-dbus-test-tool">dbus-test-tool</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <!-- This is a very long command name. Excuse the long <primary> statement below. -->
- <varlistentry id="dbus-update-activation-environment">
- <term><command>dbus-update-activation-environment</command></term>
- <listitem>
- <para>更新将会为 <application> D-Bus </application>
- 会话服务设置的环境变量</para>
- <indexterm zone="ch-system-dbus dbus-update-activation-environment">
- <primary sortas="b-dbus-update-activation-environment">dbus-update-activation-environment</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="dbus-uuidgen">
- <term><command>dbus-uuidgen</command></term>
- <listitem>
- <para>产生通用唯一识别码</para>
- <indexterm zone="ch-system-dbus dbus-uuidgen">
- <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- <varlistentry id="libdbus-1">
- <term><filename class="libraryfile">libdbus-1</filename></term>
- <listitem>
- <para>包含用于和 D-Bus 消息总线通信的 API 函数</para>
- <indexterm zone="ch-system-dbus libdbus-1">
- <primary sortas="c-libdbus-1">libdbus-1</primary>
- </indexterm>
- </listitem>
- </varlistentry>
- </variablelist>
- </sect2>
- </sect1>
|