> > is there a way to make a perl program find out whether a
> > valid X-Server is running?
> > I.e. $ENV{DISPLAY} is not a dummy address, if set.
> 
> In the situation you want to use X if available, terminal
> otherwise, wouldn't it be better just to use an option?
> 

Well -- from a human-issues standpoint, requiring the user to decide
that which could be automatic is (in my arrogant opinion) the worst
solution :)

It is one of the misfeature's of emacs that always makes me grumble --
if I'm at a place where my $DISPLAY variable is set, but for one
reason or another X cannot work, it burns my cookies that I have to
remember to emacs -nw ... that it can't fall-back on its own.

The most common (and near daily for me) occurance of this is: I'm
sitting at my xterminal at home, and ssh to my colo machine (as me).
I then su to some other EUID - suddenly I have a valid DISPLAY
identifier, but that server cannot be contacted for lack of
permissions. 

I'm certain that a tiny 'attempt to connect to the server on
$ENV{DISPLAY} and do nothing' program can be written.

Now, having an OPTION (in that I may safely opt out without ill
effect) that allows me to SUPPRESS that automatic check is a GOOD
thing.  But requiring me to know that my $DISPLAY is set but
unreachable is a stone in my shoe.

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
        Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
sort them into the correct order.




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to