From unknown Tue May 19 04:38:08 2026
X-Loop: owner@bugs.x2go.org
Subject: Bug#872: [X2Go-Dev] Turn xinerama.conf file related code inside X2Go Client into legacy code (for NX agents << 3.6)
Reply-To: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>, 872@bugs.x2go.org
Resent-From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Mon, 18 May 2015 08:45:01 +0000
Resent-Message-ID: <handler.872.B872.143193845916483@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 872
X-X2Go-PR-Package: x2goclient
X-X2Go-PR-Keywords: 
Received: via spool by 872-submit@bugs.x2go.org id=B872.143193845916483
          (code B ref 872); Mon, 18 May 2015 08:45:01 +0000
Received: (at 872) by bugs.x2go.org; 18 May 2015 08:40:59 +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,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from freya.das-netzwerkteam.de (freya.das-netzwerkteam.de [88.198.48.199])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id EF3715DA83
	for <872@bugs.x2go.org>; Mon, 18 May 2015 10:40:56 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (grimnir.das-netzwerkteam.de [78.46.204.98])
	by freya.das-netzwerkteam.de (Postfix) with ESMTPS id 9AEA01C43;
	Mon, 18 May 2015 10:40:56 +0200 (CEST)
Received: from localhost (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTP id 530DD3BAC0;
	Mon, 18 May 2015 10:40:56 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at grimnir.das-netzwerkteam.de
Received: from grimnir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (grimnir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id C4vshZtVnghp; Mon, 18 May 2015 10:40:56 +0200 (CEST)
Received: from grimnir.das-netzwerkteam.de (localhost [127.0.0.1])
	by grimnir.das-netzwerkteam.de (Postfix) with ESMTPS id A463D3BA55;
	Mon, 18 May 2015 10:40:55 +0200 (CEST)
Received: from bifrost.das-netzwerkteam.de (bifrost.das-netzwerkteam.de
 [178.62.101.154]) by mail.das-netzwerkteam.de (Horde Framework) with HTTP;
 Mon, 18 May 2015 08:40:55 +0000
Date: Mon, 18 May 2015 08:40:55 +0000
Message-ID: <20150518084055.Horde.mlraxHD7gXZTq0IPaU98Eg1@mail.das-netzwerkteam.de>
From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>
Cc: 872@bugs.x2go.org
References: <20150515115912.Horde.GtfqM24QvRXo7Sd2CZWsHw1@mail.das-netzwerkteam.de>
 <55583925.1040206@phoca-gmbh.de>
In-Reply-To: <55583925.1040206@phoca-gmbh.de>
User-Agent: Internet Messaging Program (IMP) H5 (6.2.2)
Accept-Language: de,en
Organization: DAS-NETZWERKTEAM
X-Originating-IP: 178.62.101.154
X-Remote-Browser: Mozilla/5.0 (X11; Linux x86_64; rv:32.0) Gecko/20100101
 Firefox/32.0 Iceweasel/32.0
Content-Type: multipart/signed; boundary="=_L2mscL0TGkmxNXEvOYDvAw4";
 protocol="application/pgp-signature"; micalg=pgp-sha1
MIME-Version: 1.0

This message is in MIME format and has been PGP signed.

--=_L2mscL0TGkmxNXEvOYDvAw4
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; DelSp=Yes
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi Alex,
(re-adding #872 to Cc:, dropping x2go-dev instead)

(my answers in-line at end of mail text)

On  So 17 Mai 2015 08:45:57 CEST, Oleksandr Shneyder wrote:

> Am 15.05.2015 um 13:59 schrieb Mike Gabriel:
>> Package: x2goclient
>> Severity: important
>> Version: 4.0.4.0
>>
>> Hi Uli, hi Alex,
>>
>> I turn this discussion into a bug report against X2Go Client.
>>
>> Short summary for Alex: Ulrich has completely revisited [2] Xinerama in
>> nx-libs recently for the 3.6.x branch of nx-libs [1].
>>
>> The complete Xinerama code has been rewritten and moved mainly into the
>> hw/nxagent/Screen.c file, so that we can soon drop your patched
>> libNX_Xinerama.so library and all that LD_LIBRARY_PATH stuff from
>> x2goruncommand.
>>
>> With Ulrichs work, the hacky part in X2Go Client of writing and
>> continuously updating a xinerama.conf file server-side from the
>> client-side becomes obsolete and should only be kepts as legacy code for
>> cases where X2Go Client talks to nxagent servers << 3.6.
>>
>> I'd also appreciate it if you could give feedback on the below question.
>>
>> Thanks,
>> Mike
>>
>> [1] https://github.com/ArcticaProject/nx-libs
>> [2] https://github.com/ArcticaProject/nx-libs/pull/23
>>
>> On  Do 14 Mai 2015 23:32:03 CEST, Ulrich Sibiller wrote:
>>
>>> while testing my xinerama re-implementation I noticed that x2goclient
>>> reports a wrong width sometimes when simply moving the window without
>>> changing the size. The reported size differs by one pixel  (too much
>>> or too little). When running x2goclient --debug you can see this:
>>>
>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:
>>> 329, y: 214, w: 1440, h: 900"
>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:
>>> 365, y: 213, w: 1440, h: 900"
>>> x2go-DEBUG-../src/onmainwindow.cpp:10160> "New proxy geometry: (x:
>>> 825, y: 190, w: 1440, h: 900"
>>> x2go-DEBUG-../src/sshprocess.cpp:189> executing remote command via
>>> SshProcess object (24): "export DISPLAY=3D:50;printf '\''1095 0 345
>>> 900\n0 0 1095 900'\'' >
>>> $HOME/.x2go/C-uli-50-1431636769_stDKDE_dp24/xinerama.conf"
>>>
>>> -> here the 345 should have been a 344.
>>>
>>> Interestingly my patched x2goagent (that completely ignores
>>> xinerama.conf) sees that value. So I conclude that x2goclient is
>>> manipulating the nxproxy window size by one pixel itself. Disabling
>>> xinerama in the session's configuration fixes the problem.
>>>
>>> That off-by-one behaviour is caused by this code in onmainwindow.cpp:
>>>
>>> void ONMainWindow::slotXineramaConfigured()
>>> {
>>>     if (resumingSession.fullscreen)
>>>         return;
>>>     if (xinSizeInc =3D=3D -1)
>>>         xinSizeInc=3D1;
>>>     else
>>>         xinSizeInc=3D-1;
>>> #ifdef Q_OS_LINUX
>>>     lastDisplayGeometry.setWidth(lastDisplayGeometry.width()+xinSizeInc=
);
>>>     XSync(QX11Info::display(),false);
>>>     XResizeWindow(QX11Info::display(), proxyWinId,
>>>
>>> lastDisplayGeometry.width(),lastDisplayGeometry.height());
>>>     XSync(QX11Info::display(),false);
>>> #endif
>>> #ifdef Q_OS_WIN
>>>     QRect geom;
>>>     wapiWindowRect ( (HWND) proxyWinId, geom );
>>>     wapiMoveWindow( (HWND) proxyWinId, geom.x(), geom.y(),
>>> geom.width()+xinSizeInc, geom.height(),true);
>>>     lastDisplayGeometry=3DproxyWinGeometry();
>>> #endif
>>>     xineramaTimer->start(500);
>>> }
>>>
>>> If I set xinSizeInc to zero in all cases the off-by-one behaviour is
>>> completely gone. Why does xinSizeInc exist at all?

> It's a great news. Do we need to make a changes in the X2Go Client for

X2Go Client needs to test the remote x2goagent version and check=20=20
whether=20it is << 3.5.99.0 or >=3D 3.5.99.0. If it is >=3D 3.5.99.0, the=
=20=20
new=20Xinerama support will be present (once we have released 3.5.99.0,=20=
=20
at=20the moment the code has not been merged). If the new Xinerama code=20=
=20
is=20present, then there is no need for the xinerama.conf server-side=20=20
writing/updating=20anymore.

> this? I think it should be sufficient to make changes in x2goruncommand.

I think that too, see X2GoBTS #873 [1].

> Should user still have possibility to turn Xinerama off? I can still

This is a good question. I don't think that we should include the=20=20
xinerama.conf=20part in nxagent anymore, but a way for switching off the=20=
=20
Xinerama=20extension should be possible, indeed.

The current plan is to make the cmdline options +xinerama / -xinerama=20=20
(or=20-extension Xinerama) functional in nxagent. With all previous=20=20
versions=20of nxagent, this did not have any effect, so far. Ulrich is=20=
=20
working=20on that.

> imagine the use case when user have an x2goagent window in the middle of
> two physical monitors but want to see agent window as one display.

Indeed.

> regards
> Alex

Mike

[1] https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=3D873
--=20

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

GnuPG Key ID 0x25771B31
mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.x=
fb

--=_L2mscL0TGkmxNXEvOYDvAw4
Content-Type: application/pgp-signature
Content-Description: Digitale PGP-Signatur
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAABAgAGBQJVWaWXAAoJEJr0azAldxsxXswP+wcQhizIFxioBxnkzHGngV9f
TqCCyb/KvUhlQZ+/sLpbtWB1hHe01Q1RWKJmDnZiFMVcRcdREoXz/agOWfeLLob/
Qepd8cNZ6CXRJh1Oc0Fl1ztlMGvhgonNoBNG4JZaKLZwp1H0IX6IDqYY/oQQh/gJ
HoIqyaNXBvbNyeVGrwqpfqoz24zxXKniPO3XfDjo1bUgduMaqPiYtFRSB2LO2HcL
BE/ZAPraRYxz4nnAAi0dsxaRm4cJGnaVmdrDNZnNhyv5FGub2lyTpQqoRey7TaZV
k0F25C2YQvO4AXoxMIgzQvji6fcdm5e8G4iNxt5dFth/p5IzTs7HkhdSDsMit6fw
PeS7r09W8EuEE3d+XjICckZOcFfs2QiXFBdDh8m7cCiWOq9hFWJN/AdZtRlrhnYg
9MrzL+TxomDzHhTV0ibH7/TnDHBJEgIhss234tbEMJ1/LAFS3uWwbObtksGSrLxs
K+er5tzMUKHjeR69Mq+5e+8kVBi69km0MtwEOvV2hWLPuaJ1KHkA6oyoXM+5wt5T
8lTNJJMYbw1Xyf2QHm05u5w4CifWHW3XaBMeSHihlcje0OKyw8W35MBlph06KaW7
GTkjJhkAKAVNro2012AgAWOmU8P/j3z/xivY/7wlLUUgZl2xGGZLy/3der6FlG/E
nveHPBHjc2w6i2m0CSk6
=Ap/G
-----END PGP SIGNATURE-----

--=_L2mscL0TGkmxNXEvOYDvAw4--
