http://www.perlmonks.org?node_id=665745

sweetser has asked for the wisdom of the Perl Monks concerning the following question:

Hello:

Is there a way to find out what someone's default browser is so I can call it to open an html page? I don't want to go exploring for firefox, mozilla, konqueror, and/or safari by hand.

Thanks,
Doug

Replies are listed 'Best First'.
Re: Picking the default browser in linux
by ww (Archbishop) on Feb 02, 2008 at 16:59 UTC

    Previously answered: Is there a system command in Linux... at least in part, by tcf03's "untested" reply.

    SuperSearch is your friend.

    Update And, despite the warning, "# DO NOT USE THIS MODULE IN YOUR PROJECTS" WWWBrowser.pm does provide a rather more extensive list of possible browsers than you mentioned, as well as a way to deal with W32 browsers.

Re: Picking the default browser in linux
by renodino (Curate) on Feb 02, 2008 at 18:29 UTC
      This is for the testing part of a set of programs. I am not comfortable requiring modules for testing. It looks like this one not only needs HTML::Display which does not appear to be in a standard debian package, but also libhtml-tokeparser-simple-perl.

      I think I will go the ultra easy way: tell the person doing the test to open up the files in their browser if interested.