From ulrich.sibiller@gmail.com  Tue Sep  1 16:33:04 2015
Received: (at 927) by bugs.x2go.org; 1 Sep 2015 14:33:14 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable version=3.3.2
Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 69CF75DA83;
	Tue,  1 Sep 2015 16:33:04 +0200 (CEST)
Received: by lbcjc2 with SMTP id jc2so850550lbc.0;
        Tue, 01 Sep 2015 07:33:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date:message-id
         :subject:to:cc:content-type:content-transfer-encoding;
        bh=dUHRDfLpC29gsQS/zIN2Wd79D+l+zdgGc8sO38qzqfQ=;
        b=EjdfCUxDjwjWsAyk0jI+bzAXuWmGwlRGo//sbT/dK+TxRvVuS1jfy/FstK5yD/GhQQ
         wj3bOb0cJZXknGgdsucSAcxPF7yNPn6Ek0vtu9EUakXP3G/q8OmV8Jg7fRa6q/UK2rGa
         riUe75k7sJk1iemmyZsJT5PTRWOzIZqJLeIPyF0pXcP2tCtpI/B4Tl/LDPiC0xcbrNvq
         qGtA0BlE/+zyhW5ngQOiVQ/SBIw7yDAmVDkNgHq4Bdxy+zuc24B0ABRPfqNf8eKyoriw
         2RcwG7eP0XFmD5h2reLDJYWaJ8jSswAGQRpfYkS18MktaFVQh+1YlCSzhcbI9gWD/a16
         gxeg==
X-Received: by 10.152.20.170 with SMTP id o10mr12909275lae.109.1441117983259;
 Tue, 01 Sep 2015 07:33:03 -0700 (PDT)
MIME-Version: 1.0
Sender: ulrich.sibiller@gmail.com
Received: by 10.112.138.232 with HTTP; Tue, 1 Sep 2015 07:32:43 -0700 (PDT)
In-Reply-To: <557997538.31983173.1440424349581.JavaMail.root@servicemagic.eu>
References: <1631960459.19638331.1437040276514.JavaMail.root@servicemagic.eu> <557997538.31983173.1440424349581.JavaMail.root@servicemagic.eu>
From: Ulrich Sibiller <uli42@gmx.de>
Date: Tue, 1 Sep 2015 16:32:43 +0200
X-Google-Sender-Auth: rtnPj0fiZJcHnDutYVMY-Zk23V8
Message-ID: <CANVnVYKqMqwp6peayTCmzAU5Gq_pqaoKgEb4s89tCJKnz-NSug@mail.gmail.com>
Subject: Re: [X2Go-Dev] Bug#927: copy on select overrides Windows clipboard
To: Walid MOGHRABI <w.moghrabi@servicemagic.eu>, 927@bugs.x2go.org
Cc: submit@bugs.x2go.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Aug 24, 2015 at 3:52 PM, Walid MOGHRABI
<w.moghrabi@servicemagic.eu> wrote:
> Package: x2goclient
> Version: 4.0.5.0
>
> There is a problem when using a x2go session (in both "Publisshed apps" o=
r "Desktop / MATE" mode ... didn't tried on other desktops) and trying to d=
o
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 cli=
pboard 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 Desk=
top mode (but windowed or fullscreen on 1 dedicated screen, not complete fu=
llscreen)
> 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 selec=
t, 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 c=
lipboard 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 ses=
sions are used as developpers sessions in Published Apps mode and they do p=
lenty of copy/paste all day long.
> We moved recently to this infrastructure but this doesn't help its accept=
ancy due to this bug.
>
> I tried to check the "do not use primary clipboard" in the client prefere=
nces 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=3Dvcxsrv.git;a=3Dblob;f=3Dxorg-server/hw/xwin=
/InitOutput.c;h=3D5a3d80f7fe17d2e81f634ba80d0494451653b637;hb=3D934184bfecd=
402aae891b8740d788b486aa7269f#l722) but that dosn't work either, it seems t=
hese 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

