Intent-based sharing support in dbus - feature proposal and demo

Simon McVittie smcv at collabora.com
Thu Oct 31 15:37:00 UTC 2024


On Thu, 31 Oct 2024 at 15:05:41 +0100, Rick Opper wrote:
> I am writing to propose intent-based sharing support in dbus as a new feature.
> I think dbus could support sharing with just the addition of an interface with
> two methods, so not too costly.
> I have put together a simple demo and the start of (very rough) documentation
> here:
> 
> https://github.com/brainstormtrooper/gnome_sharing

Your demo seems to be something that is implemented as its own D-Bus
service, making use of features of the message bus, but without needing
any feature additions in the message bus itself.

If it doesn't actually need new message bus features, then I think having
it as its own separate thing would probably make most sense, similar to
the way services like xdg-desktop-portal make use of D-Bus but are not
part of the D-Bus message bus itself. That way, message bus maintainers
can concentrate on keeping the message bus secure and functional, and
won't be dividing their limited time between increasingly many things.

Alternatively, if its design works well with sandboxed apps,
xdg-desktop-portal might be a good place for this feature (and if its
design doesn't work well with sandboxed apps, then that should probably
be considered to be a significant problem in 2024).

I think there has already been some design work on Android-style "sharing"
and "intents" in both <https://gitlab.freedesktop.org/xdg/xdg-specs/>
and <https://github.com/flatpak/xdg-desktop-portal/>, so I would recommend
reviewing what has been discussed and designed so far before duplicating
effort.

The reference implementation of a D-Bus message bus is dbus-daemon;
dbus-broker is another commonly-used implementation.  Message bus
implementations are best-placed to be mechanism, rather than policy:
they are all about the mechanics of generically delivering messages,
and don't really get involved in the semantics of any specific message,
the same way postal carriers can't help you to write a letter.

    smcv


More information about the dbus mailing list