Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there such a thing as list of available DBus services?
I've stumbled upon a few (like those provided by NetworkManager, Rhythmbox, Skype, HAL).
I wonder if I can find a rather complete list of provided services/interfaces.

share|improve this question

3 Answers 3

up vote 25 down vote accepted

Session:

dbus-send --session           \
  --dest=org.freedesktop.DBus \
  --type=method_call          \
  --print-reply               \
  /org/freedesktop/DBus       \
  org.freedesktop.DBus.ListNames

System:

dbus-send --system            \
  --dest=org.freedesktop.DBus \
  --type=method_call          \
  --print-reply               \
  /org/freedesktop/DBus       \
  org.freedesktop.DBus.ListNames

You can also use DFeet if you prefer a GUI tool.

share|improve this answer
    
@don-crissti how to the to list all object-paths under a service with dbus-send or gdbus? –  Khurshid Alam Jan 8 at 9:06
    
@KhurshidAlam - the easiest way is with qdbus: qdbus --system org.freedesktop.UPower. With gdbus is more complicated: gdbus introspect --system --dest=org.freedesktop.UPower --object-path /org/freedesktop/UPower --recurse | sed '/node/!d;s#^\ *node\ ##;s#\ {$##' but why don't you ask a question ? –  don_crissti Jan 9 at 1:23

qdbusviewer is your best friend, allow your to send dbus messages as well:

enter image description here

share|improve this answer
    
Seems broken as of 2014. It lists the services but can't send messages.. –  Pithikos Nov 6 '14 at 15:49
    
I can't even start it on Ubuntu 14.04. It fails with: qdbusviewer: could not exec '/usr/lib/i386-linux-gnu/qt4/bin/qdbusviewer': No such file or directory –  kasperd Dec 28 '14 at 23:54

The python way is the beautiful way.

System services:

import dbus
for service in dbus.SystemBus().list_names():
    print(service)

Session services:

import dbus
for service in dbus.SessionBus().list_names():
    print(service)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.