dbus

Upload: cumi234

Post on 06-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 dbus

    1/4

    Beyond Linux From Scratch - Version svn-20110417

    Chapter 11. System Utilities

    Prev

    Apache Ant-1.8.1

    Next

    HAL-0.5.14

    Up Home

    D-BUS-1.2.24

    Introduction to D-BUS

    D-BUS is a message bus system, a simple way for applications to talk to one another. D-BUS supplies both a system daemon (forevents such as new hardware device added or printer queue changed) and a per-user-login-session daemon (for general IPC needsamong user applications). Also, the message bus is built on top of a general one-to-one message passing framework, which can beused by any two applications to communicate directly (without going through the message bus daemon).

    This package is known to build and work properly using an LFS-6.5 platform.

    Package Information

    Download (HTTP): http://dbus.freedesktop.org/releases/dbus/dbus-1.2.24.tar.gz

    Download MD5 sum: 565346cecd9cfecf1463540c6086cc2c

    Download size: 1.6 MB

    Estimated disk space required: 26 MB (65 MB if all API docs and man pages are installed)

    Estimated build time: 0.4 SBU

    D-BUS Dependencies

    Required

    expat-2.0.1 (preferred) orlibxml2-2.7.7

    Optional

    Xorg Libraries and Doxygen-1.7.2 (to generate the API documentation)

    Note that the configure script will look forxmlto-0.0.23 but it does nothing as the XML/HTML documentation is already shipped inthe source tree.

    User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/dbus

    Kernel Configuration

    Ensure the following option is enabled in the kernel configuration and recompile the kernel if necessary:

    General SetupSystem V IPC

    Page 1 of 4D-BUS-1.2.24

    04/12/2011file://C:\Documents and Settings\said umar qodrat\Local Settings\temp\Framework\db...

  • 8/3/2019 dbus

    2/4

    Installation of D-BUS

    As the root user, create a system user and group to handle the system message bus activity:

    groupadd -fg 18 messagebus &&useradd -c "D-BUS Message Daemon User" -d /dev/null \

    -u 18 -g messagebus -s /bin/false messagebus || [ $? == 9 ]

    This package's test suite cannot be run without passing additional parameters to configure and exposing additional functionality in thebinaries. These interfaces are not intended to be used in a production build of D-BUS, so it will have to be built twice in this situation.If you would like to run the unit tests, issue the following commands:

    ./configure --enable-tests --enable-asserts &&make &&make check &&make distclean

    Note there has been a report that the tests may fail if running inside a Midnight Commander shell.

    Install D-BUS by running the following commands (you may wish to review the output from ./configure --help first and add anydesired parameters to the configure command shown below):

    ./configure --prefix=/usr \--sysconfdir=/etc \--libexecdir=/usr/lib/dbus-1.0 \--localstatedir=/var &&

    make

    The --enable-doxygen-docs parameter does not work properly. If you have Doxygen installed and you wish to build the API

    documentation, issue doxygen.

    Now, as the root user:

    make install &&install -v -m755 -d /usr/share/doc/dbus-1.2.24 &&install -v -m644 doc/{TODO,*.{dtd,html,xml,xsl,txt,c}} \

    /usr/share/doc/dbus-1.2.24

    If you built the API documentation, install it by issuing the following commands as the root user:

    install -v -m755 -d /usr/share/doc/dbus-1.2.24/api \/usr/share/man/man3dbus &&

    install -v -m644 doc/api/html/* \/usr/share/doc/dbus-1.2.24/api &&

    install -v -m644 doc/api/man/man3dbus/* \/usr/share/man/man3dbus

    Command Explanations

    --libexecdir=/usr/lib/dbus-1.0 : This will install binaries meant to be only used internally by D-BUS, and the directorydbus-1 into /usr/lib/dbus-1.0 instead of into /usr/libexec.

    --localstatedir=/var: This parameter causes the daemon PID file, system bus socket and machine uuid file to be created in

    the /var directory instead of the /usr/var directory.

    --enable-tests: Build extra parts of the code to support testing. Configure will end with a NOTE warning about this.

    --enable-asserts: Enable debugging code to run assertions for statements normally assumed to be true. This prevents a warning

    that '--enable-tests ' 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.

    --disable-static: Prevent the static libraries being built and installed.

    Configuring dbus

    Page 2 of 4D-BUS-1.2.24

    04/12/2011file://C:\Documents and Settings\said umar qodrat\Local Settings\temp\Framework\db...

  • 8/3/2019 dbus

    3/4

    Config Files

    /etc/dbus-1/session.conf , /etc/dbus-1/system.conf and /etc/dbus-1/system.d/*

    Configuration Information

    The configuration files listed above should probably not be modified. If changes are required, you should create /etc/dbus-

    1/session-local.conf and/or/etc/dbus-1/system-local.conf and make any desired changes to these files.

    If any packages install a D-Bus .service file outside of the standard /usr/share/dbus-1/services directory, that directory

    should be added to the local session configuration. For instance, /usr/local/share/dbus-1/services can be added by

    performing the following commands as the root user:

    cat > /etc/dbus-1/session-local.conf

  • 8/3/2019 dbus

    4/4

    Installed Programs: dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, dbus-send, dbus-uuidgenInstalled Library: libdbus-1.{so,a}Installed Directories: /etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, /usr/share/dbus-1, /usr/share/doc/dbus-1.2.24, /usr/share/man/man3dbus, /var/lib/dbus and /var/run/dbus

    Short Descriptions

    Last updated on 2011-01-04 19:10:04 +0000

    Prev

    Apache Ant-1.8.1

    Next

    HAL-0.5.14

    Up Home

    dbus-cleanup-

    sockets is used to clean up leftover sockets in a directory.

    dbus-daemon is the D-BUS message bus daemon.

    dbus-launch is used to start dbus-daemon from a shell script. It would normally be called from a user's login scripts.

    dbus-monitor is used to monitor messages going through a D-BUS message bus.

    dbus-send is used to send a message to a D-BUS message bus.

    dbus-uuidgen is used to generate or read a universally unique ID.

    libdbus-1.

    {so,a}contains the API functions used by the D-BUS message daemon. D-BUS is first a library that provides one-to-onecommunication between any two applications; dbus-daemon is an application that uses this library to implement amessage bus daemon.

    Page 4 of 4D-BUS-1.2.24

    04/12/2011file://C:\Documents and Settings\said umar qodrat\Local Settings\temp\Framework\db