in reply to How to detect X?
If an X server is available, it can be reached/detected via the %ENV hash:
if ($ENV{DISPLAY}) { print "Found X server at $ENV{DISPLAY}\n"; };
Keep in mind that it might be practical if the UI-less variant can be used even when there is an X server available; examples are shell-scripts and pipes...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to detect X?
by blazar (Canon) on Feb 21, 2005 at 09:33 UTC | |
|
Re^2: How to detect X?
by Anonymous Monk on Feb 21, 2005 at 10:03 UTC |