The mess that is 'default browser'

Peter Teuben teuben at gmail.com
Sat Nov 6 16:47:26 UTC 2021


I always use

     xdg-open  URL

actually for any file, like pdf, png, ps, etc.  but that's another can 
of worms tracking down the mime types.

I use kdeconnect a lot, to send a URL from the phone to the laptop, but 
half the time it opens in the browser, and half the time it opens kate 
with the corresponding text. go figure. yes, it's a mess everywhere and 
I'm not happy with it

I use kubuntu though.

  - peter


On 11/6/21 12:38 PM, Chris Green wrote:
> I have recently changed from Firefox to Opera on one of my systems.
> So I told Opera to set itself as the default browser, hmmmm!
>
> On investigating I found that the whole 'default browser' set up is a
> disaster, after setting Opera as default I see the following on the
> 21.10 system where I changed from Firefox to Opera:-
>
>      /usr/bin/gnome-www-browser points at /etc/alternatives/gnome-www-browser
>      which points at /usr/bin/opera.
>
>      /usr/bin/x-www-browser points at /etc/alternatives/x-www-browser
>      which points at /usr/bin/firefox.
>
>      /usr/bin/sensible-browser is a script which checks the BROWSER
>      environment variable if that's not set will try gnome-www-browser
>      and then x-www-browser.
>
> On another (21.04) system where I have been using Epiphany/Web in
> parallel with Firefox both gnome-www-browser and x-www-browser are set
> to epiphany-browser in /etc/alternatives but the BROWSER environment
> variable is still set to Firefox.
>
>
> So I am at a bit of a loss as to what program name to use to call a
> web browser in scripts!  I guess the best approach might be to use
> sensible-browser and set the BROWSER environment variable.  It does
> make a bit of a nonsense of 'default browser' though!
>




More information about the ubuntu-users mailing list