Difference between revisions of "D-Bus"

From ArchWiki
Jump to: navigation, search
(Starting the user session: update as per https://www.archlinux.org/news/d-bus-now-launches-user-buses/)
 
(20 intermediate revisions by 11 users not shown)
Line 2: Line 2:
 
[[cs:D-Bus]]
 
[[cs:D-Bus]]
 
[[es:D-Bus]]
 
[[es:D-Bus]]
 +
[[ja:D-Bus]]
 +
[[ko:D-Bus]]
 
[[zh-CN:D-Bus]]
 
[[zh-CN:D-Bus]]
{{Article summary start}}
+
{{Expansion|Mention disabling of dbus services through use of {{ic|systemctl mask}} and overrides in {{ic|/etc/dbus-1/services}}}}
{{Article summary text|Installation and configuration of D-Bus.}}
+
 
{{Article summary end}}
+
{{Related articles start}}
 +
{{Related|kdbus}}
 +
{{Related articles end}}
 +
 
 
[[Wikipedia:D-Bus|D-Bus]] is a message bus system that provides an easy way for inter-process communication. It consists of a daemon, which can be run both system-wide and for each user session, and a set of libraries to allow applications to use D-Bus.
 
[[Wikipedia:D-Bus|D-Bus]] is a message bus system that provides an easy way for inter-process communication. It consists of a daemon, which can be run both system-wide and for each user session, and a set of libraries to allow applications to use D-Bus.
==Installation==
 
Because [[systemd]] depends on {{Pkg|dbus-core}}, D-Bus is enabled automatically when using systemd. The package {{pkg|dbus}} can optionally be [[pacman|installed]] from the [[Official Repositories|official repositories]] if you want the [[xinitrc]] files for D-Bus.
 
  
==Starting the user session==
+
== Installation ==
[[GNOME|gnome-session]], [[KDE|startkde]] and [[Xfce|startxfce4]] will start a D-Bus session automatically if it isn't already running. The template for {{ic|~/.xinitrc}} ({{ic|/etc/skel/.xinitrc}}) will do the same since it sources scripts in {{ic|/etc/X11/xinit/xinitrc.d/}}, including 30-dbus. Make sure that the code is included in your [[xinitrc|~/.xinitrc]]:
+
  
{{hc|~/.xinitrc|<nowiki>#!/bin/sh
+
D-Bus is enabled automatically when using [[systemd]] because {{Pkg|dbus}} is a dependency of systemd.
  
# Source scripts in /etc/X11/xinit/xinitrc.d/
+
== Starting the user session ==
if [ -d /etc/X11/xinit/xinitrc.d ]; then
+
    for f in /etc/X11/xinit/xinitrc.d/*; do
+
        [ -x "$f" ] && . "$f"
+
    done
+
    unset f
+
fi
+
  
exec $your_window_manager</nowiki>}}
+
As of {{Pkg|systemd}} {{ic|226-1}} and {{Pkg|dbus}} {{ic|1.10.0-3}}, the D-Bus session is started automatically. [https://www.archlinux.org/news/d-bus-now-launches-user-buses/]
 +
 
 +
== Debugging ==
 +
 
 +
{{pkg|d-feet}} is an easy to use D-Bus debugger GUI tool. D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces. See [https://wiki.gnome.org/DFeet its homepage] for more info.
  
 
==See also==
 
==See also==
 +
 
*[http://www.freedesktop.org/wiki/Software/dbus D-Bus page at freedesktop.org]
 
*[http://www.freedesktop.org/wiki/Software/dbus D-Bus page at freedesktop.org]
 
*[http://www.freedesktop.org/wiki/IntroductionToDBus Introduction to D-Bus] on freedesktop.org
 
*[http://www.freedesktop.org/wiki/IntroductionToDBus Introduction to D-Bus] on freedesktop.org

Latest revision as of 16:57, 21 September 2015

Tango-view-fullscreen.pngThis article or section needs expansion.Tango-view-fullscreen.png

Reason: Mention disabling of dbus services through use of systemctl mask and overrides in /etc/dbus-1/services (Discuss in Talk:D-Bus#)

Related articles

D-Bus is a message bus system that provides an easy way for inter-process communication. It consists of a daemon, which can be run both system-wide and for each user session, and a set of libraries to allow applications to use D-Bus.

Installation

D-Bus is enabled automatically when using systemd because dbus is a dependency of systemd.

Starting the user session

As of systemd 226-1 and dbus 1.10.0-3, the D-Bus session is started automatically. [1]

Debugging

d-feet is an easy to use D-Bus debugger GUI tool. D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces. See its homepage for more info.

See also