"desktop-used-apps" is not good design

The mime-apps-spec draft specifies the default launch method. Although it’s only a draft, it actually exists. The defaults.list file is still valid.

desktop-used-apps caches the launch application IDs corresponding to MIME types.

xdg-permission-store records the number of times an application has been launched. When an application has been launched less than 3 times, an application selector pops up on each launch. The cached launch applications are used as the default launch applications.

If the default launch application changes afterward, xdg-permission-store will not be updated.

Therefore, my recommendation is to remove the desktop-used-apps file and use mimeapps.list and defaults.list files instead.

This issue occurs when using xdg-open.

You probably want to raise that here Sign in to GitHub · GitHub

What is the connection between this and the flatpak project? Is it solely because of xdg-open?

The flatpak version of xdg-open simply calls OpenUri.

While ‘desktop-used-apps’ is controlled by the code at

You’re posting in the flathub forum. Flathub has no code - that does any of this.

So, is this not the right place to discuss “portals”?

I see, I should go to flatpak/xdg-desktop-portal · Discussions · GitHub