%general-entities; ]> $LastChangedBy$ $Date$ D-BUS-&dbus-version; D-BUS 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 (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). Package Information Download (HTTP): Download (FTP): Download MD5 sum: &dbus-md5sum; Download size: &dbus-size; Estimated disk space required: &dbus-buildsize; Estimated build time: &dbus-time; D-BUS Dependencies Optional , or , , , , Qt-4.x.x, , (for the Java compiler and tools), Pyrex (requires ), GtkSharp-1.0.x (requires Mono), Monodoc, (to generate the API documentation), and xmlto (to generate HTML documentation and manuals) Listed below are some additional notes about the dependencies Review the information from running ./configure --help for the available parameters to pass to the configure script to enable the various dependencies. To build the Mono bindings, you must have GtkSharp installed. If you wish to use recent versions of GtkSharp, you'll need to make some trivial patches to the D-BUS sources. See for details. If you have a recent version of Monodoc installed (>= 1.1.10) and you passed the parameter to configure, the D-BUS build will fail. You can review the parts of this patch () that apply to the Monodoc installation, to fix the build problems. Note this is untested by the BLFS Team, but should work just fine. HAL Requirements must be installed before you begin building D-BUS if you plan on installing . GLib is required to build the libdbus-glib library, which is required by the HAL daemon. If you plan on using HAL with KDE, you'll need to link D-BUS with the Qt libraries. Ensure you've installed Qt before beginning the D-BUS installation. If you desire to use the program, Pyrex must be installed before you begin building D-BUS as the D-BUS Python bindings are required. You will also need to remove the --disable-python parameter from the configure command in the instructions below. User Notes: Kernel Configuration Ensure the following option is enabled in the kernel configuration and recompile the kernel if necessary: General Setup System V IPC dbus Installation of D-BUS As the root user, create a system user and group to handle the system message bus activity: groupadd -g 18 messagebus && useradd -c "D-BUS Message Daemon User" -d /dev/null \ -u 18 -g messagebus -s /bin/false messagebus Install D-BUS by running the following commands (you may wish to review the output from ./configure --help first and add any desired parameters to the configure command shown below): ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --disable-python && make The parameter does not work properly. If you have Doxygen installed and you wish to build the API documentation, issue doxygen. This package's test suite cannot be run without passing additional parameters to configure. These parameters are not intended to be used in a production build of D-BUS so you will have to build twice (issuing make distclean after the first build) if you want to run the regression tests. Now, as the root user: make install && install -v -m755 -d /usr/share/doc/dbus-&dbus-version; && install -v -m644 doc/{TODO,*.{dtd,xml,xsl,html,txt,c}} \ /usr/share/doc/dbus-&dbus-version; 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-&dbus-version;/api && install -v -m644 doc/api/html/* \ /usr/share/doc/dbus-&dbus-version;/api Command Explanations --localstatedir=/var: This parameter causes the daemon PID file to be created in /var/run/dbus instead of /usr/var/run/dbus. --disable-python: This parameter is required if Python is not installed. Remove the parameter if Python (and Pyrex) is installed and you wish to build the Python bindings. Configuring dbus Config Files /etc/dbus-1/session.conf, /etc/dbus-1/system.conf and /etc/dbus-1/system.d/* /etc/dbus-1/session.conf /etc/dbus-1/system.conf /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. Boot Script To automatically start dbus-daemon when the system is rebooted, install the /etc/rc.d/init.d/dbus bootscript from the package. dbus make install-dbus Note that this boot script only starts the system-wide D-BUS daemon. Each user requiring access to D-BUS services will also need to run a session daemon as well. There are many methods you can use to start a session daemon using the dbus-launch command. Review the dbus-launch man page for details about the available parameters and options. Here are some suggestions and examples: Add dbus-launch to the line in the ~/.xinitrc file that starts your graphical desktop environment as shown in . If you use xdm or some other display manager that calls the ~/.xsession file, you can add dbus-launch to the line in your ~/.xsession file that starts your graphical desktop environment. The syntax would be similar to the example in the ~/.xinitrc file. If you use gdm or some other display manager that utilizes custom files to initiate sessions, use the example in of the GDM instructions to create a file containing dbus-launch. The examples shown previously use dbus-launch to specify a program to be run. This has the benefit (when also using the --exit-with-session 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: # Start the D-BUS session daemon eval `dbus-launch` export DBUS_SESSION_BUS_ADDRESS This method will not stop the session daemon when you exit your shell, therefore you should add the following line to your ~/.bash_logout file: # Kill the D-BUS session daemon kill $DBUS_SESSION_BUS_PID 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 used with other session managers as well. The hint is located at . Contents Installed Programs Installed Libraries Installed Directories dbus-binding-tool, dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, dbus-send and dbus-viewer libdbus-1.{so,a} and optionally, dbus-1.jar, libdbus-gcj-1.{so,a}, libdbus-glib-1.{so,a}, libdbus-qt-1.{so,a}, libdbus-qt4-1.{so,a}, libdbus-mono-1.{so,a} and Python modules /etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, /usr/lib/python2.4/site-packages/dbus, /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version; and /var/run/dbus Short Descriptions dbus-binding-tool is used to create header files from GLib object files. dbus-binding-tool dbus-cleanup-sockets is used to clean up leftover sockets in a directory. dbus-cleanup-sockets dbus-daemon is the D-BUS message bus daemon. dbus-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-launch dbus-monitor is used to monitor messages going through a D-BUS message bus. dbus-monitor dbus-send is used to send a message to a D-BUS message bus. dbus-send dbus-viewer is a graphical D-BUS frontend utility. dbus-viewer 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-one communication between any two applications; dbus-daemon is an application that uses this library to implement a message bus daemon. libdbus-1.{so,a}