unique names

Thiago Macieira thiago at kde.org
Fri Jul 5 09:49:00 PDT 2013


On sexta-feira, 5 de julho de 2013 11.25.22, Ernast Sevo wrote:
> Hello!
> 
> I am registering a service with dbus and am trying to assign it a
> unique name. I have used dbus_bus_set_unique_name
> to set the name and then have confirmed that it does actually get set
> to the name by calling dbus_bus_get_unique_name.

You don't need to use set_unique_name unless you're actually writing the bus 
daemon or if you're using a non-bus connection. 

> However I am using d-feet to debug this and I still see the service
> show up as ":1.xx" and when I try to send something
> to that service using the name I set I get an
> org.freedesktop.DBus.Error.ServiceUnknown error. Do I need to do
> something

Yes. You should stop calling dbus_bus_set_unique_name. In a normal connection 
to the session or system buses, the unique name is normally assigned by the 
bus as soon as you connect. Moreover, you can't change it.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130705/e169de6d/attachment.pgp>


More information about the dbus mailing list