Subject: Clipboard broken

From: Stefan Baur <[email-masked]>
Date: Wed, 30 Sep 2015 00:55:08 +0200

package: x2goclient
version: 4.0.5.0
severity: important

The clipboard is broken on X2GoClient for Windows.
Even though the client is set to allow clipboard sharing in both
directions, neither direction works.

Severity set to important, as it seriously impacts a key functionality.

- -Stefan

- -- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 30 Sep 2015 12:31:55 +0000

HI Stefan,

> Severity set to important, as it seriously impacts a key functionality.

Please check /etc/x2go/x2goagent.options and check if clipboard is  
disabled there.

Please check with VcXsrv as shipped with X2Go Client and a PuTTY +  
X11-forwarding session, if copy+paste works for you via such a remote  
X11 session.

Mike
-- 

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/freebusy/m.gabriel%40das-netzwerkteam.de.xfb

---

From: Stefan Baur <[email-masked]>
Date: Wed, 30 Sep 2015 15:01:44 +0200

Am 30.09.2015 um 14:31 schrieb Mike Gabriel:
>> package: x2goclient version: 4.0.5.0 severity: important
>> 
>> The clipboard is broken on X2GoClient for Windows. Even though
>> the client is set to allow clipboard sharing in both directions,
>> neither direction works.
>> 

I've seen this on several servers, haven't checked all of them yet,
but the last one clearly says:

# Enforce clipboard behaviour in X2Go sessions globally (for all
connecting clients)
# Possible values for the -clipboard option: both, server, client, none
# If this option stays commented out, clients can choose the sessions'
clipboard behaviour...
#X2GO_NXAGENT_DEFAULT_OPTIONS+=" -clipboard both"

so it's in its default state, I guess.
Also, I never consciously disabled that feature on any of those servers.

> X11-forwarding session, if copy+paste works for you via such a
> remote X11 session.

Will check that later.

Funny:
I just tried 4.0.3.2, where it seems to work fine, then I switched to
4.0.5.0 and - it worked there, too.  But it hasn't been working all
day yesterday with 4.0.5.0, on the same machine.
So maybe something isn't initialized properly, and when firing up the
old client first, it happens and remains that way?

Will investigate further.

- -Stefan

- --

---

From: Mike Gabriel <[email-masked]>
Date: Wed, 30 Sep 2015 13:26:09 +0000

> old client first, it happens and remains that way?

When hacking PyHoca-GUI on Windows, I saw stray VcXsrv instance  
remaining as a running (and functional) process, although the  
PyHoca-GUI application had already been quit.

Are you sure, that VcXsrv properly terminated after uninstalling the  
old X2Go Client version? Or did the new X2Go Client possibly use  
VcXsrv shipped with the old client.

Also, the X11 settings are stored in the Windows registry (HKCU IIRC).  
The cmdline options for launching VcXsrv are stored there, as well.

When testing different client versions regarding VcXsrv, make sure to  
purge X2Go Client's registry settings.

Mike
-- 

DAS-NETZWERKTEAM

GnuPG Key ID 0x25771B31

freeBusy:

---

From: Stefan Baur <[email-masked]>
Date: Thu, 1 Oct 2015 14:01:36 +0200

Am 30.09.2015 um 15:26 schrieb Mike Gabriel:
>> So maybe something isn't initialized properly, and when firing up
>> the old client first, it happens and remains that way?
> 

This is unlikely to happen with X2GoClient.exe, as Alex added a
"reaper" tool that terminates all X2GoClient.exe-spawned tasks when
X2GoClient.exe exits.

> Are you sure, that VcXsrv properly terminated after uninstalling
> the old X2Go Client version? Or did the new X2Go Client possibly
> use VcXsrv shipped with the old client.

In that particular case, there is no "installation", both versions
reside in different directories, side by side, after I unzipped them
manually.
It is unlikely that the newer one would run the X server from a
totally different directory.

> Also, the X11 settings are stored in the Windows registry (HKCU
> IIRC). The cmdline options for launching VcXsrv are stored there,
> as well.

> When testing different client versions regarding VcXsrv, make sure
> to purge X2Go Client's registry settings.

I will try running X2GoClient.exe in portable mode for my further
tests, to avoid that.

Also, it might depend on the sequence of copy/paste events.
The time I noticed that it wasn't working, the first attempt was
copying from the client and pasting to the server.
The time it worked, after going back and forth between versions, the
first copy was made on the server and the first paste on the client.

Again, I'll try to do some more experiments and will report back.

- -Stefan
- --

---

From: Ulrich Sibiller <[email-masked]>
Date: Sun, 21 Aug 2016 00:27:14 +0200

This seems to help although I am unsure about the effects this might
have on other sessions:

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 1771d4c..c0d9c33 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1583,6 +1583,7 @@ int nxagentInitClipboard(WindowPtr pWin)
     nxagentXFixesInfo.Initialized = 1;
   }

+#ifdef BREAK_FIRST_PASTE_FROM_WINDOWS
   if (nxagentSessionId[0])
   {
     #ifdef TEST
@@ -1595,6 +1596,7 @@ int nxagentInitClipboard(WindowPtr pWin)
     pWin -> eventMask |= PropertyChangeMask;
     nxagentChangeWindowAttributes(pWin, CWEventMask);
   }
+#endif

   if (nxagentReconnectTrap)
   {

On Thu, Oct 1, 2015 at 2:01 PM, Stefan Baur <[email-masked]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQEcBAEBCAAGBQJWDSCgAAoJEG7d9BjNvlEZ/cgH/R9XgAsHjVxqQb06/kv0tln1
> ZMu+9Bf7vveWMpZtAJ2OcOAL57kO8keBYFUh7VUZUMhNQNfaI5WgkhR+ed4tAYMO
> RhImSCSZDuVjCeM5YYapesBXRvV8RhHqwL+yLI0KKQRngQoJ9SFITlYxGedzg/mJ
> iIKq7/8ekyd5ggRBtmZo9GqXSjCqvm3fOaGIfoiZDz5qBXlnHhAoDNwI8xEWvrEo
> wyYX/TNZOHlTnD197m6Dtklo6nyPEquShgw/ti0rz1lBbvzTQ+D3hOK9ZS9sGO3r
> 0bwWogMFVPwT1qAf8F9tnvswkF+6Evkcv/x22RZPoSbDXKxLWK9rd2lKfv+6KSo=
> =BFiK
> -----END PGP SIGNATURE-----
> _______________________________________________
> x2go-dev mailing list
> [email-masked]
> http://lists.x2go.org/listinfo/x2go-dev