in reply to Re^3: How to detect X?
in thread How to detect X?
and the program cannot figure out whether this was intentional or not, and would properly, IMO, refuse to runBut that's what this entire problem is about. How to detect whether X is running or not. The existance of a DISPLAY variable does not mean X is up and running. Just like the existence of PERL5OPT does not mean we're currently being executed by a Perl program. DISPLAY makes sense for X applications. PERL5OPT makes sense for Perl applications. But that's about it. X applications will not run correctly if DISPLAY isn't set up - you are right about that. But that doesn't mean that non X-applications (and the OP's application might present itself as a non-X application) will, or should, refuse to run if a DISPLAY variable is set. The DISPLAY variable does not imply the user saying "I want a GUI". All it says "if I'm going to launch an X-application, that's where I want it to display itself". It's not that firefox downgrades itself to a text-mode browser if it finds out DISPLAY isn't set.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: How to detect X?
by Tanktalus (Canon) on Feb 22, 2005 at 15:09 UTC |