neutrinolabs / xorgxrdp

Xorg drivers for xrdp
Other
428 stars 108 forks source link

mouse move from code using XTEST extension does not work #249

Open thenik opened 1 year ago

thenik commented 1 year ago

Hello,

I am trying to do some automation for my xrdp session and it does not work. How to reproduce:

sudo apt-get install xautomation
xte 'mousemove 200 200'

the same story from python code

import mouse
mouse.move(100, 100, absolute=True, duration=3)

When I run this code or xte from my notebook it works well as expected.

Any ideas how to manage this issue?

matt335672 commented 1 year ago

@thenik - I can reproduce this on the Xorg backend with your clear instructions. We'll make it an issue against that.

If you use the Xvnc backend, you should find the above command works fine - it does for me.

thenik commented 1 year ago

Here is my view no what did happen here: 1) I connected from windows rdp client to linux \xrdp server.

2) when I ran mouse.move command on the server X session it moved mouse but in 1 sec or even less windows rdp client moved mouse to original point because client has higher proirity.

So I see only 1 way how to solve that is to find a way how to turn off mouse position from a rdp client.

jsorg71 commented 1 year ago

When the pointer position is moved from the server side, we should send a PDU to update the client, see https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpbcgr/3058381e-c856-4b26-a93c-d8f5514f8c3c I don't think we have ever implemented this. Usually, one wants to run the recording software on the client so I don't think this has come up.