X2Go Bug report logs - #1134
No environment variable available for testing in .bash_profile or .bashrc

version graph

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

Reported by: Ted Toal <twtoal@ucdavis.edu>

Date: Tue, 10 Jan 2017 21:20:03 UTC

Severity: normal

Found in version 3.5.0

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 21:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ted Toal <twtoal@ucdavis.edu>:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 21:20:03 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.x2go.org (full text, mbox):

From: Ted Toal <twtoal@ucdavis.edu>
To: submit@bugs.x2go.org
Subject: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 13:17:15 -0800
Package: NXAGENT
Version: 3.5.0

I would like to bypass setting of certain environment variables in .bash_profile if I’m connecting via x2go, but it appears there are no environment variables I can test in .bash_profile to determine if this is an x2go session. After the session starts, some x2go environment variables are there, but not while .bash_profile is executing.


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 22:20:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rick Benkstein <rbenkstein@cendatsys.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 22:20:03 GMT) Full text and rfc822 format available.

Message #10 received at 1134@bugs.x2go.org (full text, mbox):

From: Rick Benkstein <rbenkstein@cendatsys.com>
To: Ted Toal <twtoal@ucdavis.edu>, "1134@bugs.x2go.org" <1134@bugs.x2go.org>, "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Subject: RE: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 22:12:12 +0000
Ted,

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.

Rick Benkstein

-----Original Message-----
From: x2go-dev-bounces@lists.x2go.org [mailto:x2go-dev-bounces@lists.x2go.org] On Behalf Of Ted Toal
Sent: Tuesday, January 10, 2017 3:17 PM
To: submit@bugs.x2go.org
Subject: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc

Package: NXAGENT
Version: 3.5.0

I would like to bypass setting of certain environment variables in .bash_profile if I’m connecting via x2go, but it appears there are no environment variables I can test in .bash_profile to determine if this is an x2go session. After the session starts, some x2go environment variables are there, but not while .bash_profile is executing.
_______________________________________________
x2go-dev mailing list
x2go-dev@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-dev

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 22:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan Baur <X2Go-ML-1@baur-itcs.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 22:30:02 GMT) Full text and rfc822 format available.

Message #15 received at 1134@bugs.x2go.org (full text, mbox):

From: Stefan Baur <X2Go-ML-1@baur-itcs.de>
To: Rick Benkstein <rbenkstein@cendatsys.com>, 1134@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1134: Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 23:28:31 +0100
[Message part 1 (text/plain, inline)]
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 (=we'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

-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 22:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ted Toal <twtoal@ucdavis.edu>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 22:45:03 GMT) Full text and rfc822 format available.

Message #20 received at 1134@bugs.x2go.org (full text, mbox):

From: Ted Toal <twtoal@ucdavis.edu>
To: Rick Benkstein <rbenkstein@cendatsys.com>
Cc: "1134@bugs.x2go.org" <1134@bugs.x2go.org>, "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Subject: Re: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 14:41:20 -0800
[Message part 1 (text/plain, inline)]
DISPLAY is null (not defined) when x2go is running, as well as when it isn't, in my case.
—
Ted Toal, Postdoctoral Researcher
Carvajal-Carmona Lab
4502 GBSF, One Shields Ave
Davis, CA  956626  (530) 263-5986
twtoal@ucdavis.edu




> On Jan 10, 2017, at 2:12 PM, Rick Benkstein <rbenkstein@cendatsys.com> wrote:
> 
> Ted,
> 
> 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.
> 
> Rick Benkstein
> 
> -----Original Message-----
> From: x2go-dev-bounces@lists.x2go.org [mailto:x2go-dev-bounces@lists.x2go.org] On Behalf Of Ted Toal
> Sent: Tuesday, January 10, 2017 3:17 PM
> To: submit@bugs.x2go.org
> Subject: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
> 
> Package: NXAGENT
> Version: 3.5.0
> 
> I would like to bypass setting of certain environment variables in .bash_profile if I’m connecting via x2go, but it appears there are no environment variables I can test in .bash_profile to determine if this is an x2go session. After the session starts, some x2go environment variables are there, but not while .bash_profile is executing.
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> http://lists.x2go.org/listinfo/x2go-dev

[Message part 2 (text/html, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 22:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ted Toal <twtoal@ucdavis.edu>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 22:45:03 GMT) Full text and rfc822 format available.

Message #25 received at 1134@bugs.x2go.org (full text, mbox):

From: Ted Toal <twtoal@ucdavis.edu>
To: Stefan Baur <X2Go-ML-1@baur-itcs.de>, 1134@bugs.x2go.org
Cc: Rick Benkstein <rbenkstein@cendatsys.com>
Subject: Re: [X2Go-Dev] Bug#1134: Bug#1134: Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 14:44:32 -0800
[Message part 1 (text/plain, inline)]
I’m running in windowed mode (XFCE) through x2go and XQuartz.  The DISPLAY environment variable is not set. 

—
Ted Toal, Postdoctoral Researcher
Carvajal-Carmona Lab
4502 GBSF, One Shields Ave
Davis, CA  956626  (530) 263-5986
twtoal@ucdavis.edu




> On Jan 10, 2017, at 2:28 PM, Stefan Baur <X2Go-ML-1@baur-itcs.de> wrote:
> 
> 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 (=we'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
> 
> -- 
> BAUR-ITCS UG (haftungsbeschränkt)
> Geschäftsführer: Stefan Baur
> Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
> Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
> 
> _______________________________________________
> x2go-dev mailing list
> x2go-dev@lists.x2go.org
> http://lists.x2go.org/listinfo/x2go-dev

[Message part 2 (text/html, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Tue, 10 Jan 2017 22:55:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rick Benkstein <rbenkstein@cendatsys.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Tue, 10 Jan 2017 22:55:02 GMT) Full text and rfc822 format available.

Message #30 received at 1134@bugs.x2go.org (full text, mbox):

From: Rick Benkstein <rbenkstein@cendatsys.com>
To: Ted Toal <twtoal@ucdavis.edu>
Cc: "1134@bugs.x2go.org" <1134@bugs.x2go.org>, "submit@bugs.x2go.org" <submit@bugs.x2go.org>
Subject: RE: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 22:44:12 +0000
[Message part 1 (text/plain, inline)]
Sorry – I am using headless servers that never have X running on them – That solution is limited.

Rick Benkstein

From: Ted Toal [mailto:twtoal@ucdavis.edu]
Sent: Tuesday, January 10, 2017 4:41 PM
To: Rick Benkstein <rbenkstein@cendatsys.com>
Cc: 1134@bugs.x2go.org; submit@bugs.x2go.org
Subject: Re: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc

DISPLAY is null (not defined) when x2go is running, as well as when it isn't, in my case.
—
Ted Toal, Postdoctoral Researcher
Carvajal-Carmona Lab
4502 GBSF, One Shields Ave
Davis, CA  956626  (530) 263-5986
twtoal@ucdavis.edu<mailto:twtoal@ucdavis.edu>



On Jan 10, 2017, at 2:12 PM, Rick Benkstein <rbenkstein@cendatsys.com<mailto:rbenkstein@cendatsys.com>> wrote:

Ted,

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.

Rick Benkstein

-----Original Message-----
From: x2go-dev-bounces@lists.x2go.org<mailto:x2go-dev-bounces@lists.x2go.org> [mailto:x2go-dev-bounces@lists.x2go.org] On Behalf Of Ted Toal
Sent: Tuesday, January 10, 2017 3:17 PM
To: submit@bugs.x2go.org<mailto:submit@bugs.x2go.org>
Subject: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc

Package: NXAGENT
Version: 3.5.0

I would like to bypass setting of certain environment variables in .bash_profile if I’m connecting via x2go, but it appears there are no environment variables I can test in .bash_profile to determine if this is an x2go session. After the session starts, some x2go environment variables are there, but not while .bash_profile is executing.
_______________________________________________
x2go-dev mailing list
x2go-dev@lists.x2go.org<mailto:x2go-dev@lists.x2go.org>
http://lists.x2go.org/listinfo/x2go-dev

[Message part 2 (text/html, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#1134; Package nxagent. (Wed, 11 Jan 2017 01:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ted Toal <twtoal@ucdavis.edu>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Wed, 11 Jan 2017 01:50:03 GMT) Full text and rfc822 format available.

Message #35 received at 1134@bugs.x2go.org (full text, mbox):

From: Ted Toal <twtoal@ucdavis.edu>
To: 1134@bugs.x2go.org
Subject: [X2Go-Dev] Bug#1134: No environment variable available for testing in .bash_profile or .bashrc
Date: Tue, 10 Jan 2017 17:49:36 -0800
First, I’m checking DISPLAY by these methods:
env | grep DISPLAY
echo $DISPLAY

By xterm in single application mode, do you mean to start a terminal window from XQuartz?  Or do you mean to start an application from x2go using published applications mode?  Or?

When I ssh into the machine from Mac Terminal or from a terminal window in XQuartz, DISPLAY does not have a value.

I don’t know much about the different window environments for unix, but when I set TRINITY on x2go, I am unable to connect, I get the error “Unable to execute: start trinity”.  

I’m new at x2go and haven’t read any manual yet, I’m just trying to go for it.

ted



> On Jan 10, 2017, at 2:55 PM, Stefan Baur <X2Go-ML-1@baur-itcs.de> wrote:
> 
> Am 10.01.2017 um 23:44 schrieb Ted Toal:
>> I’m running in windowed mode (XFCE) through x2go and XQuartz.  The
>> DISPLAY environment variable is not set. 
> 
> Hmm, that shouldn't happen.  While I don't have XFCE and a Mac available
> tonight, doing the same with TRINITY and a Windows machine gives me a
> properly set DISPLAY variable.
> 
> What happens if you run, say, xterm in single application mode?
> Is DISPLAY set there?
> 
> -Stefan
> 
> -- 
> BAUR-ITCS UG (haftungsbeschränkt)
> Geschäftsführer: Stefan Baur
> Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
> Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243
> 



Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Tue Dec 11 00:03:48 2018; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.