[Tutor] Finding out if we can use a graphical environment or not
Alan Gauld
alan.gauld@blueyonder.co.uk
Wed Jul 16 18:54:32 2003
> 'X' would be the X server, right? That might not be running on the
> same machine as the python script. (In the strange client/server
> application X11, the server is the machine you sit by, and the
> client is the (possibly remote) machine where your application is
> running.)
Good point. In the normal mode where you run the apps locally it
would work, but if you were usingyour machine as an Xterminal
then the python script could be elsewhere.
> I'm not sure it's correct to have an environment set up to
> indicate a certain DISPLAY if that doesn't exist. I think a lot
> of Unix programs assume that DISPLAY actually indicates something
> that exists.
It hasn't caused me any problems in the last 13 years... but
you could be right! It's just easier than setting DISPLAY
everytime I start X.
And ironically the reason I can't do it in the startx script is
because one other user shares the X-server on my Unix box.
(The DISPLAY env var is pointing at my PC...)
Hmm, thinking further, how would that work?
I run the X server on the PC(Thanks cygwin!) but set the
DISPLAY on the Unix box where I run the applications. Now I
can run a telnet sssion to that box from the PC without having
X running and DISPLAY is still set but no X Server exists on
my PC. To be certain you would need to look at the machine ID
in DISPLAY then do a remote ps(using ssh or rsh) to see if X
is running on that machine.
This just gets more and more complicated...
Alan G.