[GH-ISSUE #187] Input capture not working with Wayland/Linux/labwc #84

Open
opened 2026-05-05 22:08:29 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @chris-y on GitHub (Sep 3, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/187

I am trying to run lan-mouse on a Raspberry Pi with labwc (I also tried Wayfire), and it is not working. I installed with cargo as per the instructions.

[2024-09-03T14:38:34Z WARN  lan_mouse::config] /home/chris/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2024-09-03T14:38:34Z WARN  lan_mouse::config] Continuing without config file ...
[2024-09-03T14:38:34Z INFO  lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt]
[2024-09-03T14:38:34Z WARN  lan_mouse::config] /home/chris/.config/lan-mouse/config.toml: No such file or directory (os error 2)
[2024-09-03T14:38:34Z WARN  lan_mouse::config] Continuing without config file ...
[2024-09-03T14:38:34Z INFO  lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt]
[2024-09-03T14:38:34Z INFO  lan_mouse] Press [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt] to release the mouse
[2024-09-03T14:38:34Z INFO  lan_mouse::server] running service
[2024-09-03T14:38:34Z INFO  lan_mouse::server::emulation_task] creating input emulation...
[2024-09-03T14:38:34Z INFO  input_emulation] using emulation backend: wlroots
[2024-09-03T14:38:34Z WARN  input_capture] input-capture-portal input capture backend unavailable: error creating input-capture-portal backend: `xdg-desktop-portal: `A portal frontend implementing `org.freedesktop.portal.InputCapture` was not found``
[2024-09-03T14:38:34Z WARN  input_capture] layer-shell input capture backend unavailable: error creating layer-shell capture backend: `zwp_keyboard_shortcuts_inhibit_manager_v1 protocol not supported: the requested global was not found in the registry`
[2024-09-03T14:38:34Z WARN  input_capture] X11 input capture backend unavailable: error creating x11 capture backend: `X11 input capture is not yet implemented :(`
[2024-09-03T14:38:34Z WARN  lan_mouse::server::capture_task] input capture exited: error creating input-capture: `no backend available`

(lan-mouse:6009): Gtk-WARNING **: 15:38:34.673: Unable to acquire the address of the accessibility bus: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files. If you are attempting to run GTK without a11y support, GTK_A11Y should be set to 'none'.

I guess I'm missing something. I checked xdg-desktop-portal was installed.

Originally created by @chris-y on GitHub (Sep 3, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/187 I am trying to run lan-mouse on a Raspberry Pi with labwc (I also tried Wayfire), and it is not working. I installed with cargo as per the instructions. ``` [2024-09-03T14:38:34Z WARN lan_mouse::config] /home/chris/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2024-09-03T14:38:34Z WARN lan_mouse::config] Continuing without config file ... [2024-09-03T14:38:34Z INFO lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt] [2024-09-03T14:38:34Z WARN lan_mouse::config] /home/chris/.config/lan-mouse/config.toml: No such file or directory (os error 2) [2024-09-03T14:38:34Z WARN lan_mouse::config] Continuing without config file ... [2024-09-03T14:38:34Z INFO lan_mouse] release bind: [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt] [2024-09-03T14:38:34Z INFO lan_mouse] Press [KeyLeftCtrl, KeyLeftShift, KeyLeftMeta, KeyLeftAlt] to release the mouse [2024-09-03T14:38:34Z INFO lan_mouse::server] running service [2024-09-03T14:38:34Z INFO lan_mouse::server::emulation_task] creating input emulation... [2024-09-03T14:38:34Z INFO input_emulation] using emulation backend: wlroots [2024-09-03T14:38:34Z WARN input_capture] input-capture-portal input capture backend unavailable: error creating input-capture-portal backend: `xdg-desktop-portal: `A portal frontend implementing `org.freedesktop.portal.InputCapture` was not found`` [2024-09-03T14:38:34Z WARN input_capture] layer-shell input capture backend unavailable: error creating layer-shell capture backend: `zwp_keyboard_shortcuts_inhibit_manager_v1 protocol not supported: the requested global was not found in the registry` [2024-09-03T14:38:34Z WARN input_capture] X11 input capture backend unavailable: error creating x11 capture backend: `X11 input capture is not yet implemented :(` [2024-09-03T14:38:34Z WARN lan_mouse::server::capture_task] input capture exited: error creating input-capture: `no backend available` (lan-mouse:6009): Gtk-WARNING **: 15:38:34.673: Unable to acquire the address of the accessibility bus: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files. If you are attempting to run GTK without a11y support, GTK_A11Y should be set to 'none'. ``` I guess I'm missing something. I checked xdg-desktop-portal was installed.
Author
Owner

@feschber commented on GitHub (Sep 3, 2024):

There are two backends in lan-mouse in question here:

  • input capture portal
  • layer-shell

Input Capture Portal

The wlr desktop portal does not implement the InputCapture portal yet: https://github.com/labwc/labwc/issues/1263
I've been thinking about writing a libei "bridge" as described in the linked issue and move it out of lan-mouse but that is basically what the layer-shell backend does:

Layer Shell

labwc does not implement keyboard-shortcut-inhibit-unstable-v1, which is required for the layer-shell backend to pass keyboard shortcuts that would otherwise be handled by labwc itself: https://github.com/labwc/labwc/issues/1046

Labwc is the first compositor I've come across so far that does not implement this protocol, which is why it has been a hard dependency so far.

Their reasoning as to not implementing it sounds valid to me.
Making the protocol a soft dependency for lan-mouse would enable ToggleKeybinds as a workaround.

Automatically toggling this would however require manual action or could maybe be done through an enter_hook.

Maybe this is a compelling reason for labwc to implement the protocol ;)

<!-- gh-comment-id:2327383765 --> @feschber commented on GitHub (Sep 3, 2024): There are two backends in lan-mouse in question here: - input capture portal - layer-shell ### Input Capture Portal The wlr desktop portal does not implement the InputCapture portal yet: https://github.com/labwc/labwc/issues/1263 I've been thinking about writing a libei "bridge" as described in the linked issue and move it out of lan-mouse but that is basically what the layer-shell backend does: ### Layer Shell labwc does not implement [keyboard-shortcut-inhibit-unstable-v1](https://wayland.app/protocols/keyboard-shortcuts-inhibit-unstable-v1), which is required for the layer-shell backend to pass keyboard shortcuts that would otherwise be handled by labwc itself: https://github.com/labwc/labwc/issues/1046 Labwc is the first compositor I've come across so far that does not implement this protocol, which is why it has been a hard dependency so far. Their reasoning as to not implementing it sounds valid to me. Making the protocol a soft dependency for lan-mouse would enable [ToggleKeybinds](https://labwc.github.io/labwc-actions.5.html#entry_action_name=togglekeybinds) as a workaround. Automatically toggling this would however require manual action or could maybe be done through an `enter_hook`. Maybe this is a compelling reason for labwc to implement the protocol ;)
Author
Owner

@feschber commented on GitHub (Sep 3, 2024):

Just tested this and it seems like the layer-shell implementation in labwc does not correctly interact with pointer-constraints right now. I will see if I can write a patch for that.

Aside from that, a "leave" hook would probably be needed for the ToggleKeybinds workaround.

<!-- gh-comment-id:2327488736 --> @feschber commented on GitHub (Sep 3, 2024): Just tested this and it seems like the layer-shell implementation in labwc does not correctly interact with pointer-constraints right now. I will see if I can write a patch for that. Aside from that, a "leave" hook would probably be needed for the ToggleKeybinds workaround.
Author
Owner

@TopherTimeMachine commented on GitHub (Jan 13, 2025):

Is there any updates for this?

<!-- gh-comment-id:2587972721 --> @TopherTimeMachine commented on GitHub (Jan 13, 2025): Is there any updates for this?
Author
Owner

@swapnanil1 commented on GitHub (Jun 6, 2025):

i'm having this same warning on swaywm 1.10

[2025-06-06T07:10:34Z WARN  input_capture] input-capture-portal input capture backend unavailable: error creating input-capture-portal backend: `xdg-desktop-portal: `A portal frontend implementing `org.freedesktop.portal.InputCapture` was not found``
<!-- gh-comment-id:2948328234 --> @swapnanil1 commented on GitHub (Jun 6, 2025): i'm having this same warning on swaywm 1.10 ```bash [2025-06-06T07:10:34Z WARN input_capture] input-capture-portal input capture backend unavailable: error creating input-capture-portal backend: `xdg-desktop-portal: `A portal frontend implementing `org.freedesktop.portal.InputCapture` was not found`` ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#84
No description provided.