[Tutor] How to print the installed web browser

Nick Raptis airscorp at otenet.gr
Wed Sep 1 10:51:05 CEST 2010


On 09/01/2010 11:46 AM, Nick Raptis wrote:
>
> Alan, let me make a wild guess here.
>
> Ubuntu does have little "Preferred applications" config tool. I don't 
> know how or where it stores this data, but my guess is it's the same 
> place xdg (as in xdg-open) gets it's configuration from. This article 
> might help http://www.crystalorb.net/mikem/xdg-settings.html
>
> Quote from above article (near the end): "...especially as there is 
> (currently) no single, portable, authoritative way for applications to 
> query the values of these settings..."
>
> Ranjith, get ready for some configuration file parsing.
> But if you just want to open a url with the default browser, you can 
> just execute "xdg-open your-url" as a subprocess.
>
> Hope I shifted you to the right direction.
>
> Nick
>
> PS-trivia: I got to guess these just because I've read the source from 
> "import antigravity"

Ooops! Sorry if I caused any confusion, I thought the goal was to print 
the default browser, not all of the installed ones. Silly me.
Still, the "Preferred applications" tool seems to know that info (so to 
give you a choice) so it might be something to dig into.

Nick


More information about the Tutor mailing list