I see this mostly on Manjaro Cinnamon, but it’s rampant on other distros given the volume of complaints. It is yet another reason why Agile must be banned globally. Anything that can’t be tested automatically just isn’t tested in either the Microsoft or Linux worlds all because of Agile.
The name of the file you need to create will change based on the desktop you are running. On Cinnamon it is this:
.config/xdg-desktop-portal/x-cinnamon-portals.conf
Unless someone well and truly screwed you by putting one higher up in the search path, the location will be the same on all desktops. You can “safely” find what search path yours follows, at least until it finds a config it recognizes via the following command.
/usr/lib/xdg-desktop-portal --verbose
If you don’t have one configured you will see a much longer list than this.
[roland@roland-hpz820workstation ~]$ /usr/lib/xdg-desktop-portal --verbose
XDP: Looking for portals configuration in '/home/roland/.config/xdg-desktop-portal/x-cinnamon-portals.conf'
XDP: Preferred portals for interface 'default': gtk, xapp
XDP: Using portal configuration file '/home/roland/.config/xdg-desktop-portal/x-cinnamon-portals.conf' for desktop 'x-cinnamon'
XDP: load portals from /usr/share/xdg-desktop-portal/portals
What Flatpak Needs
Someone has decided that “xapp” should be first. Trouble is “xapp” doesn’t work, at least not for many/most people, hence all of the bitching. If you cat out the file your first command chooses to use (and you are having problem with links not opening for your editor/email/whatever Flatpak software) you will most likely see this:
[preferred]
default=xapp;gtk;
The “default” line may well be quite a ways down below [preferred] but it will list xapp, or some other portal first. As far as I can tell gtk is the only one known to work. In your custom portals.conf file you only need the following:
[preferred]
default=gtk;xapp;
Save it via the appropriate name in .config/xdg-desktop-portal/ under your $HOME directory.
Reboot.
Life should be good!