Assumptions
- You’re using XFCE, or some other GTK desktop environment which isn’t GNOME.
- You’ve already installed
xdg-desktop-portal
andxdg-desktop-portal-gtk
(xdg-desktop-portal-xapp
isn’t necessary for the file-picker to be shown). - But despite this, the file-picker in various apps isn’t showing up, and dark mode isn’t being respected for GTK4 apps.
The fix
Create a file at $XDG_CONFIG_HOME/xdg-desktop-portal/portals.conf
, and give it the following content:
This fix is necessary because the configs under /usr/share/xdg-desktop-portal/
only check for the GNOME desktop environment, so other GTK environments like XFCE will be ignored. See this xdg-desktop-portal pull request for more information (this is the patch that introduced the config override described in this post).