Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: How to detect X?

by blazar (Canon)
on Feb 21, 2005 at 09:39 UTC ( [id://432984]=note: print w/replies, xml ) Need Help??


in reply to Re: How to detect X?
in thread How to detect X?

You could simply try the X version first. If the X server fails to appear, exec returns with an error -- the only way exec can return. Then try the command-line version.
This is fundamentally what I had thought of doing myself, even though, really I was rather thinking of putting some minimal Tk code in an eval block instead. Yes: I know that basically that would mean doing the same thing twice, but it seems somewhat cleaner... of course unless there's an even cleaner solution.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://432984]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2026-05-12 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    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.