vmware / open-vm-tools

Official repository of VMware open-vm-tools project
http://sourceforge.net/projects/open-vm-tools/
2.25k stars 425 forks source link

async clipboard when using RDP #740

Open konosubakonoakua opened 1 week ago

konosubakonoakua commented 1 week ago

Describe the bug

[!IMPORTANT] I'm running ubuntu22 on Vmware Workstation 17.6.0 build-24238078 on win11 23h2 (The host)

I also have another win11 PC (The guest).

The vmtools clipboard works properly on the host, after copying I can paste them in VM immediateyly.

I have the RDP (remote desktop protocol) clipborad working properly when not pasting something into the virtual machine, I mean there's no delay. I perss Ctrl-c on the host PC, then I can paste the contents immediately on the guest PC.

But, When I'm using RDP to paste something into VM, the clipboard behaves async. I can not paste the content immediately, otherwise the clipboard on VM will retain the last time content, no new content is synced.

I also find that If I press something else on the host PC, i.e. the taskbar, then I have the vm clipboard synced with new content immediately. I can only paste after I click something on host.

Reproduction steps

  1. run VM on computer A
  2. connenct computer A by RDP on computer B
  3. keep copying something on computer B
  4. on computer B, try to paste to VM in RDP
  5. try multiple times, observe if the clipboard is synced. ...

Expected behavior

VM clipboard should keep synced with HOST system clipboard when using RDP. No click needed.

Additional context

No response

konosubakonoakua commented 1 week ago

Virtual Box does not have this issue.

vmwkruti1111 commented 1 week ago

@konosubakonoakua ,

I couldn't reproduce this issue. Steps I followed while trying to reproduce it:

konosubakonoakua commented 1 week ago

Hi, @vmwkruti1111 I'm running ubuntu22 on vmware 17.6.0. Not sure about the win11 guest vm

konosubakonoakua commented 1 week ago

Now I switched to vmware 17.5.2 because of the kernel 6.8 issue with vmware 17.6.0. I can also reproduce it on 17.5.2.

vmwkruti1111 commented 1 week ago

Hi @konosubakonoakua ,

I tried on both workstation versions 17.5.2 and 17.6 for Ubuntu 22.04.5 LTS as well and still couldn't reproduce the isssue,

Ubuntu 22.04.5 LTS on workstation 17.5.2 on computer B (open-vm-tools 12.4.5) Ubuntu 22.04.5 LTS on workstation 17.6 on computer B (open-vm-tools 12.4.5)

copy paste worked well between guest<->host (i.e. computer B)

tried connecting the VM via RDP (clipboard enabled) from computer A (joined to same network), and still was able to copy the text from Comp A to the Guest VM (on Comp B) and vice versa. There might be some issue with your RDP App ?

konosubakonoakua commented 1 week ago

Thanks for your effort, I'll check the RDP setting, I'm using the windows default RDP app BTW.

konosubakonoakua commented 1 week ago

I believe that it's not a RDP setup issue. Because I have virtualbox worked well.

https://github.com/user-attachments/assets/acc3ddd2-d4ac-4bb8-ab3e-43dacc1c1ad8

konosubakonoakua commented 1 week ago

I have also found that the guest os ubuntu18.04 also has this issue, which means, I guess it's irrelevant to guest os. Please watch this.

https://github.com/user-attachments/assets/be92e415-308a-4392-b914-d2c4b9453f6d

Also, The clipboard works well on the host without RDP. I think there must be something wrong when the clipboard interact with both rdp & vm-tool

konosubakonoakua commented 1 week ago

open-vm-tools 11.0.5 on ubuntu18 image

open-vm-tools 12.3.5 on ubuntu22 image

How can I update the open-vm-tools from 12.3.5 to 12.4.5? Should I try this version?

konosubakonoakua commented 1 week ago

I have also tried to swap computer A and B. The vm runs on computer A previously, now it runs on computer B, and I try to copy something from A then past to vm on B. I got the same result.

konosubakonoakua commented 1 week ago

I have also tried to connect via RustDesk instead of RDP, I can't paste anything in vm (both vbox & vmware). It's a known issue: https://github.com/rustdesk/rustdesk/issues/5701

vmwkruti1111 commented 1 week ago

Well for me it worked with tools 12.3.5 too , also I don't think its tools issue as its working well on the same host and for me its working over RDP also. Also tools support copy/paste functionality on the same host<->guest , but not for Guest VM on another host there RDP clipboard should work.

https://github.com/user-attachments/assets/601b1a44-3e89-4862-8dab-3f0dd732cdc9

johnwvmw commented 1 week ago

Could this be another manifestaion of CnP and Drag-n-drop differences between using Xorg or Wayland.

Default desktop login is probably using Wayland. What is the behavior if you log out from the desktop and select a non-Wayland graphics client as you complete the password entry?

konosubakonoakua commented 6 days ago

@johnwvmw I tried to disable wayland and use X11.

# disable wayland
sudo sed -i "s/#WaylandEnable/WaylandEnable/" /etc/gdm3/custom.conf
# enable wayland
sudo sed -i "s/WaylandEnable/#WaylandEnable/" /etc/gdm3/custom.conf
![image](https://github.com/user-attachments/assets/50e204bc-6e03-4e71-b02e-5d4aa5b536d9) ![image](https://github.com/user-attachments/assets/121a1e39-09aa-4747-b930-9e22f4af8679)

Same result.