Does DBus Lie?

Arigead captain.deadly at
Tue Aug 24 01:45:27 PDT 2010

Hello all,
    I'm a bit confused by what DBus is telling me when I try to listen
to the System bus. I'm trying to listen to gpsd which "posts" a location
fix at regular intervals. If I look at the system bus with:

dbus-monitor --system

I can see the info which I'm looking for. I'm inside an office at
present so the actual gps chipset has no fix so this data don't tell you
much about where I am but the info is there for org.gpsd:

signal sender=:1.11 -> dest=(null destination) serial=3849
path=/org/gpsd; interface=org.gpsd; member=fix
   double 1.17539e+09
   int32 1
   double nan
   double 180
   double 0
   double nan
   double -6.37813e+06
   double nan
   double 0
   double nan
   double 0
   double nan
   double 0
   double nan
   string "/dev/ttyUSB0"

Now to capture the above I decided I'd write a bit of python for a start
but I'll probably have to move it to Java eventually. So my code tries
to get a handle on the org.gpsd Interface:


    import dbus

    bus = dbus.SystemBus()

    proxy = bus.get_object('org.gpsd', '/org/gpsd')

Those four lines are all I have at the moment and they give me an error
which I don't really understand:

Traceback (most recent call last):
  File "./", line 7, in <module>
    proxy = bus.get_object('org.gpsd', '/org/gpsd')
  File "/usr/lib/pymodules/python2.6/dbus/", line 244, in get_object
  File "/usr/lib/pymodules/python2.6/dbus/", line 241, in __init__
    self._named_service = conn.activate_name_owner(bus_name)
  File "/usr/lib/pymodules/python2.6/dbus/", line 183, in
  File "/usr/lib/pymodules/python2.6/dbus/", line 281, in
    'su', (bus_name, flags)))
  File "/usr/lib/pymodules/python2.6/dbus/", line 620, in
    message, timeout)
org.freedesktop.DBus.Error.ServiceUnknown: The name org.gpsd was not
provided by any .service files

That error suggests that the org.gpsd don't exist but according to
dbus-monitor it does exist. I thought that it might be a security policy
as I've never messed about on the System bus before, only the session.
So I created a poicy in /etc/dbus-1. This don't make any difference:

 cat /etc/dbus-1/system-local.conf
  <policy user="user">
    <allow send_destination="*" eavesdrop="true"/>
    <allow receive_sender="*" eavesdrop="true"/>

I know you're all busy as but I'd really appreciate any hint which you
might be able to offer me on this little problem.

More information about the dbus mailing list