Skip to content

Conversation

@toneengo
Copy link

Describe your PR, what does it fix/add?

This PR implements the remote desktop portal with the wlr-virtual-pointer and virtual-keyboard protocol. This only works with 3l0w's hyprwm/Hyprland#7919 and hyprwm/hyprland-protocols#8

The RemoteDesktop portal makes client-side input-leap functional (as opposed to InputCapture, which is server-side).

also see 3l0w#1

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

There may be an issue with hyprwayland-scanner, which required me to patch virtual-keyboard-unstable-v1.cpp to create the virtual keyboard.

see hyprwm/hyprwayland-scanner#13 (comment)

Is it ready for merging, or does it need work?

it is a PR to a PR, it can only be merged once #268, hyprwm/Hyprland#7919 and hyprwm/hyprland-protocols#8, are merged.
also tell me if i did anything stupid

@CaptaiNiveau
Copy link

Hey! I built this PR as well as the input-capture PR for Hyprland and tried them. Both RustDesk and KDEConnect can't do remote input, but input capture is working fine.

RustDesk complains that I might need a newer version of libpipewire (surely not, I'm on Arch), while KDEConnect has a decent error message:

2025-05-12T01:30:24 kdeconnect.plugin.mousepad: Unable to handle remote input. RemoteDesktop portal not authenticated
2025-05-12T01:30:24 qt.dbus.integration: QDBusConnection: error: could not send message to service "org.freedesktop.portal.Desktop" path "/org/freedesktop/portal/desktop" interface "org.freedesktop.portal.RemoteDesktop" member "NotifyPointerMotion": Marshalling failed: Invalid object path passed in arguments

Meanwhile, this is the xdg-desktop-portal-hyprland log:

[LOG] [remotedesktop] New session:
[LOG] [remotedesktop]  | /org/freedesktop/portal/desktop/request/1_306/kdeconnect3116317319
[LOG] [remotedesktop]  | /org/freedesktop/portal/desktop/session/1_306/kdeconnect3116317319
[LOG] [remotedesktop]  | appid: 
[LOG] [EIS] Init socket: eisr-0
[LOG] [EIS] Listening on /run/user/1000/eisr-0
[LOG] [input-capture] got keymap
[LOG] [input-capture] got keymap
[LOG] [input-capture] got keymap
[LOG] [remotedesktop] start request
[LOG] [input-capture] got keymap

Looking at dbus (using bustle), the portal responds properly to the requests but somehow the clients still crash.

Do you have any remote control programs that work for you that I should try?
I'll be back home soon, so I can test between two similar setups with Arch + Hyprland.

Thanks for your effort, really hope this will be merged soon-ish :)

@toneengo
Copy link
Author

Unfortunately I haven't implemented connecting to PipeWire yet, which is what KDEConnect and RustDesk rely on. KDEConnect also seems to use the Remote Desktop portal's methods instead of using a libei client, which I haven't tested yet, and my implementation of those methods may have caused that error

From what I've used, InputLeap and lan-mouse (with libei backend) are functional, but there is no screen-sharing. Let me know if those don't work for you

I'm quite busy atm but I'll try and look into it this week, thx for bringin it up

@CaptaiNiveau
Copy link

Yeah, that makes sense. I tried lan-mouse from android, but that client had its own issues. Will try it with my desktop this evening.

@toneengo toneengo force-pushed the feat/remote-desktop-impl branch from 2cb4db6 to bd845fc Compare August 15, 2025 09:36
@toneengo toneengo force-pushed the feat/remote-desktop-impl branch from bd845fc to f74a227 Compare August 15, 2025 09:47
@sithlord48
Copy link

this should be marked to fix #252 when landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants