For the past couple of months, I haven’t been able to open the file-picker dialog in Chromium-based browsers like Chrome and Brave.
I had first assumed that it was probably because I was missing some system package a la xdg-desktop-portal, but alas no, I already had both the gtk and wlr backends installed.
Plus, it seemed to work perfectly fine in other application, such as Firefox, so I eventually concluded that it was probably just a quirk of Chromium on Wayland.
Recently, however, I came across a GitHub issue describing the same problem and an albeit hacky solution.
The Fix
- Make sure that you have the
xdg-desktop-portal-gtkpackage (or equivalent xdg portal backend) package installed. cdto the root directory/and search for a file calledgtk.portal. I used the commandfd gtk.portaland found it at/usr/share/xdg-desktop-portal/portals/gtk.portal.- Open the file in your text-editor of choice, and add
swayto theUseInkey. For example, I changedUseIn=gnometoUseIn=gnome;sway.
Now, logging out for good measure, you should be able to open file dialogs in Chrome!