[systemd-devel] dbus-broker can be used for a "user" type bus accessible over tcp or not?

Erik Slagter erik at slagter.name
Mon Jan 20 17:53:33 UTC 2025


Hi,

I am trying to have a remotely accessible dbus. I'd love to discuss all 
considerations, but for the moment let's just assume I need it.

I already learned that you cannot have the "system" or "session" dbus 
listening to tcp, as it can run only one socket and it must be a "unix" 
type socket. Ok, fair enough.

Now I am trying to setup a "private" dbus (not sure if that's the 
correct term). I learned from the manpages that dbus-broker-launch will 
accept one and only one socket, from a systemd socket service. So I did, 
but used a "tcp" socket. Now dbus-broker-launch complains it's not a 
"proper" "unix" socket and aborts. Otherwise I added an additional 
<listen> directive to the config, but as mentioned in the man page, this 
is duly ignored.

I think there is only one option left and that's calling the AddListener 
method (/org/bus1/DBus/Broker, org.bus1.DBus.Broker). Calling the 
relevant running broker with introspect doesn't show this method, though 
(not even the node or interface). It looks like the (current) 
dbus-broker-launch doesn't implement it.

So I am starting to think it's really not possible to run "user" dbus'es 
with dbus-broker. That I should use the dbus-daemon for that. Does my 
assumption hold? Otherwise, what would I have to do to get it working? 
Just firing up the bus, the rest I can manage (I think...)

Thanks!!!


More information about the systemd-devel mailing list