mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-19 04:40:24 +08:00
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@13003 af4574ff-66df-0310-9fd7-8a98e5e911e0
379 lines
12 KiB
XML
379 lines
12 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!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;
|
|
|
|
<!ENTITY dbus-download-http "http://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.gz">
|
|
<!ENTITY dbus-download-ftp " ">
|
|
<!ENTITY dbus-md5sum "059fbe84e39fc99c67a14f15b1f39dff">
|
|
<!ENTITY dbus-size "1.8 MB">
|
|
<!ENTITY dbus-buildsize "86 MB (additional 26 MB installed)">
|
|
<!ENTITY dbus-time "0.35 SBU (additional 1.3 SBU for tests)">
|
|
]>
|
|
|
|
<sect1 id="dbus-launch" xreflabel="D-Bus-&dbus-version;/dbus-launch">
|
|
<?dbhtml filename="dbus.html"?>
|
|
|
|
<sect1info>
|
|
<othername>$LastChangedBy$</othername>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>D-Bus-&dbus-version; (dbus-launch)</title>
|
|
|
|
<indexterm zone="dbus-launch">
|
|
<primary sortas="a-dbus-launch">dbus-launch</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to D-Bus (with Xorg)</title>
|
|
|
|
<para>
|
|
<application>D-Bus</application> was installed in LFS, but one program
|
|
needs to be updated after Xorg is installed to properly support
|
|
window managers.
|
|
</para>
|
|
|
|
<!-- &lfs75_checked; -->
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&dbus-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&dbus-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &dbus-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &dbus-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &dbus-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &dbus-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">D-Bus Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="xorg7-lib"/>
|
|
(for <command>dbus-launch</command> program)
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
For the tests:
|
|
<xref linkend="dbus-glib"/>,
|
|
<xref linkend="dbus-python"/>, and
|
|
<xref linkend="pygobject2"/>;
|
|
for the API documentation:
|
|
<xref linkend="doxygen"/>;
|
|
for man pages and XML/HTML documentation:
|
|
<xref linkend="xmlto"/>
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">User Notes:
|
|
<ulink url="&blfs-wiki;/dbus"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of D-Bus</title>
|
|
|
|
<para>
|
|
Build <application>D-Bus</application> by running the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--with-console-auth-dir=/run/console/ \
|
|
--disable-static &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
See below for test instructions.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>install -m 755 dbus-launch /usr/bin</userinput></screen>
|
|
|
|
<para>
|
|
If you built the optional documentation, install it as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cp -a doc/api/{html,xml} /usr/share/doc/dbus-&dbus-version;</userinput></screen>
|
|
|
|
<para>
|
|
The dbus tests cannot be run until after <xref linkend="dbus-glib"/>
|
|
has been installed. They must be run as an unprivileged user from a
|
|
local session. Tests fail through ssh. If you want to run only the unit
|
|
tests, replace, below, <parameter>--enable-tests</parameter> by
|
|
<parameter>--enable-embedded-tests</parameter>, otherwise,
|
|
<xref linkend="dbus-python"/> has to be installed, before.
|
|
The tests require passing additional parameters to
|
|
<command>configure</command> and exposing additional functionality in
|
|
the binaries. These interfaces are not intended to be used in a
|
|
production build of <application>D-Bus</application>. If you would
|
|
like to run the tests, issue the following commands:
|
|
</para>
|
|
|
|
<screen><userinput>make distclean &&
|
|
./configure --enable-tests --enable-asserts &&
|
|
make &&
|
|
make check &&
|
|
make distclean</userinput></screen>
|
|
|
|
<para>
|
|
If <command>run-test.sh</command> fails, it can be disabled with the
|
|
following sed, before running the commands for the tests:
|
|
</para>
|
|
|
|
<screen><userinput>sed -i -e 's:run-test.sh:$(NULL):g' test/name-test/Makefile.in</userinput></screen>
|
|
|
|
<note><para>
|
|
There has been a report that the tests may fail if running
|
|
inside a Midnight Commander shell.
|
|
You may get out-of-memory error messages when running the tests.
|
|
These are normal and can be safely ignored.
|
|
</para></note>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<parameter>--with-console-auth-dir=/run/console/</parameter>: This
|
|
parameter specifies location of the
|
|
<application>ConsoleKit</application> auth dir.
|
|
</para>
|
|
|
|
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
href="../../xincludes/static-libraries.xml"/>
|
|
|
|
<para>
|
|
<parameter>--enable-tests</parameter>: Build extra parts of the code to
|
|
support all tests. Configure will end with a NOTE warning about increased
|
|
size of libraries and decreased security.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--enable-embedded-tests</parameter>: Build extra parts of the
|
|
code to support only unit tests. Configure will end with a NOTE warning
|
|
about increased size of libraries and decreased security.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--enable-asserts</parameter>: Enable debugging code to run
|
|
assertions for statements normally assumed to be true. This prevents a
|
|
warning that '<parameter>--enable-tests</parameter>' on its own is only
|
|
useful for profiling and might not give true results for all tests, but
|
|
adds its own NOTE that this should not be used in a production build.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring dbus</title>
|
|
|
|
<sect3 id="dbus-config">
|
|
<title>Config Files</title>
|
|
|
|
<para>
|
|
<filename>/etc/dbus-1/session.conf</filename>,
|
|
<filename>/etc/dbus-1/system.conf</filename> and
|
|
<filename>/etc/dbus-1/system.d/*</filename>
|
|
</para>
|
|
|
|
<indexterm zone="dbus-launch dbus-config">
|
|
<primary sortas="e-etc-dbus-1-session.conf">/etc/dbus-1/session.conf</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="dbus-launch dbus-config">
|
|
<primary sortas="e-etc-dbus-1/system.conf">/etc/dbus-1/system.conf</primary>
|
|
</indexterm>
|
|
|
|
<indexterm zone="dbus-launch dbus-config">
|
|
<primary sortas="e-etc-dbus-1-system.d-star">/etc/dbus-1/system.d/*</primary>
|
|
</indexterm>
|
|
|
|
</sect3>
|
|
|
|
<sect3 id="dbus-session-config" xreflabel="D-Bus custom services directory">
|
|
<title>Configuration Information</title>
|
|
|
|
<para>
|
|
The configuration files listed above should probably not be
|
|
modified. If changes are required, you should create
|
|
<filename>/etc/dbus-1/session-local.conf</filename> and/or
|
|
<filename>/etc/dbus-1/system-local.conf</filename> and make any
|
|
desired changes to these files.
|
|
</para>
|
|
|
|
<para>
|
|
If any packages install a
|
|
<application>D-Bus</application> <filename>.service</filename>
|
|
file outside of the standard <filename
|
|
class="directory">/usr/share/dbus-1/services</filename> directory,
|
|
that directory should be added to the local session configuration.
|
|
For instance, <filename
|
|
class="directory">/usr/local/share/dbus-1/services</filename> can
|
|
be added by performing the following commands as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/dbus-1/session-local.conf << "EOF"
|
|
<literal><!DOCTYPE busconfig PUBLIC
|
|
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
|
|
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
|
|
<busconfig>
|
|
|
|
<!-- Search for .service files in /usr/local -->
|
|
<servicedir>/usr/local/share/dbus-1/services</servicedir>
|
|
|
|
</busconfig></literal>
|
|
EOF</userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
<sect3 id="dbus-init">
|
|
<title>Starting D-Bus</title>
|
|
|
|
<para>
|
|
There are many methods you can use to start a
|
|
session daemon using the <command>dbus-launch</command> command. Review
|
|
the <command>dbus-launch</command> man page for details about the
|
|
available parameters and options. Here are some suggestions and
|
|
examples:
|
|
</para>
|
|
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Add <command>dbus-launch</command> to the line in the
|
|
<filename>~/.xinitrc</filename> file that starts your graphical
|
|
desktop environment.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
If you use <command>xdm</command> or some other display manager
|
|
that calls the <filename>~/.xsession</filename> file, you can add
|
|
<command>dbus-launch</command> to the line in your
|
|
<filename>~/.xsession</filename> file that starts your graphical
|
|
desktop environment. The syntax would be similar to the example in
|
|
the <filename>~/.xinitrc</filename> file.
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
The examples shown previously use
|
|
<command>dbus-launch</command> to specify a program to be run. This
|
|
has the benefit (when also using the
|
|
<parameter>--exit-with-session</parameter> parameter) of stopping the
|
|
session daemon when the specified program is stopped. You can also
|
|
start the session daemon in your system or personal startup scripts
|
|
by adding the following lines:
|
|
</para>
|
|
|
|
<screen><userinput><literal># Start the D-Bus session daemon
|
|
eval `dbus-launch`
|
|
export DBUS_SESSION_BUS_ADDRESS</literal></userinput></screen>
|
|
|
|
<para>
|
|
This method will not stop the session daemon when you exit
|
|
your shell, therefore you should add the following line to your
|
|
<filename>~/.bash_logout</filename> file:
|
|
</para>
|
|
|
|
<screen><userinput><literal># Kill the D-Bus session daemon
|
|
kill $DBUS_SESSION_BUS_PID</literal></userinput></screen>
|
|
</listitem>
|
|
|
|
<listitem>
|
|
<para>
|
|
A hint has been written that provides ways to start scripts
|
|
using the KDM session manager of KDE. The concepts in this hint could
|
|
possibly be used with other session managers as well. The hint is
|
|
located at <ulink
|
|
url="&hints-root;/downloads/files/execute-session-scripts-using-kdm.txt"/>.
|
|
</para>
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Libraries</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
dbus-launch
|
|
</seg>
|
|
<seg>
|
|
None
|
|
</seg>
|
|
<seg>
|
|
None
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<varlistentry id="dbus-launch-program">
|
|
<term><command>dbus-launch</command></term>
|
|
<listitem>
|
|
<para>
|
|
is used to start <command>dbus-daemon</command> from a shell
|
|
script. It would normally be called from a user's login
|
|
scripts.
|
|
</para>
|
|
<indexterm zone="dbus-launch dbus-launch-program">
|
|
<primary sortas="b-dbus-launch-program">dbus-launch</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|
|
|