The XDG portals store some persistent data in ~/.local/share/flatpak/db
, examples of such data is the preferred program for opening MIME types with the OpenURI portal, files opened with the OpenFile portal, etc.
One common criticism I experience is that after selecting the same application 3 times successively, the OpenFile portal will stop asking for an application and simply pick what it considers default. The API does expose an always-ask flag, but this can’t be accessed by Core’s xdg-open (an extra parameter for this would be nice), and doesn’t provide the granualarity of control to the user that can be achieved by editing the stores directly.
The best solution I’ve found so far is to use flatpak to edit the databases, e.g:
flatpak permission-set --data "{'always-ask':<true>}" desktop-used-apps text/markdown snap.joplin-desktop org.gnome.gedit 0 3
It would be nice if snap had a way to do this itself without encouraging people to install Flatpak. It’d be even nicer if it could be incorporated in a way that’s more obvious about it, perhaps it’d be ideal inside snap-store
next to the permissions tab for example.
Is there any better route right now than using Flatpak’s CLI to do the dirty work, or is there something obvious I’m missing here? I could look into whipping something up myself, but I thought I’d take bring it up in the forums first incase there’s some concensus on if/where this kind of feature belongs.