On 13/02/2025 09:19, Greg Wooledge wrote:
On Thu, Feb 13, 2025 at 08:56:47 +0700, Max Nikulin wrote:
- *browser alternatives
- BROWSER environment
- mailcap for text/html
I have realized that I do not have an example of an application that
determines https: scheme handler from mailcap (it is for local files).
It is XDG "feature" x-scheme-handler/https vs. "xdg-settings get
default-web-browser" that actually relies on text/html handler. So it
was my extrapolation and mailcap is not used for configuration of
default browser.
- XDG configuration
Yes, but mailcap and XDG aren't Debian specific.
Agree. The only debian specific here is that mailcap list of handlers is
enriched from XDG .desktop files. However I would consider XDG as the
primary source nowadays. It allows applications to avoid debian-specific
tools.
Alternatives and
the $BROWSER variable (which is what the sensible-browser shell script
uses) are Debian specific.
I believed that $BROWSER has got some support outside of Debian:
http://www.catb.org/~esr/BROWSER/
sensible-browser is just an example of a few applications aware of this
environment.
For Debian to introduce *two* such things really surprised me. Maybe
I shouldn't be shocked, though. Debian developers are multiple herds
worth of cats.
sensible-browser is just an abstraction and convenience wrapper on the
top of {x-,gnome-,}www-browser alternatives. I do not think any
supported package still relies on gnome-www-browser, so $BROWSER perhaps
the only reason that this script still has some value.
/usr/bin/open Debian alternative is a more peculiar beast. It may be set
to xdg-open that supports URL schemes and to "see"/run-mailcap that does
not (moreover mailcap specs says that handler receives sanitized file name).
Nowadays for GUI applications that do not have native support of XDG
handlers I would consider xdg-open rather than sensible-browser.