[PATCH] dbus-send: register connection on the bus when --address is used as dbus-monitor does

Simon McVittie simon.mcvittie at collabora.co.uk
Thu Dec 1 03:48:34 PST 2011

On Wed, 30 Nov 2011 at 23:46:04 -0800, Pavel Strashkin wrote:
> When dbus-send is used with --address command line option, it always
> fails with "org.freedesktop.DBus.Error.AccessDenied: Client tried to
> send a message other than Hello without being registered". The reason
> is pretty simple: there is no dbus_bus_register call in this case.

"Hello" (dbus_bus_register) only makes sense on a message bus, not on a
peer-to-peer connection. It seems dbus-send assumes that --address points to a
peer-to-peer connection, whereas dbus-monitor assumes that it points to a
message bus.

I think a better way to solve this would be to add "--bus=ADDRESS"
(explicitly message bus) and "--peer=ADDRESS" (explicitly peer-to-peer) to
both tools, and deprecate --address for having an inconsistent meaning?


More information about the dbus mailing list