On Wed 12 Feb 2025 at 22:54:15 (+0700), Max Nikulin wrote:
> On 12/02/2025 22:09, Greg wrote:
> > On 2025-02-12, Max Nikulin wrote:
> > > Certainly, but before delving into source code I would try the standard
> > > (XDG) way to configure media types and applications associations.
> > > 
> > Unfortunately, as Greg Wooledge has already pointed out, there is no
> > universal standard. If there was, this thread would've stopped ages
> > ago.
> 
> I am really surprised that this thread is so long. However I am still
> curious whether xfce-terminal respects /etc/xdg/mimeapps.list or
> ~/.config/mimeapps.list. My expectation it should.

The OP needs to delve into what's calling up the browser in each and
every case, unfortunately. Some here have fixated on order of
installation, and that might be a fix for /etc/alternatives, and
with luck perhaps even /etc/{mailcap,mime.types}, but is unlikely
to affect configuration files in /home, environmental variables,
and whatever is hardwired in programs themselves.

For example, xpdf uses sensible-browser in /etc/xpdf/xpdfrc:

  # Set the command used to run a web browser when a URL hyperlink is
  # clicked.

  urlCommand      "sensible-browser '%s'"

but ~/.xpdfrc can override that. This random program is completely
different:

  (define (run-browser uri)
    (if (getenv "BROWSER")
        (system*
         (getenv "BROWSER")
         uri)
        (system*
         "firefox"
         "-remote"
         (format #f "OpenUrl(~a,new-tab)" uri))))

so you may be in trouble if BROWSER is unset and you don't use FF.

Cheers,
David.

Reply via email to