Subject: Bug#927: [X2Go-Dev] Bug#927: copy on select overrides Windows clipboard

From: Ulrich Sibiller <[email-masked]>
Date: Tue, 1 Sep 2015 16:32:43 +0200

On Mon, Aug 24, 2015 at 3:52 PM, Walid MOGHRABI
<[email-masked]> wrote:
> Package: x2goclient
> Version: 4.0.5.0
>
> There is a problem when using a x2go session (in both "Publisshed apps" or "Desktop / MATE" mode ... didn't tried on other desktops) and trying to do
bidirectional copy/paste from a Windows client (Windows 7 SP1 /
x2goclient 4.0.5.0).
> It seems that the "copy on select" features is overriding the primary clipboard which makes the copy/paste pretty difficult if not impossible.
>
> How to reproduce :
>
> Local : Windows 7 SP1 / x2goclient 4.0.5.0 in Published Apps ou MATE Desktop mode (but windowed or fullscreen on 1 dedicated screen, not complete fullscreen)
> Remote : Ubuntu 14.04 / MATE Desktop with x2goserver 4.0.5.0 and x2gomate-bindings
>
> From Windows, copy some text in Notepad then, on your x2go session (let's say with Pluma or Gedit), select some text you want to replace (just select, not copy) and try to do a paste, that won't work and your clipboard now contains the text that has been selected in the x2go session.

Just to be sure: What exactly do you refer to as clipboard here? In
X11 we have PRIMARY and CLIPBOARD, in Windows we have only one
Clipboard.

> You can even paste it in Windows (but strangely, not in Linux where the clipboard seems empty).

How do you paste in Linux? Middle mouse button or selecting "Paste"
from some menu?

> This is very very annoying especially for our use case where our x2go sessions are used as developpers sessions in Published Apps mode and they do plenty of copy/paste all day long.
> We moved recently to this infrastructure but this doesn't help its acceptancy due to this bug.
>
> I tried to check the "do not use primary clipboard" in the client preferences but this makes the xserver fails to start (see bug #906), I even tried to add the -noprimary or the -noclipboardprimary that are described here (http://code.x2go.org/vcxsrv?p=vcxsrv.git;a=blob;f=xorg-server/hw/xwin/InitOutput.c;h=5a3d80f7fe17d2e81f634ba80d0494451653b637;hb=934184bfecd402aae891b8740d788b486aa7269f#l722) but that dosn't work either, it seems these options are in the usage help message but are not supported at all so I don't know if using them is helping or not.

I have changed/fixed the clipboard code in NX  some months ago. Does
downgrading to nx-libs 3.5.0.27 change the behaviour? Maybe I broke
something...

Also, do you have any clipboard manager running in the MATE session?

And it would help to know if this happens for other desktops, too.

Uli