The mess that is 'default browser'

Chris Green cl at isbd.net
Sun Nov 7 08:56:45 UTC 2021


On Sun, Nov 07, 2021 at 06:07:39AM +0100, Ralf Mardorf via ubuntu-users wrote:
> On Sat,  6 Nov 2021 23:10:40 -0400 (EDT), Robert Heller wrote:
> >Normally, each utility has its own defaults and/or has its on settings
> >mechanism or expects some envrironment variable to be set, with some
> >fallback. 
> 
> Hi,
> 
> I didn't follow this thread, but just read Robert's email. All those
> "default" app things are quite moot. You e.g. set the EDITOR
> environment variable, that works as long as you run e.g. visudo from
> command line, but your GUI email client might provide an "open with"
> feature and does run another editor. Let alone freedesktop.org default
> {xdg-,}{settings,mime,whatsoever}. You still need to set up almost all
> apps to use a "default" xdg or what ever else app. IOW you need to set
> up an app to run e.g.
> 
>   xdg-open https://www.google.com/
> 
> instead of e.g.
> 
>   firefox https://www.google.com/
> 
> "https://www.google.com/" is just a replacement for a variable such as
> '%s'.
> 
OP here.  I think the most sensible approach for what I'm wanting is
to set the BROWSER environment variable in my .profile and then call
the browser in scripts (which is how this came up to start with) as:-

    $BROWSER <file/link to display>

Then all I need to do to change the browser that scripts use is to
change the BROWSER variable in .profile.

-- 
Chris Green




More information about the ubuntu-users mailing list