Gurchetan Singh <
gurchet...@chromium.org> writes:
>> But also, in the near future I'll be looking into transporting certain
>> XDG Desktop Portals between host and guest. Some portal backend
>> interfaces require sending file descriptors from the backend to the
>> frontend/application, which something that can transport Wayland would
>> be quite suited for. (Whether it makes sense to actually transport the
>> file descriptors like that will be portal-dependent, but I think it's
>> very likely to be useful to be able to do it for some of them.)
>>
>
> Would that be possible with XWayland + Sommelier?
I don't think XWayland has anything to do with it. Desktop Portals are
D-Bus interfaces that let a sandboxed application ask for things like
access to a file that isn't already in its sandbox. Unless I want to
write a Wayland protocol for it and tunnel it over Wayland, I need a
separate channel of some sort (whether that ends up being Rutabaga or
vsock), because the unnamed Wayland channel is already taken by the
connection to the compositor.
That's exactly my point. The only reason crosvm needs to know what the
channel is for is to map from name to type. If it just accepted channel
types directly, we could remove the requirement for channel types to be
registered, which is a hurdle to jump through to use Rutabaga that
doesn't need to be there. No other socket protocol (vsock, TCP/IP,
etc.) enforces registration of what are essentially port numbers like
this, so Rutabaga channels shouldn't either.
Whatever program starts crosvm already has to know the specifics of the
protocol it's using Rutabaga for, because it has to know the path to its
socket, so it would make a lot more sense to just teach it what the
channel type number is, and have it pass that to crosvm.
Think about somebody trying to use Rutabaga for some new purpose outside
Google. They get crosvm — maybe they don't even build it themselves but
get it from a distro package manager, and they want to start it up with
some custom channel for their new purpose. They discover that, instead
of just specifying a port number, like they're used to with vsock, they
have to:
- Find the crosvm repo
- Clone it
- Read and understand the relevant code
- Modify it to accept their new channel type
- Learn the Chromium contribution process
- Create a Google account
- Read and sign a CLA (which there are very valid reasons not to want to do)
- Push their patch to Gerrit
- Wait for it to be reviewed and submitted
- Build a new crosvm, or, even worse, wait for their distro package to
be updated
That's a lot of work that could be totally unnecessary, and all that
would have to change is for crosvm to accept numeric channel types on
its command line.