12

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.

1
  • FWIW I now use the XWin Server bundled with Cygwin instead of Xming, and I've never had this issue since switching.
    – Coderer
    Jan 11, 2017 at 10:04

4 Answers 4

13

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

5
  • confirming that playing with the XLaunch settings worked for me too Jan 21, 2016 at 15:48
  • 1
    For me just running XMing using XLaunch made it work. Feb 17, 2016 at 13:51
  • 1
    It seems to need a newer version of Xming, not the old 6.9.0.31 version from Sourceforge which is freely available. May 16, 2016 at 0:42
  • This did not work for me Jun 15, 2020 at 17:01
  • I see, this works only in VcXsrv, not in Xming. Just install VcXsrv (see the other top answer) and then follow thiese instructions. Thanks! Jun 15, 2020 at 17:29
8

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)

1
  • I seems that VcXsrv doesn't exist in 32 bits (Windows 7 Pro).
    – phili_b
    Dec 16, 2019 at 9:54
2

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

1

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 :)

2
  • For me, adding the -nodecoration switch also fixed an issue, where the mouse pointer would be misaligned for new windows. Newly created windows are rendered offset slightly outside the screen area for me, and until I manually resize the windows, mouse inputs would be offset twice as far into the opposite direction. With -nodecoration, the windows are still placed awkwardly, but mouse input is detected at the correct position.
    – kdb
    Apr 2, 2020 at 7:10
  • Correction: It worked at first, but both issues have returned since.
    – kdb
    Apr 3, 2020 at 9:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .