Copy-and-paste doesn't work between host and client when client is running dwm window manager
I followed the instructions at https://wiki.archlinux.org/index.php/VMware/Install_Arch_Linux_as_a_guest to install open-vm-tools and other necessary tools to use Arch Linux in a VMWare Workstation VM. To enable copy-and-paste between the host and the client, I carefully followed the "Drag and drop, copy/paste" subsection.
I think that copy-and-paste should be working at this point, but it doesn't. It seems that the issue has something to do with using open-vm-tools not interfacing with dwm. I found a comment at https://qastack.ru/ubuntu/691585/copy-paste-and-dragdrop-not-working-in-vmware-machine-with-ubuntu where somebody had a similar issue; they could copy-and-paste between the host and the client when using gdm3 but could no longer do that when they switched to dwm.
Copy-and-paste does work in dwm; it just doesn't work between the host and the client running dwm.
You need to start vmware-user-suid-wrapper manually. Other window managers probably can start /etc/xdg/autostart/vmware-user.desktop automatically, but dwm does not.
I also need to restart vmtoolsd service so that other stuff like resizing window works too.
I am having the same issue. I am running arch and using sway as my tiling manager.
I think copy paste is not supported for tiling managers using wayland :( see #443
after running vmware-user-suid-wrapper, copy from host, and paste to guest works, but can not copy from guest and paste to host.
@chux0519 Does it not work for any application, for example non-terminal applications like Firefox?
If it works with Firefox, then your terminal setup is not ok. If it doesn't work with Firefox as well, then you might try restarting vmtoolsd service additionally.
@JSamir I've just tried firefox, it works. I think I will figure out how to fix my terminal setup, thank you for your reply.
By the way, I just found out, that when using my terminal emulator without tmux, it works (tested both st and alacritty), seems like a tmux related problem
It actually works after I installed firefox.. both with or without tmux, Thanks again.
after running vmware-user-suid-wrapper, if it's not working, just try reopen the terminal emulator.
You need to start
vmware-user-suid-wrappermanually. Other window managers probably can start/etc/xdg/autostart/vmware-user.desktopautomatically, but dwm does not.I also need to restart
vmtoolsdservice so that other stuff like resizing window works too.
When I run vmware-user-suid-wrapper im getting the following error:
(vmware-user:4849)): Gtk-WARNING **: : gtk_disable_setlocale() must be called before gtk_init()
Im using Manjaro i3 community edition..
My open-vm-tools versions: open-vm-tools 6:12.0.0-1
Any suggestions?
EDIT: Screen snap resolution on VMware Player works, same as shared folder. Only copy-paste and DnD are not working. :(
You need to start
vmware-user-suid-wrappermanually. Other window managers probably can start/etc/xdg/autostart/vmware-user.desktopautomatically, but dwm does not. I also need to restartvmtoolsdservice so that other stuff like resizing window works too.When I run
vmware-user-suid-wrapperim getting the following error:(vmware-user:4849)): Gtk-WARNING **: : gtk_disable_setlocale() must be called before gtk_init()Im using Manjaro i3 community edition.. My
open-vm-toolsversions:open-vm-tools 6:12.0.0-1Any suggestions? EDIT: Screen snap resolution on VMware Player works, same as shared folder. Only copy-paste and DnD are not working. :(try add: "exec --no-startup-id vmware-user-suid-wrapper" to your i3 config file and restart i3. ignore the Gtk-WARNING
doesn't work for me :(
You need to start
vmware-user-suid-wrappermanually. Other window managers probably can start/etc/xdg/autostart/vmware-user.desktopautomatically, but dwm does not. I also need to restartvmtoolsdservice so that other stuff like resizing window works too.When I run
vmware-user-suid-wrapperim getting the following error:(vmware-user:4849)): Gtk-WARNING **: : gtk_disable_setlocale() must be called before gtk_init()Im using Manjaro i3 community edition.. My
open-vm-toolsversions:open-vm-tools 6:12.0.0-1Any suggestions? EDIT: Screen snap resolution on VMware Player works, same as shared folder. Only copy-paste and DnD are not working. :(try add: "exec --no-startup-id vmware-user-suid-wrapper" to your i3 config file and restart i3. ignore the Gtk-WARNING
doesn't work for me :(
I did with 'sudo' it worked Guys seriously You should put a for-while loop or something to fix this at first start I remember exactly same problem 5 years ago!
Just chiming in as I've looked into issue related to KDE Plasma. You want several services configured, with systemd and ArchLinux, the open-vm-tools package provides two of these.
-
The
vmtoolsd.servicehowever is a bit flakey in it's current state.The kernel module
vmwgfxneeds to be loaded, if it's not it will attempt to do so but seems to be a race condition somewhere which can break window resizing. Other distros seem to start that equivalent service earlier than thedisplay-manager.service, either way the service status will appear to be fine without any obvious logs indicating an issue.You can find
systemctl restart vmtoolsd.servicehowever restores the functionality for window resizing updating the guest display resolution. If that works for you, loading the kernel modulevmwgfxearlier should do the trick :+1: (see this comment for troubleshooting that) -
/etc/xdg/autostart/vmware-user.desktopis the relevant part for getting copy/paste and DnD functionality (for X11 at least, apparently works on Wayland for Gnome too). If your distro is not running this at startup, then you may need to create your own systemd unit or equivalent for it.However there appears to be a race condition, at least when using
systemd-xdg-autostart-generator(or equivalent custom service to the generated one) on KDE Plasma. I detailed some solutions to try here and have a PR open to try progress an improvement.
Sadly this information isn't documented that well or easily discoverable, and the project maintainers seem to be against including example init files (or even just the common systemd service files) favoring each distro packager to suss it out on their end which varies in reliability.