Skip to content
Advertisement

DBus rejecting to send message to a custom service on the system bus

I’m writing a chatbot that (besides other features) allows the admin to send custom message to instant message apps via a DBus call. The chatbot creates a service org.cdpa.cdpachan on the system bus, exposes the interface org.cdpa.bot_send_message and the method send_message. I’m able to get any user to register the service name with the configuration file /usr/share/dbus-1/system.d/org.cdpa.cdpachan.conf

JavaScript

But sending DBus method calls to my chatbot fails even when every user is allowed to send a message to it. And the error message isn’t very helpful.

JavaScript

Why is this happning? How can I solve it? A minimal mock service looks like this (using sdbus-c++)

JavaScript

Thanks


Edit: Note: If I make my chatbot live on the session bus. Then there’s no issue at all. But that doesn’t fit my use case.

Advertisement

Answer

JavaScript

this looks like your interface name. You probably want something like:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement