X2Go Bug report logs - #1633
New clipboard issue in Libreoffice with X2Go

Package: x2goserver; Maintainer for x2goserver is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goserver is src:x2goserver.

Reported by: Jens Reyer <jens.reyer@leberrohstoffe.com>

Date: Wed, 12 Mar 2025 10:05:01 UTC

Severity: normal

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#1633: [X2Go-Dev] Bug#1633: Bug#1633: New clipboard issue in Libreoffice with X2Go
Reply-To: Ulrich Sibiller <ulrich.sibiller@gmail.com>, 1633@bugs.x2go.org
Resent-From: Ulrich Sibiller <ulrich.sibiller@gmail.com>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Thu, 03 Apr 2025 22:20:01 +0000
Resent-Message-ID: <handler.1633.B1633.17437186751573997@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 1633
X-X2Go-PR-Package: x2goserver
X-X2Go-PR-Keywords: 
References: <CANVnVYLkcoG0nfM1j5kRJ2yYxX2TTiBcc3k6QuqYPLG7Q6FW5w@mail.gmail.com> <810710459.135614.1741783851926@195.98.208.36> <CANVnVYL+si4Dn5OypG3iBYgwD-uf-n=mgLmWbFj6eoTv47S0aA@mail.gmail.com> <CANVnVYJX1DNocs6252Vin_G-_W8+h4amJ2wFgmu0AV6A=BqVhA@mail.gmail.com> <1728065184.137568.1741862572763@195.98.208.36> <1081187274.137588.1741862691938@195.98.208.36> <CANVnVY+DBpxq8E8KrAdP75+YEsKGM-Eup9dADxyCnntwjz8uLw@mail.gmail.com> <1748520028.138240.1741874623478@195.98.208.36> <CANVnVYLD5DjxtGQpb=S_0_95eMW2=Up0z1napK6CqTBuNTTa6A@mail.gmail.com> <192506419.142362.1742212383293@195.98.208.36> <CANVnVYK=JUV9-xmZPdOcme0SEFqk+jsxLEL7WJyYJQ2Eg3qk=Q@mail.gmail.com> <999247165.134927.1741773596827@195.98.208.36> <CANVnVYLAGWS4Kc5xpv-dAGhrbUuQXU5Fs258oHP6Fxewvas3XQ@mail.gmail.com> <240682715.155126.1742900373833@195.98.208.36> <CANVnVYLWvKWX0Dg+P=sr1Khv3G7ZxFfaUEts_KRfdMnXaVOoTw@mail.gmail.com> <999247165.134927.1741773596827@195.98.208.36>
Received: via spool by 1633-submit@bugs.x2go.org id=B1633.17437186751573997
          (code B ref 1633); Thu, 03 Apr 2025 22:20:01 +0000
Received: (at 1633) by bugs.x2go.org; 3 Apr 2025 22:17:55 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_BLOCKED,
	RCVD_IN_ZEN_BLOCKED_OPENDNS,SPF_HELO_NONE,URIBL_BLOCKED,
	URIBL_DBL_BLOCKED_OPENDNS,URIBL_ZEN_BLOCKED_OPENDNS autolearn=ham
	autolearn_force=no version=3.4.4
Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id D49505DA91
	for <1633@bugs.x2go.org>; Fri,  4 Apr 2025 00:17:48 +0200 (CEST)
Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-54b166fa41bso1489863e87.0
        for <1633@bugs.x2go.org>; Thu, 03 Apr 2025 15:17:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1743718668; x=1744323468; darn=bugs.x2go.org;
        h=content-transfer-encoding:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=7JAeaTGyPmKmDUEikcgPMwXUH2v1nWNVNYR2lYzbNbk=;
        b=VFoj4GsOsEmzH/PNyg/bMj2YwYYNDMa9VKR7B6eSo4olQ+Rl3n1VizTNQEU9JupISL
         26b84Jl1wchXgc3L95XPICIrU/TGuD+pUVzMf77vlO68RvwPG8yIj9B4dyxTJeL3SqbL
         gwRDw7ocFnrJthUwhu1DwF8BPEvaOaIkg2wkZ9OBxaD1cuzyEW2UQcsmuewsiTw1HxgH
         MIAxQ/+F2uXfk65Mp2Ge1Al8bpwrh1rRU0eQ24IJtMBYsftKVL3qfm5tknqu3QLydFCX
         ejcwSy36S7TjTIx/IbEpIVCZ/mFBDK6L0HEvbmnyO2gFDjge11F0tDuoZrxy4Xos8GGo
         e0RQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1743718668; x=1744323468;
        h=content-transfer-encoding:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=7JAeaTGyPmKmDUEikcgPMwXUH2v1nWNVNYR2lYzbNbk=;
        b=COepzeuPBDvUvIBtq6u7VpSEwNlMIIXmYLp8eDljVGAuusy6tHgRemqu+fOi5UwJBm
         1NQz2gozg8x5kNuY91olZ1mIMGKny/RoZHC/Tx0k/KnOT1x8dgE7jliNyqAqyWjLZ8mK
         rgcKaKGwuA4A2IL/SAJrdd3EzB14fX0rwZAGUxYqass9ZEkNgSit/fwfaDW0wCp2HC7b
         9L44z7VrGFQkj6FtvyEarhL0F9fKpaCELzzQztRKM9xm82eX+ot+hybMJU+2GdggFQW/
         CAmUcKbnnZ5JZdyavDYWM0gPt1e7w0Nrxe+QSTEO60Ri+mofrbkqlA2E0wgK1d1WqgKW
         ZWVw==
X-Forwarded-Encrypted: i=1; AJvYcCX5XDin9OXcJeL3v/Mwkm2kxX0FsXZRD1UgMlCsBvN4ZMMDnKLKK2fsoW61/xUDoEfTNd0c@bugs.x2go.org
X-Gm-Message-State: AOJu0YyAr6idVXioX98S2M7W0CwNb2AVWSvR6igyaeZbVw15dg0XDCZA
	Wmpk1x9KuLg4JZgPEUj+Yp7FAotZcpzP+KQ2RYVMRKcq4X5KsRtJB8QfDkKgmFYwvvpqqCHeP9I
	bDPwzFsBGjCVXkgux1DiNW0YUQ5D6t0ep4TI=
X-Gm-Gg: ASbGnct1XWbKDNRL722n74mUrq+zq3F7pt14x7s02Bjv/YEIHgugwMZrhAaKOaj2QMX
	1thoTif0xSu9t/xN9qAs3TsrMmFPmtRBZXLwpt75OCnueEkotn2EtZr27k5RHLlrb/I5ZIT8VBf
	4UcV1jjuSRVsbps202YwU4bKbQNKzN0wcACMTzCQPXsBT7Rxlmbfsq0x17rQ==
X-Google-Smtp-Source: AGHT+IF8S65oLwvrxko2CTPAW0A8XqHkYx2VTcy3+k0QxmLQhEOiZoyeyvVyWbkgynDTTwa9xilEi95+hD+Nv8hG/ic=
X-Received: by 2002:a05:6512:b8d:b0:545:2efc:745d with SMTP id
 2adb3069b0e04-54c2334706cmr83561e87.46.1743718667450; Thu, 03 Apr 2025
 15:17:47 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <CANVnVYLWvKWX0Dg+P=sr1Khv3G7ZxFfaUEts_KRfdMnXaVOoTw@mail.gmail.com>
From: Ulrich Sibiller <ulrich.sibiller@gmail.com>
Date: Fri, 4 Apr 2025 00:17:19 +0200
X-Gm-Features: AQ5f1JpPWYfTiElW9becxRl6zG1hCk_FmNyBoXRmQjv-nog5ZkJRoN-X-TssqaE
Message-ID: <CANVnVYK4U9eqw59E7aYiLA-58D_aXNTJ1Fh961-OP5Nw7kbyUQ@mail.gmail.com>
To: Jens Reyer <jens.reyer@leberrohstoffe.com>, 1633@bugs.x2go.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Hi,

I have not fully understood yet what's going with your setup and will
go on with checking.

However, I see ibus-related communication which I do not see on my
setup. I have no experience with ibus or X input methods in general. I
see ibus working with selections and _maybe_ it triggers a bug in my
code that has been undetected yet. I would like to ask you to repeat
testing after disabling/uninstalling ibus. I am wondering if you
installed that on purpose or not.

Uli




On Wed, Mar 26, 2025 at 10:55 PM Ulrich Sibiller
<ulrich.sibiller@gmail.com> wrote:
>
> thanks, review will take some time....
>
> Uli
>
> On Tue, Mar 25, 2025 at 12:00 PM Jens Reyer
> <jens.reyer@leberrohstoffe.com> wrote:
> >
> > Hi
> >
> > sorry for the late reply. I made my answers inline:
> >
> >
> > Ulrich Sibiller <ulrich.sibiller@gmail.com> hat am 17. März 2025 um 21:35 geschrieben:
> >
> > Hello again,
> >
> > I had a look at the logfile. It's been a while since I worked on the
> > clipboard code. But I _think_ there are a few things you should test:
> >
> > restrict clipboard to text only: add X2GO_NXAGENT_DEFAULT_OPTIONS+="
> > -textclipboard" to /etc/x2go/x2goagent.options on the server side and
> > start a NEW session (no reconnect). Does that help?
> >
> > No, same behavior.
> >
> > But I kept this setting for all further tests.
> >
> >
> > not sure what exactly you have been doing while creating the sessionlog. But I can seen "caja" on the server side requesting clipboard.
> > Please try to run a session without caja (which is a file manager,
> > unclear what it does with selections).
> >
> > See new session.log without any caja mention, from a client with twm/xterm to a session with twm on the server. There I started xterm, then did a "libreoffice --calc /home/localadmin/test.ods" and did several ctrl+c ctrl+v in that calc document.
> >
> >
> > it _looks_ like something on the client side is requesting theclipboard when you are doing your tests. The question is what program
> > is doing that. If possible run a few programs on the client side,
> > preferably only a very simple session (fvwm twm or so) and an xterm.
> > Run x2goclient from there.
> > To find out what program on the client side is requesting the
> > clipboard you can check the server log file for lines like this:
> > nxagentHandleSelectionRequestFromXServer: Received
> > SelectionRequestEvent from real server: selection [529][CLIPBOARD]
> > target [469][TARGETS] requestor
> > [display[nx,options=/tmp/.x2go-localadmin/C-localadmin-50-1742211621_stDMATE_dp24/options:50.0]/0xe09e31]
> > destination [386][GDK_SELECTION] time [13640727]. The bold number is
> > the requestor. You can check that with xwininfo -id <number> on the
> > client.
> >
> > The bold marking went missing, so I just  tested all ids.
> >
> > From client mate to server twm I always get "No such window ...", e.g.
> >
> > me@client:~$ xwininfo -id 531
> > X Error: 9: Bad Drawable
> > Request Major code: 14
> > ResourceID in failed request: 0x213
> > Serial number of failed request: 3
> > xwininfo: error: No such window with id 0x213.
> >
> >
> > Then I tested from the twm/xterm client to a twm/xterm session on the server, see the attached Bug1633_nxagentHandleSelectionRequestFromXServer.log
> >
> >
> >
> > there's an option to include the clipboard content (or rather thedata being transferred) in the session log in DEBUG mode. This helps
> > in identifying what stage we are in. Change #undef
> > PRINT_CLIPBOARD_CONTENT_ON_DEBUG to #define and recompile
> >
> > Done, see new session.log.
> >
> >
> > while at it you could also try to change the timeout for theclipboard transfer. I hardcoded 5s when I wrote all this and it was ok
> > for me ever since. But YMMV. #define CONVERSION_TIMEOUT 5000. In your
> > log I see errors like this "nxagentConvertSelection: got new request
> > before timeout expired on previous request, notifying failure to
> > client [20] (addr [0x557c39ea2f40] PID [18630] Cmd
> > [/usr/lib/libreoffice/program/soffice.bin])". This means that the
> > previous clipboard-related communication has not finished when soffice
> > starts another request which then is denied. So this indicates that
> > some answer from the client side is still due. I suspect that this
> > answer is never sent so your diagnosis that every second paste is
> > working might in fact resemble a 5s pattern. Meaning: you can only
> > successfully paste every 5s, but not quicker. So I suggest to decrease
> > the timeout to 2s or so and see if that makes a difference for you.
> > One thing here is strange here, though: Doing a copy in soffice on the
> > server side makes soffice the clipboard owner. So while you are
> > working inside soffice there should be no communication to the client
> > that awaits any answer. Which again leads me to the suspicion that
> > there's some clipboard manager involved.
> >
> > First I tried waiting for 15 seconds after copying: this does NOT help.
> >
> > Then I recompiled with #define CONVERSION_TIMEOUT 2000, same behavior, see new session.log
> >
> >
> > x11 clipboard transfers are size restricted. That means that biggerselections are to be transferred to the requestor in multiple packets.
> > nx does not support this currently, so you are restricted to 256kB. Is
> > it possible that your selection is bigger than that?
> >
> > No, its always just a few characters.
> >
> >
> >
> > I also see SelectionClear requests from the client side. Which alsoindicates there's something dealing with clipboard on the client side.
> >
> > I still see SelectionClear in the new twm/xterm to twm/xterm session.log, but I'm not sure which side they are from.
> >
> >
> >
> > I played around with these tools:https://github.com/phillbush/xcliputils Using xclipowner -w you can
> > watch if the clipboard owner changes. Run that on the client and then
> > do clipboard stuff in libreoffice on the server. The owner as printed
> > by xclipowner should never change except for the first time. If it
> > does we have another indication of a clipboard-manager-in-the-middle
> > attack ;-)
> >
> > From client Mate to server twm a successful ctrl+c results in
> >
> > 0x03C0016A
> >
> > and a failed ctrl+c results in a
> >
> > 0x00000000
> > 0x03C0016A
> >
> >
> > From twm/xterm client to a twm/xterm session on the server both failed and successful ctrl+c results in
> >
> > 0x00E0016A
> >
> >
> > Thanks and greets
> >
> > _______________________________________________
> > x2go-dev mailing list
> > x2go-dev@lists.x2go.org
> > https://lists.x2go.org/listinfo/x2go-dev

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Apr 29 13:31:40 2025; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.