[Starkit] Tcl/Tk Browser detection

Larry W. Virden lvirden at cas.org
Mon Jan 10 13:31:29 CET 2005


From: Gaston Verhulst <gaston.verhulst at pandora.be>

> proc invokeBrowser {url} {
>     foreach browser {htmlview mozilla konqueror netscape} {

As long as you realize that may not do what you asked for,
that's great.


It was my impression that you wanted to invoke the user's
preferred brower.  What the above code does is invoke which
ever one of 4 browsers that it finds first.  Even if the user's
preferred browser is netscape, it won't necessarily use that
one - because mozilla might be in the user's path also.

Likewise, when I run programs from home, my prefered browser
is lynx - which isn't even one of the browsers in your list.
And I would guess there's another couple dozen or more browsers
(like, say, a tcl/tk web browser...) that aren't even listed
at all.
-- 
Tcl - The glue of a new generation.  <URL: http://wiki.tcl.tk/ >
Larry W. Virden <mailto:lvirden at cas.org> <URL: http://www.purl.org/NET/lvirden/>
Even if explicitly stated to the contrary, nothing in this posting should 
be construed as representing my employer's opinions.
-><-


More information about the Starkit mailing list