From unknown Fri Mar 29 10:01:30 2024 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: Oleksandr Shneyder , 872@bugs.x2go.org Resent-From: Oleksandr Shneyder Resent-To: x2go-dev@lists.x2go.org Resent-CC: X2Go Developers X-Loop: owner@bugs.x2go.org Resent-Date: Mon, 18 May 2015 09:45:02 +0000 Resent-Message-ID: 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.143194225423588 (code B ref 872); Mon, 18 May 2015 09:45:02 +0000 Received: (at 872) by bugs.x2go.org; 18 May 2015 09:44: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,URIBL_BLOCKED autolearn=ham version=3.3.2 X-Greylist: delayed 1252 seconds by postgrey-1.34 at ymir.das-netzwerkteam.de; Mon, 18 May 2015 11:44:12 CEST Received: from mail.cowic.de (mx1.cowic.de [80.190.97.241]) by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 0E9F25DA83 for <872@bugs.x2go.org>; Mon, 18 May 2015 11:44:11 +0200 (CEST) Received: from [192.168.0.108] (unknown [95.90.221.251]) by mail.cowic.de (Postfix) with ESMTP id 8A9833807BBA; Mon, 18 May 2015 11:23:19 +0200 (CEST) Message-ID: <5559AF7A.9070803@phoca-gmbh.de> Date: Mon, 18 May 2015 11:23:06 +0200 From: Oleksandr Shneyder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 MIME-Version: 1.0 To: Mike Gabriel CC: 872@bugs.x2go.org References: <20150515115912.Horde.GtfqM24QvRXo7Sd2CZWsHw1@mail.das-netzwerkteam.de> <55583925.1040206@phoca-gmbh.de> <20150518084055.Horde.mlraxHD7gXZTq0IPaU98Eg1@mail.das-netzwerkteam.de> In-Reply-To: <20150518084055.Horde.mlraxHD7gXZTq0IPaU98Eg1@mail.das-netzwerkteam.de> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JuxSw2btcb50hLL1G1XR1hA1smfUsPdKg" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --JuxSw2btcb50hLL1G1XR1hA1smfUsPdKg Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable ok, let's wait till this feature is available in nxagent and I'll put support for it in x2go client. regards, Alex Am 18.05.2015 um 10:40 schrieb Mike Gabriel: > Hi Alex, > (re-adding #872 to Cc:, dropping x2go-dev instead) >=20 > (my answers in-line at end of mail text) >=20 > On So 17 Mai 2015 08:45:57 CEST, Oleksandr Shneyder wrote: >=20 >> 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 t= he >>> 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 questi= on. >>> >>> 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 x2goclien= t >>>> reports a wrong width sometimes when simply moving the window withou= t >>>> 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 >>>> =20 >>>> 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? >=20 >> It's a great news. Do we need to make a changes in the X2Go Client for= >=20 > X2Go Client needs to test the remote x2goagent version and check whethe= r > it is << 3.5.99.0 or >=3D 3.5.99.0. If it is >=3D 3.5.99.0, the new Xin= erama > support will be present (once we have released 3.5.99.0, at the moment > the code has not been merged). If the new Xinerama code is present, the= n > there is no need for the xinerama.conf server-side writing/updating > anymore. >=20 >> this? I think it should be sufficient to make changes in x2goruncomman= d. >=20 > I think that too, see X2GoBTS #873 [1]. >=20 >> Should user still have possibility to turn Xinerama off? I can still >=20 > This is a good question. I don't think that we should include the > xinerama.conf part in nxagent anymore, but a way for switching off the > Xinerama extension should be possible, indeed. >=20 > The current plan is to make the cmdline options +xinerama / -xinerama > (or -extension Xinerama) functional in nxagent. With all previous > versions of nxagent, this did not have any effect, so far. Ulrich is > working on that. >=20 >> 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. >=20 > Indeed. >=20 >> regards >> Alex >=20 > Mike >=20 > [1] https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=3D873 --=20 ----------------------------------------------------------- Oleksandr Shneyder | Email: o.shneyder@phoca-gmbh.de phoca GmbH | Tel. : 0911 - 14870374 0 Ludwig-Feuerbach-str. 18 | Fax. : 0911 - 14870374 9 D-90489 N=FCrnberg | Mobil: 0163 - 49 64 461 Gesch=E4ftsf=FChrung: Dipl.-Inf. Oleksandr Shneyder Amtsgericht M=FCnchen | http://www.phoca-gmbh.de HRB 196 658 | http://www.x2go.org USt-IdNr.: DE281977973 ----------------------------------------------------------- --JuxSw2btcb50hLL1G1XR1hA1smfUsPdKg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlVZr38ACgkQxQmEC5b4kTO/EgCfRVIZm68qH00U8QlOdNO2441/ C6IAnisUwJ8CvFpdNzcJ6cRufo7OrG5r =3usA -----END PGP SIGNATURE----- --JuxSw2btcb50hLL1G1XR1hA1smfUsPdKg--