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
Am 11.01.2017 um 02:49 schrieb Ted Toal:
First, I’m checking DISPLAY by these methods: env | grep DISPLAY echo $DISPLAY
[ -n "$DISPLAY" ] checks if DISPLAY is a non-zero string, and you can perform actions depending on the outcome of that check, either with if/then, or with && or ||.
e.g.
[ -n "$DISPLAY" ] && echo "DISPLAY variable is set."
or
[ -n "$DISPLAY" ] || echo "DISPLAY variable is missing."
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?
X2Go has both a published application mode (which you can use just as well) and a single application mode, amongst other modes. In single application mode, you can (and must) specify which application X2Go should launch on the server. However, as you already found the published application mode setting and it will work just as well for the purpose of these tests, just use that and run an xterm from there.
When I ssh into the machine from Mac Terminal or from a terminal window in XQuartz, DISPLAY does not have a value.
That is to be expected, as regular ssh does not have X forwarding set as a default option. You need to explicitly enable it by calling ssh -X user@host or by adding the corresponding entry in ~/.ssh/config. If you decide to do the latter, be sure to make it a per-host setting, as enabling X forwarding by default is a serious security nightmare.
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”.
That, too, is to be expected if you don't have TRINITY installed on your X2Go server - just like I don't have XFCE on mine.
I’m new at x2go and haven’t read any manual yet, I’m just trying to go for it.
Ted, in all seriousness - we have numerous man pages and a wiki full of information, and you just can't be bothered to read any of it and expect us to solve your problems stemming from a non-standard setup, for free? Wow. I'm sure that attitude will motivate our volunteers to help you.
-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
e.g.
[ -n "$DISPLAY" ] && echo "DISPLAY variable is set."
or
[ -n "$DISPLAY" ] || echo "DISPLAY variable is missing.”
I know that. I prefer [[ “$DISPLAY” == “” ]]. But echo $DISPLAY is sufficient to determine if it has a value.
X2Go has both a published application mode (which you can use just as well) and a single application mode, amongst other modes. In single application mode, you can (and must) specify which application X2Go should launch on the server. However, as you already found the published application mode setting and it will work just as well for the purpose of these tests, just use that and run an xterm from there.
There is no single-application mode listed in my x2go.
I just tried published application mode several times and it is not starting like it did before when I tried it. Sometimes a connection timeout occurs, and sometimes it says it is connected but it doesn’t give me the opportunity to choose an app, and no X window opens.
When I ssh into the machine from Mac Terminal or from a terminal window in XQuartz, DISPLAY does not have a value.
That is to be expected, as regular ssh does not have X forwarding set as a default option. You need to explicitly enable it by calling ssh -X user@host or by adding the corresponding entry in ~/.ssh/config. If you decide to do the latter, be sure to make it a per-host setting, as enabling X forwarding by default is a serious security nightmare.
It sounds like DISPLAY is related to X and not specifically to x2go. Is it really the right thing to do to test DISPLAY in my .bashrc? Why wouldn’t I test a specific x2go env. var? And why are the x2go env. vars not defined when .bashrc runs, but ARE defined after a get a command line prompt?
I’m new at x2go and haven’t read any manual yet, I’m just trying to go for it.
Ted, in all seriousness - we have numerous man pages and a wiki full of information, and you just can't be bothered to read any of it and expect us to solve your problems stemming from a non-standard setup, for free? Wow. I'm sure that attitude will motivate our volunteers to help you.
First, in my view I’m solving YOUR problem, not the other way around. I had considered not bothering to go any further once this problem occurred, but I decided, “I’ll bet the x2go people would like to know about this so they can improve the software.” Was I wrong? It took me considerable time to figure out how to submit a bug report. I almost gave up, not knowing for example the names of the x2go packages. I have spent my OWN TIME here trying to help you figure out whether this is something that needs to be addressed in x2go.
Now, as to reading documentation. Reading the x2go man pages and wiki would probably take several hours. Multiply that by the hundreds of apps I use, and I would be doing nothing but reading manuals my entire time. I do use ‘man’ often, and would do so if I had a question about using x2go. But in this case, it was a confusing problem involving PATH and env vars. And by the way, I did use ‘man’ to search for info about this before reporting the bug. I also did some web searching about the problem. I did not resort to a bug report until I had devoted quite a bit of time to looking for a solution.
As I mentioned earlier, my setup is not non-standard. It is typical of Perl users. You will have a lot of Perl users with the same problem.
As to whether I’m expecting you to solve this problem, no, I didn’t expect anything. I simply reported it.
ted