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...
In reply to Re: How to detect X?
by Corion
in thread How to detect X?
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |