Re: Default Web Browser



On Sun, 12 Feb 2006 00:00:51 -0500
Andrew Krause <andrew openldev org> wrote:
> Is there a sure fire way of find the default browser on all Linux 
> distributions
> or is there a 98% case that will work? Thanks - Andrew Krause

Probably not. A good place to start would be looking at the sources for
Python's webbrowser module; it provides a cross-platform mechanism for
launching a reasonable browser. Not sure how it detects the correct
browser on Linux.

Likely places to find such a setting are the GCONF keys mentioned in
this thread, and also the BROWSER environment variable (not very widely
used, but someone with it set will want it honored). KDE stores a
browser setting somewhere, not sure where. The *best* way is probably
to use some sensible mechanism for finding a initial default browser,
and then allowing the user to reconfigure. For example, Psi lets me
choose between GNOME Default, KDE Default, and Other for the browser to
open URL's. That mechanism seems to work quite well.

The x-www-browser only exists on Debian-based systems AFAIK.

- Michael

-- 
mouse, n: a device for pointing at the xterm in which you want to type.
                -- Fortune
-- 
mouse, n: a device for pointing at the xterm in which you want to type.
                -- Fortune



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]