gnome-software's desktop file advertises support for URI schemes it may not be able to handle
The org.gnome.Software.desktop
file unconditionally advertises support for URI schemes like apt:
and snap:
, even when the plugin required to support them is missing. Ideally the URL schemes would only be advertised when they can actually be handled. There isn't an obvious single best way to do this due to the different ways gnome-software may be packaged.
My first thought was to add them to the desktop file conditionally based on whether the associated plugin was built. This falls down for distros like Fedora, Debian, and Ubuntu where the snap plugin is built but then siloed off into a separate binary package that may or may not be installed. One way around this would be to provide a second .desktop file that advertises the URI scheme and is hidden from menus with NoDisplay=true
. Distros could then package the extra .desktop files together with the plugins that support the URI scheme.
That might not work so well for packaging systems that only let you provide a single .desktop file though. Flatpak might be an example of this. It would probably also apply to snap packaging too, where we only get one desktop file per app exposed by the package.