Extension protocols to support keyboard and mouse sharing?

Olivier Fourdan fourdan at gmail.com
Fri Jul 21 07:39:02 UTC 2023


On Thu, 20 Jul 2023 at 21:41, Jonas Ådahl <jadahl at gmail.com> wrote:

> On Thu, Jul 20, 2023 at 01:47:47PM -0500, Matt Hoosier wrote:
> > Hi,
> >
> > For a while now, I’ve been hoping to see some commercial solutions like
> > https://symless.com/synergy that implement keyboard and mouse sharing
> > finally add support for running on DEs that use Wayland.
> >
> > It seems to be forever on their feature roadmaps but never really getting
> > closer.
> >
> > I assume the problem is lack of a good way to snoop on the input events
> and
> > (maybe; not sure how these commercial solutions implement it) rewrite or
> > suppress certain input events when they’re talking to a typical DE
> > compositor like Mutter.
> >
> > I had a quick look through the current set of things in
> wayland-protocols,
> > and nothing jumped out at me as work in that direction.
> >
> > Does anybody know of something underway in the upstream compositors that
> > might not have filtered down to wayland-protocols yet, which would be
> > useful for securely implementing mouse/keyboard sharing across separate
> > machines? Maybe I could point these vendors to it.
> There is an ongoing, effort to achieve this with xdg-desktop-portal
> APIs, where the intention is to allow a sandboxed input-leap (or in
> theory synergy) to be able to act as both a server and client in a
> Wayland session, while still actively requiring user consent. The pieces
> that I know of that currently have implementations that ties it all
> together are input-leap, xdg-desktop-portal, the GNOME portal backend
> (xdg-desktop-portal-gnome & mutter).
> The portals in question are input capture[1], for capturing the input
> from a display server (to the input leap *server*), and remote
> desktop[2], for remote controlling / injecting input events to a display
> server (from the input leap *client*). The portal APIs rely on libei[3]
> for input event transmission - the portals are there to negotiate
> consent and to set up sessions.
> Jonas
> [1] https://github.com/flatpak/xdg-desktop-portal/pull/714
> [2]
> https://flatpak.github.io/xdg-desktop-portal/#gdbus-org.freedesktop.portal.RemoteDesktop
> [3] https://gitlab.freedesktop.org/libinput/libei

To complement what Jonas said, the merge request to add support for this in
InputLeap is [4] and the code seems to have been kept updated since then

It should be possible to use input-leap with mouse/keyboard sharing with
> all the building blocks manually compiled, but nothing has shipped in
> distributions yet.

FWIW, as a teaser internally, I made a video a few months ago of this
working on a local build here [6] between two laptops (please make sure to
turn the sound down, apologies for that!) :-)

The relevant bits for this (and more) are all linked from that libEI issue


[4] https://github.com/input-leap/input-leap/pull/1594
[5] https://github.com/input-leap/input-leap/pulls?q=libei
[6] https://youtu.be/8XUUFuwsDWQ
[7] https://gitlab.freedesktop.org/libinput/libei/-/issues/1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20230721/9cba5bfc/attachment.htm>

More information about the wayland-devel mailing list