New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Wayland flatpak input support | Remote desktop portal #6675
Conversation
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
…or input capture Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
…tion) Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
So we can remove uinput? what limit does remote desktop portal have? |
@fufesou please help review this. |
Yes, we can remove it. I could not find any limitations. |
@fufesou please confirm and test. If so, let's remove uinput to keep cleaner code. |
@sahilyeole have you tested appimage? can it accept input with rdp? |
No, I haven't tested appimage yet. |
https://github.com/rustdesk/rustdesk/blob/master/src%2Fserver%2Fuinput.rs#L549-L551 uinput currently doesn't support scroll on x-axis. |
@sahilyeole I've tested on Ubuntu 22.04. The input works fine. But the image may not be transferred after some time. I've also tested the latest nightly build of the master branch. The images transferring is fine. aa.mp4 |
Yes, I noticed it once in a while on Ubuntu. I will look into it soon. Meanwhile, if you want to test more about input you can try on arch. Stream works on arch without freezing. |
@sahilyeole why does your PR for keyboard/mouse impact screen capture? |
I had to rearrange API calls in pipewire.rs for remote desktop API to work along with screencast API.
Appimage on wayland gives this error while connecting (with or without this PR changes). It does not show video stream.
My bad I didn't test 20.04, now working on it. |
I don't think it's necessary to test Ubuntu 20.04 since it's old and the default desktop doesn't support |
@fufesou can you please try nightly flatpak again?
So currently the connection to ubuntu 20.04 wayland must also be failing anyway since we need |
Yes, the nightly flatpak has this issue. This issue seems happen when the images are not changed, though it doesn't always happen. bb.mp4 |
So do I need to do any other code changes? Flatpak on arch can be tested for rdp_input capture without stream freeze. |
AppImage? |
Code is not beautiful in this PR. Also please review all unwrap again. |
I've tried comment https://github.com/rustdesk/rustdesk/blob/master/libs/scrap/src/wayland/pipewire.rs#L242 But the flatpak issue persists. There's another strange issue. My VM (Ubuntu 22.04, Wayland) is easily to get stuck after running for a while after "rustdesk-1.2.4-x86_64.flatpak" is installed. It does not always happen. I need to test more. |
Appimage has this issue:
It does ask the user for permission for remote interaction. If the stream works the input must also work. |
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Signed-off-by: Sahil Yeole <sahilyeole93@gmail.com>
Thanks for the suggestions. I've made the changes. |
Fixes #5949
Description:
Utilise the remote desktop portal interface (provided by xdg desktop portal) when uinput is unavailable for input capture on wayland.
Advantages:
Wayland input is supported similar to uinput on:
Supports:
It supports input from:
Events:
Tested:
Remote: ubuntu, arch (kde, gnome)
Local: mac, linux, ios, android
Note:
During testing, I found an issue that occurs even without the changes of this PR (also occurs on 1.2.3):
Build for test/review:
rustdesk-1.2.4-x86_64_wl_rdp.flatpak
Test videos:
rdp_desktop.mp4
rdp_mobile.mp4