in reply to Re^2: How to detect X?
in thread How to detect X?

The fallacy in your reasoning is that there's also a convention about DISPLAY (namely, it being unset) in a non-X environment.
Depends on what you mean by "non-X environment". Theoretically, any platform could define its own standards/conventions for the use of the DISPLAY variable; X doesn't "own" it. But I don't know of any. Do you? If you're talking about some home-brewed application that uses DISPLAY for its own purposes — well, the author (and users) of such a thing are SOL for potentially conflicting with X. And this is one of the reasons why Global Variables Are Evil. :-)

Replies are listed 'Best First'.
Re^4: How to detect X?
by Anonymous Monk on Feb 22, 2005 at 10:46 UTC
    My point isn't that other applications would set or use DISPLAY. It just means that DISPLAY could be set (from someone's profile) even if X isn't running.

    Just like that PERL5LIB is set if I run a Python program. Nothing but Perl is using PERL5LIB as far as I know, but that doesn't imply that if PERL5LIB is set, I'm running perl.

      How DISPLAY is used and how PERL5LIB is used are not at all analogous.