Xming clipboard only works one way

I recently started using Xming to display-back X11 applications from a Linux VM to my Win XP desktop. It's great -- much more useful than the solution I had before, which used VNC -- but the clipboard behavior is wonky.

At first, I couldn't get the clipboard to sync at all. I killed and restarted Xming a couple of times, and now it's consistent (but wrong):

  • When I copy in Windows, I can paste in Linux or Windows.
  • When I copy in Linux, I can paste in Linux but not Windows.
  • When I copy in Windows, then select in Linux, the primary (selection) and secondary (CTRL-C) buffers both work fine in Linux, but pasting in Windows doesn't work.

Note that when I say pasting in Windows "doesn't work", the Paste menu item is available, indicating Windows thinks there's something on the clipboard, but nothing gets pasted.


In X-Launch, “Clipboard – Primary Selection – Also map the PRIMARY selection to the Windows clipboard”, uncheck it.


You could try VcXsrv if you are using the public domain version of Xming (6.9.0.31).

https://sourceforge.net/projects/vcxsrv/

I've just discovered VcXsrv and in my quick test copy/paste works perfectly between Linux and Windows both ways. (Ubuntu 12.04 xterm, emacs and Windows XP)


Using the "public domain release" Release: 6.9.0.31 it turned out that turning on the -nodecoration option, allowed the clipboard from linux to be shared to windows

Using git-bash:

$ export PATH=$PATH:</path/to/Xming/>
$ Xming :0 -multiwindow -clipboard -nodecoration & 
$ ssh -Y <hostname> "gnome-terminal"

I could then highlight text inside the terminal window, and paste it around windows :)


Using VcXsrv version 1.20.8.1 (7 Apr 2020), installed via Chocolatey:

  1. right click on the XLaunch icon in the taskbar

  2. unselect Clipboard may use PRIMARY selection

enter image description here