Subject: Bug#927: copy on select overrides Windows clipboard

From: Walid MOGHRABI <[email-masked]>
Date: Mon, 24 Aug 2015 15:52:29 +0200 (CEST)

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.
You can even paste it in Windows (but strangely, not in Linux where the clipboard seems empty).

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.

Best regards,

Walid Moghrabi
	
---
DISCLAIMER: This e-mail is private and confidential and may contain proprietary or legally privileged information. It is for the intended recipient only. If you have received this email in error, please notify the author by replying to it and then destroy it. If you are not the intended recipient you must not use, disclose, distribute, copy, print or rely on this e-mail or any attachment. Thank you

---

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).
> 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 wo…

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?

> 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…

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

---

From: Walid MOGHRABI <[email-masked]>
Date: Fri, 4 Sep 2015 12:12:47 +0200 (CEST)

> 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. 
> How do you paste in Linux? Middle mouse button or selecting "Paste" from some menu?

All of them.
In Windows there is only one clipboard and Linux, there is the PRIMARY and CLIPBOARD, that's right but the problem here is :
* copy something from your local Windows computer (ctrl+c in notepad for example)
* in your remote MATE x2go session, in Pluima or Gedit for example, *select* part of a text and do a "paste" action (with ctrl+v or the paste action in the edit menu, *not middle mouse click*).
* at that moment, nothing happen where you would expect the selected text to be replaced by the copied text in Windows.

Note that if I do the same use case from a linux local desktop to a remote linux x2go session, it works as expected (the text is replaced), it's only in doing the same with Windows that it is not working.

> 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... 

I don't know how to downgrade to this release, I'm using the x2go stable PPA for the server side (it's running on ubuntu server 14.04 lts amd64 + MATE 1.8 as the desktop) and Windows 7 SP1 as the client running 4.0.5.0.

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

at first, none then I installed ClipIt just to see what was happening and disable copy on select but it did nothing, the beahviour was identical.
In the clipboard manager's history, I can see my copied text from Windows but as soon as I select some text from within my linux x2go session, I can't paste it.
ctrl+v does nothing, paste menu does nothing and even middle click does nothing as if both clipboards where flushed.
As soon as I do another ctrl+v or another selection in the remote x2go session, I can paste what has been selected/copied.

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

I only tested it on x2go/MATE in Desktop mode or Published Apps mode. Both ways gives same results.

Walid

----- Mail original ----- 

De: "Ulrich Sibiller" <[email-masked]> 
À: "Walid MOGHRABI" <[email-masked]>, [email-masked] 
Cc: [email-masked] 
Envoyé: Mardi 1 Septembre 2015 16:32:43 
Objet: Re: [X2Go-Dev] Bug#927: copy on select overrides Windows clipboard 

Uli
---

---

From: Walid MOGHRABI <[email-masked]>
Date: Wed, 9 Dec 2015 17:43:44 +0100 (CET)

Hi, 

A little "up" on this bug ... this is very very annoying for us and generate angryness against x2go which is unfair because this solution gives us so much more value added feature than before but every users are focusing on this one bug because it affect their work all day long. 
We're willing to push that as much as we can and we're ready to help as much as we can also. 
We are ready to pay if necessary to put that bugfix on top of the list so please, tell me if this bug is going to be fixed soon :( 

Best regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

De: "Walid MOGHRABI" <[email-masked]> 
À: "Ulrich Sibiller" <[email-masked]> 
Cc: [email-masked], [email-masked] 
Envoyé: Vendredi 4 Septembre 2015 12:12:47 
Objet: Re: [X2Go-Dev] Bug#927: copy on select overrides Windows clipboard 

All of them. 

Walid 

----- Mail original ----- 

Uli 

---

---

From: Ulrich Sibiller <[email-masked]>
Date: Wed, 9 Dec 2015 21:58:44 +0100

> We are ready to pay if necessary to put that bugfix on top of the list so please, tell me if this bug is going to be fixed soon :(

I cannot tell. Development is quite slow at the moment. As I am not a
core developer I do not know why that is. And I am low on time, too.

However, you can try to enable or disable the XFIXES extension (I am
not sure what the default is nowadays). Here's how you can do that:

Add to /etc/x2go/x2goagent.options

X2GO_NXAGENT_DEFAULT_OPTIONS+=" +extension XFIXES"

to enable the extension or

X2GO_NXAGENT_DEFAULT_OPTIONS+=" -extension XFIXES"

to disable the extension.

Using xdpyinfo | grep XFIXES within the session you can check if it is
enabled or not.

Uli

---

From: Walid MOGHRABI <[email-masked]>
Date: Fri, 11 Dec 2015 11:27:25 +0100 (CET)

Hi, 

> to disable the extension. 

I enabled XFIXES since it was disabled as default but that didn't changed anything. 
I'm pretty sure this is a bug in vcxsrv as this doesn't occure when doing copy/paste from local Linux to remote Linux, this only occure from local Windows to remote Linux. 

It is very easy to reproduce. 

I hope the vcxsrv maintainer reads this list, if so, please, contact me. 

Regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

De: "Ulrich Sibiller" <[email-masked]> 
À: "Walid MOGHRABI" <[email-masked]>, [email-masked] 
Envoyé: Mercredi 9 Décembre 2015 21:58:44 
Objet: Re: [X2Go-Dev] Bug#927: Bug#927: copy on select overrides Windows clipboard 

Uli 

---

---

From: Mike DePaulo <[email-masked]>
Date: Fri, 11 Dec 2015 08:33:57 -0500

As the primary maintainer of X2Go Client for Windows and of X2Go's custom
builds of VcXsrv, I have taken note of this issue and #906 .

Investigating and fixing them are on my (busy) agenda. I cannot guarantee
an ETA though.

---

From: Walid MOGHRABI <[email-masked]>
Date: Fri, 11 Dec 2015 15:39:55 +0100 (CET)

Thanks so much for that ! 

As I already said, do not hesitate to get back to me for any information or testing you'll need. 

Best regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

De: "Mike DePaulo" <[email-masked]> 
À: "Walid MOGHRABI" <[email-masked]>, [email-masked] 
Envoyé: Vendredi 11 Décembre 2015 14:33:57 
Objet: Re: [X2Go-Dev] Bug#927: Bug#927: Bug#927: copy on select overrides Windows clipboard 

As the primary maintainer of X2Go Client for Windows and of X2Go's custom builds of VcXsrv, I have taken note of this issue and #906 . 

Investigating and fixing them are on my (busy) agenda. I cannot guarantee an ETA though. 

---

---

From: Walid MOGHRABI <[email-masked]>
Date: Thu, 14 Jan 2016 12:00:30 +0100 (CET)

Hi, 

Any news on that side ? 
Any chance to see a fix for this soon ? 

Regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

---

---

From: Mike DePaulo <[email-masked]>
Date: Fri, 15 Jan 2016 08:50:00 -0500

I plan to at least investigate it within the next few weeks.

-Mike

On Thu, Jan 14, 2016 at 6:00 AM, Walid MOGHRABI <[email-masked]>
wrote:

> Walid MOGHRABI Exploitation / Operation Id SKYPE : walid_smagic
>
[...[

---

From: Walid MOGHRABI <[email-masked]>
Date: Tue, 23 Feb 2016 14:14:38 +0100 (CET)

Hi, 

I'm not willing to put too much pressure about this but this is really annoying for our dev team and to be honest, they are the ones pushing pressure on me with this. 
Any idea on when you will be able to take a look at this issue ? 
May I help in any way ? 

Regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

De: "Mike DePaulo" <[email-masked]> 
À: "Walid MOGHRABI" <[email-masked]> 
Cc: [email-masked] 
Envoyé: Vendredi 15 Janvier 2016 14:50:00 
Objet: Re: [X2Go-Dev] Bug#927: copy on select overrides Windows clipboard 

-Mike 

On Thu, Jan 14, 2016 at 6:00 AM, Walid MOGHRABI < [email-masked] > wrote: 

Hi, 

Any news on that side ? 

Regards, 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

[...[ 

---

---

From: Mike Gabriel <[email-masked]>
Date: Tue, 23 Feb 2016 21:03:51 +0000

HI,

please use the professional support provided by BAUR-ITCS UG or phoca  
GmbH if you want to see bugs addressed quickly.

Contacts:

   [email-masked]
   [email-masked]

Greets,
Mike

On  Di 23 Feb 2016 14:14:38 CET, Walid MOGHRABI wrote:

> Hi,
>
>
> I'm not willing to put too much pressure about this but this is  
> really annoying for our dev team and to be honest, they are the ones  
> pushing pressure on me with this.
> DISCLAIMER: This e-mail is private and confidential and may contain  
> proprietary or legally privileged information. It is for the  
> intended recipient only. If you have received this email in error,  
> please notify the author by replying to it and then destroy it. If  
> you are not the intended recipient you must not use, disclose,  
> distribute, copy, print or rely on this e-mail or any attachment.  
> Thank you

-- 

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/mailxchange/kronolith/fb.php?u=m.gabriel%40das-netzwerkteam.de

---

From: Walid MOGHRABI <[email-masked]>
Date: Wed, 24 Feb 2016 10:09:08 +0100 (CET)

Hi, 

I'm sorry to annoy but yes, I'd like this issue to be fixed as quick as possible because I have about 30 developers counting on it and as I always said, we would be ready to pay for that if it could help making thing going a little faster but until now, I had no answer concerning paid support. 
I'll contact thos people ... which one is preferable to contact ? 

Regards. 

	Walid MOGHRABI 
	Exploitation / Operation 
	Id SKYPE : walid_smagic 

----- Mail original -----

De: "Mike Gabriel" <[email-masked]> 
À: "Walid MOGHRABI" <[email-masked]>, [email-masked] 
Cc: "Mike DePaulo" <[email-masked]> 
Envoyé: Mardi 23 Février 2016 22:03:51 
Objet: Re: [X2Go-Dev] Bug#927: Bug#927: copy on select overrides Windows clipboard 

HI, 

Contacts: 

Greets, 
Mike 

-- 

DAS-NETZWERKTEAM 

GnuPG Key ID 0x25771B31 

freeBusy: 

---