From X2Go-ML-1@baur-itcs.de  Tue Jan 10 23:29:14 2017
Received: (at 1134) by bugs.x2go.org; 10 Jan 2017 22:29:15 +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=3.0 tests=BAYES_00,URIBL_BLOCKED
	autolearn=ham version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 55D255DAA7
	for <1134@bugs.x2go.org>; Tue, 10 Jan 2017 23:29:14 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 1Fm6ZBOjwBAi for <1134@bugs.x2go.org>;
	Tue, 10 Jan 2017 23:29:07 +0100 (CET)
Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id 8B89C5DA91
	for <1134@bugs.x2go.org>; Tue, 10 Jan 2017 23:29:07 +0100 (CET)
Received: from [192.168.0.23] ([78.43.90.159]) by mrelayeu.kundenserver.de
 (mreue104 [212.227.15.145]) with ESMTPSA (Nemesis) id
 0M9pIu-1cKS8p3LSa-00B3ey; Tue, 10 Jan 2017 23:28:43 +0100
Subject: Re: [X2Go-Dev] Bug#1134: Bug#1134: No environment variable available
 for testing in .bash_profile or .bashrc
To: Rick Benkstein <rbenkstein@cendatsys.com>, 1134@bugs.x2go.org
References: <9E59DC33-FF80-4D84-BA9F-96BCFDA8B8CE@ucdavis.edu>
 <1fe5ef7f8e274faf9c51e7e06369ea01@CDS-EXCHG2.cds.local>
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
Message-ID: <047392b2-73a1-b2c6-9ad5-512b1cc06696@baur-itcs.de>
Date: Tue, 10 Jan 2017 23:28:31 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <1fe5ef7f8e274faf9c51e7e06369ea01@CDS-EXCHG2.cds.local>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="D6SALPFlT22Ke6m3gvm4v79muw6MXOLwc"
X-Provags-ID: V03:K0:ndW/JMqpiQnmpmge6butk7mghensafywm1syjZhBnBH6DmTWDrF
 fVrFwAYB0uMRpUhmuDa0ezavZ9OGl0OQtuW0qSDFmaB0ac+IbeyaK9PrrkEbygZfLUGa0MM
 D9r0j05C0gn2nnU8XjBHjLZyjMx6QahTEc8Vpp0CLflKfHWgpEHdNSIr7Ye+6HBwo+Euxen
 1Vo3oM4u6Xi/4kXBD0s8g==
X-UI-Out-Filterresults: notjunk:1;V01:K0:eNGeUedBeQY=:oHWOxSYmG8TSh08Q3dEj5V
 jyWxUppTR9HYh2mf8+v5IWKqWfXCEgow1y/rrFLHGMS2nMqNAl3edtrQrkJydw6vxuOz1O4dn
 caDxgtpMOsdVgrlKi4yzXr6yLnslgk91/AnSDC9YevPq5nz3QZ81VkOm+WRENNDFgAKhOKDc2
 thxHHubT0gX6fFF59+qiyepk8FzX4OGteHzV5GVsGz0nkG/+zMhE4TA66ebenCs3yvtJClleC
 dN+6H6FVCz1LWjc06S0lGij81FAdsbotrkNqfdTAGyIMyFbvjMCBkxyhO4pVPH0assbOjZk6v
 1woNgsFWOsTyG9ojT1twNxmaLGxXYHNH0j7OVZgEigc1lwGy9pTS52cbVaG2izsKj0JfXM53i
 ifoQAaplo2SXwntdTmI9h+dqoTHQbLpYFX3r1gJq9iIk3ewuhqoY3S7NRTRM+Yx/V67YDfGAL
 X33wKyS9AzzHikZOdrQANMdgr0T8rrpDnYvdO5LygpBT2+lk1nkV9MFTemndAFymSaV6904/u
 7zwkQliQbNByCcc+VUpNb71CCdmP3R0R/jOwmzy2cB/zEJa0NcAZmNtK2tRzs7XQou3F1bDk7
 yzKIBCIA1zclw7Ptgg4ma+ufvj5TJsjY63tlQnKXaRCMFzr5zCltcInf2UHF6uX1cDg4kX2OJ
 IZn1KqKlS4g/oDUy44nW/pM8LSD5a0S8JcTIZAgFzorxNMpC+vOdM7lNUIYsP9UCBuWA=

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--D6SALPFlT22Ke6m3gvm4v79muw6MXOLwc
Content-Type: multipart/mixed; boundary="6pNo0mOOKFeB2QHBhX7PbRLO7JcXsm7PG";
 protected-headers="v1"
From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: Rick Benkstein <rbenkstein@cendatsys.com>, 1134@bugs.x2go.org
Message-ID: <047392b2-73a1-b2c6-9ad5-512b1cc06696@baur-itcs.de>
Subject: Re: [X2Go-Dev] Bug#1134: Bug#1134: No environment variable available
 for testing in .bash_profile or .bashrc
References: <9E59DC33-FF80-4D84-BA9F-96BCFDA8B8CE@ucdavis.edu>
 <1fe5ef7f8e274faf9c51e7e06369ea01@CDS-EXCHG2.cds.local>
In-Reply-To: <1fe5ef7f8e274faf9c51e7e06369ea01@CDS-EXCHG2.cds.local>

--6pNo0mOOKFeB2QHBhX7PbRLO7JcXsm7PG
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Am 10.01.2017 um 23:12 schrieb Rick Benkstein:

> I have made my software switchable between GUI non-GUI by examining the=
 DISPLAY variable - if it is NULL then x2go is not being used.

Unless, of course, you are occasionally using a local X session, or
regular X forwarding, where this approach will bite you in the
posterior, falsely assuming that you're running an X2Go session when
it's regular X.

The deeper-rooted issue here is that X2Go-specific variables are only
set when a session is run in fullscreen or windowed mode, displaying an
entire desktop.

For single/published applications, no such X2Go-specific variable is set.=


However, you can check if:

the command x2golistsessions is executable (=3Dwe're on an X2GoServer -
important in case of NFS-mounted home directories)

AND the DISPLAY variable is set

AND client DISPLAY and SSH client IP match an X2Go session marked as "R"
for running.

See <http://wiki.x2go.org/doku.php/doc:howto:ssh-agent-workaround>,
section "# Part that runs in X2Go session", for an example where you
could lift the required code.

What you don't need is the part that checks for a file named
"~/.x2go/agent", so just remove that part.

Kind Regards,
Stefan

--=20
BAUR-ITCS UG (haftungsbeschr=C3=A4nkt)
Gesch=C3=A4ftsf=C3=BChrer: Stefan Baur
Eichen=C3=A4ckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243


--6pNo0mOOKFeB2QHBhX7PbRLO7JcXsm7PG--

--D6SALPFlT22Ke6m3gvm4v79muw6MXOLwc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYdWAUAAoJEG7d9BjNvlEZRCEH/1XDNxFvhk2VaR2tixyjcQSo
/aXXJenL0ZLV/q855e9GK+h/bcJkttdVIhHq4e7CMmyB0+HWBcmTwLUJUkUDSD4L
1R340NtfMCiFJrz2OG+MReIffPLUfDEtLFG5FTB2h23fEo/2NwQAPSWnc2gi4GJS
Wd0Gi4kWip6T7aDJiPK1QO4AiGv3H/+FNFOUa94E7T8SNzU9Nbvd1sHqiBf3FRLl
kUSv1P15J3pQcM/ObG0IXbr5+/Bo1aYRGHRP2fb99+ARB/jCCqTm+edVqgxc8oxI
Tc8JONRu6mM3GQdUjSwvBodYySX4LDaMgyevSZoEgbsQQlY8xztahPDdJrPorbY=
=AOgu
-----END PGP SIGNATURE-----

--D6SALPFlT22Ke6m3gvm4v79muw6MXOLwc--

