If ran in terminal, when it should open a dialog, it drops a warning: ...components/dbus/xdg/request.cc:173] Request ended (non-user cancelled).

I figured I need to install xdg-desktop-portal-gtk: xbps-install -S xdg-desktop-portal-gtk

After relogin, still no luck. Grepping around configs, I stumbled upon /usr/share/xdg-desktop-portal/niri-portals.conf:

1
2
3
4
5
[preferred]
default=gnome;gtk;
org.freedesktop.impl.portal.Access=gtk;
org.freedesktop.impl.portal.Notification=gtk;
org.freedesktop.impl.portal.Secret=gnome-keyring;

I won’t edit it as it is a package-supplied file; cp it to /etc/xdg-desktop-portal/niri-portals.conf, then add the line:

1
org.freedesktop.impl.portal.FileChooser=gtk;

After relogin, dialogs work as intended.