Skip to content
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

Support for org.freedesktop.portal.RemoteDesktop? #252

Open
lessu opened this issue Aug 26, 2024 · 4 comments
Open

Support for org.freedesktop.portal.RemoteDesktop? #252

lessu opened this issue Aug 26, 2024 · 4 comments

Comments

@lessu
Copy link

lessu commented Aug 26, 2024

portal.RemoteDesktop interface is not implemented, so we are lacking the ability to work with remote controlling Apps, like rust-desk.

Is there a plane to implement?

@vaxerski
Copy link
Member

not atm

@gac3k
Copy link

gac3k commented Sep 4, 2024

@lessu @vaxerski so since that subject was brought again, I will confess that I actually started to implement that on my own some time ago, to have a proper support for tools that are currently requring that portal such as InputLeap.

This is my current effort: a8553de

Which is not even close to finish, contains a lot of bloat and is violating a lot of rules, but what I already have in there is a RemoteDesktop basic implementation with a support for basic mouse movements, as well as a seperate small application named hyprland-eis which is based on emulated input server example from libei, and that is because tools such as InputLeap are only using RemoteDesktop portal to connect to device, and then there's a method which is only returning a file descriptor to the emulated input server socket, through which all the actual traffic so mouse movements, key presses etc. is being served. Also since this is my use case it's the easiest way for me to test the whole thing.

All together, I currently do have it in the state in which I can create a working connection between InputLeap/Barrier server and to connect to my Hyprland based InputLeap client, I can then also move the mouse freely between these two targets, which already I think is quite a lot. Currently struggling a bit with a keyboard presses, mostly due to all the xkb specific quirks, but I think I am getting there as well.

That being said, C/C++ are almost completely unknown languages to me, and I am learning while coding that piece of code, and I am doing that mostly because there are no other volunteers and I need it for my life to be fully comfortable. So in general a quality of that (especially currently since it's simply work in progress experiment) is terrible... but hey, it works (at least till the certain exempt) :D

So now going to the end if I would have some support/guidance from the @vaxerski or any other contributor who could help me to review that (once finished) and to iterate on potential fixes if needed I am happy to continue working on that.

@leon-erd
Copy link

leon-erd commented Sep 4, 2024

Thanks a lot for trying to implement that.
I would also love to see full support for it. I am using kdeconnect which also requires this for mouse movement and keyboard presses. There is a MR in the xdg-desktop-portal-wlr project which also tries to implement that: emersion/xdg-desktop-portal-wlr#263
Different ppl have progressed it bit by bit. I have actually been using this: Enovale/xdg-desktop-portal-wlr@11817f9 on hyprland (in addition to xdg-desktop-portal-hyprland) for some months now. For me it works well enough and is certainly an upgrade compared to no remote control at all.
All basic lower case letters are working as well as mouse movement.
Maybe his implementation can help you with yours. He is also new to C so maybe you can help each other out :D

@Tsagadai
Copy link

Tsagadai commented Sep 5, 2024

This is good progress. It should be possible to use libei directly or at least calling the upstream interfaces that are implemented now. I'm also taking a look at this and I'll submit a PR soon too.

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

No branches or pull requests

5 participants