Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
go ahead... be a heretic
 
PerlMonks  

Re: How to detect X?

by jdporter (Paladin)
on Feb 21, 2005 at 14:14 UTC ( [id://433152]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to How to detect X?

    Depending entirely on the definedness/value of DISPLAY is absolutely the right thing to do. Any scheme to detect the presence of an X server on the process host is wrong, because there is no guarantee that the user running the application is sitting at the console of the process host. (I know this from painful experience. :-) In general, she won't be, although of course statistically it may be likely.

Replies are listed 'Best First'.
Re^2: How to detect X?
by blazar (Canon) on Feb 22, 2005 at 08:26 UTC
    Depending entirely on the definedness/value of DISPLAY is absolutely the right thing to do. Any scheme to detect the presence of an X server on the process host is wrong, because there is no guarantee that the user running the application is sitting at the console of the process host. (I know this from painful experience. :-) In general, she won't be, although of course statistically it may be likely.
    This seems to be the solution on which the best informed contributors to the thread agree, so I will stick with it, except that since I will have two versions in any case, namely a CLI one and a GUI one, I will still exec() the CLI one if running some minimal Tk code in an eval() block fails.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://433152]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.