%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 Required or both and Optional , (to generate the API documentation), and xmlto (to generate HTML documentation and manuals) 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 This package's test suite cannot be run without passing additional parameters to configure and exposing additional functionality in the binaries. 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 && make && make check && make distclean 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 && make The 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-&dbus-version; && install -v -m644 doc/{TODO,*.{dtd,xml,xsl,txt,c}} \ /usr/share/doc/dbus-&dbus-version; If you built the HTML documentation, install it by issuing the following commands as the root user: install -v -m644 doc/*.html /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 \ /usr/share/man/man3dbus && install -v -m644 doc/api/html/* \ /usr/share/doc/dbus-&dbus-version;/api && install -v -m644 doc/api/man/man3dbus/* \ /usr/share/man/man3dbus Command Explanations --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. 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. 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 << "EOF" <!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> EOF 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 Library Installed Directories dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, dbus-send, dbus-uuidgen libdbus-1.{so,a} /etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;, /usr/share/man/man3dbus, /var/lib/dbus and /var/run/dbus Short Descriptions 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-uuidgen is used to generate or read a universally unique ID. dbus-uuidgen 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}