DBus (or D-Bus; short of Desktop Bus) is a mechanism for inter protocol communication, widely adopted in (Embedded) Linux system.
Created in 2002, now it is a part of the freedesktop.org project. As you might see below, it supports various Desktop Environments.
1. Why?
-
It don’t have language dependencies; You can use your preferred programming language and environment to do communications.
-
Gnome GLib(GIO): https://docs.gtk.org/gio/index.html#classes
-
KDE: https://develop.kde.org/docs/features/d-bus/introduction_to_dbus/
-
Python, of course: https://dbus.freedesktop.org/doc/dbus-python/
-
Haskell, lol: https://hackage.haskell.org/package/dbus
-
Because of these reasons, if you want to be a nice reverse engineer, you should know about DBus.
3. Tips
dbus-send
command is useful if you want to get information from the bus, or test method calls.
Very basic usage of dbus-send
:
$ dbus-send --session --dest=<class> <namespace> <method> [<parameters>]
There is also dbus-monitor
command. You can watch and monitor the flow of method calls etc.
3.1. List registered services
dbus-send --system \ # or --session
--dest=org.freedesktop.DBus \
--type=method_call \
--print-reply \
/org/freedesktop/DBus org.freedesktop.DBus.ListNames
5. See Also
-
Have you ever heard about elixir.bootlin? This slide demonstrates DBus in such nice way.