On Fri, 11 Jan 2019 at 15:23:11 +0000, Jonathan Dowland wrote:
> Right now we have at least one package (one of the lxde* ones) shipping
> a .desktop file that references x-www-browser but does not guarantee
> that x-www-browser exists; this can be resolved via a virtual package.
> 
> I agree that it might be better if the .desktop file did not reference
> x-www-browser (which is a system-wide preference) and instead used a
> tool that respected a user-wide preference.

To facilitate that, I'd say the definition of that virtual package should
include a desktop file with at least text/html, x-scheme-handler/http
and x-scheme-handler/https in its MimeType list (I think that's what
makes it eligible to be chosen as a per-user preferred web browser),
and not just participation in the x-www-browser alternative.

> If that package instead used xdg-open, it would need to depend upon
> xdg-utils and whatever transitive dependencies that implied

If the depending package is part of LXDE and is opening a URL, it could
short-circuit the "what desktop are you?" logic and depend directly
on something (anything) that implements freedesktop URL handling and
has dependencies that would normally be installed by LXDE anyway. For
example, if LXDE depends on GLib already, then libglib2.0-bin (for
"Exec=gio open %u") would be uncontroversial.

Unfortunately I don't think there's a way to express "open the preferred
web browser to its default start page" as a URL to be opened.

> and I'm
> not sure the result would necessarily guarantee that a GUI web browser
> was installed either, so the bug ultimately would not be fixed: we still
> need a means to guarantee a GUI web browser is installed, and
> x-www-browser is the only scheme I can think of right now.

Yes, if you want to depend on "some arbitrary browser" then you need a
virtual package.

However, I agree with Jeremy that "some arbitrary browser" is unlikely
to be the UX anyone is actually looking for, and the browser that is
preferred by the desktop environment's metapackage (which appears to be
Firefox) would lead to more predictable behaviour. We're making an OS
distribution here, not just a pile of packages, so it seems appropriate
to make a choice, and back it up with some appropriate Recommends.

For what it's worth, GNOME as packaged in Debian adjusts
the default MIME type and URI scheme handler preference in
/usr/share/applications/gnome-mimeapps.list to prefer firefox-esr or
firefox over other browsers, and adds firefox-esr as a predefined
"favourite app" in GNOME Shell using a GSettings override. In both
cases, this can be overridden by user configuration. GNOME upstream
would normally have used Epiphany (aka "Web", GNOME's own web browser),
in both cases, but the Debian GNOME team has chosen to prefer Firefox
because multi-year security support for WebKit-GTK+ and Epiphany is not
feasible to do within the constraints of Debian stable release policies.

    smcv

Reply via email to