Apps don't seamlessly install when clicking the Flathub install button

Hi

I always have to manually click on downloaded .flatpakref files to initiate installation from Flathub. This is true even if Firefox is configured to always open ‘Flatpak repository reference’ files with a specified application in order to seamlessly install Flatpak apps when clicking the ‘Install’ button provided by Flathub.

Could this be a problem with the MIME type configured on the Flathub web server, or is it a Firefox issue?

The Firefox support page (Manage file types and download actions in Firefox | Firefox Help) have the followings info:

When you click on a link to download a file, the Media type, also called the MIME type or Content type, as configured by the web server, will determine what action Firefox will take.

Firefox will not be able to properly handle a file if a misconfigured web server sends it with an incorrect content type. For example, Firefox may display the content as plain text instead of opening the file in an application. To learn more, see Properly configuring server MIME types and Common MIME types at MDN web docs. You can contact the website in such cases, or you can try a Firefox add-on such as Content-Type Fixer to work around the problem. (If you use an add-on and need help with it, you should visit the add-on site or contact the add-on developer for support.)

I am using Firefox 111 on Debian (stable) GNU/Linux

Regards,
Mikael

Check out this firefox extension.

It let’s flathub.org (and some other websites) open appstream links directly. However, you can’t actually specify which repo you’re installing from with AppStream. Because of this, it can’t actually specify installing from flathub (or flatpak at all!) in your software manager. So if for whatever reason flathub isn’t the default, it can’t choose it. The flatpakref file specifies flatpak remote you’re installing from or something like that.

Thank you for the suggestion ‘omark’. Unfortunately it does not help me because I am not using Gnome Software. I am using a custom shell script with Zenity as the graphical user interface to install flatpak apps.
I guess the Firefox addon would be usable to more people if it was possible to configure what app/software manager is supposed to be targeted in order to install the flatpak app.

This worked fine some years ago, until all browsers changed and it seems, like it’s not possible anymore to handle it nicer.