Skip to content

Explicitly route FileChooser to gtk in portals.conf #3765

Description

@mdread

I ran into an issue where file picker dialogs (downloads, save as, open file) silently fail on niri when Nautilus isn't installed.

The problem is that niri-portals.conf sets default=gnome;gtk; but doesn't explicitly route FileChooser. So xdg-desktop-portal-gnome picks it up first and tries to delegate to Nautilus, which isn't there if you're not running a full GNOME desktop. The dialog just never shows up: no error, nothing.

My setup is NixOS with niri + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk, no Nautilus. I noticed it in Zen Browser (Firefox-based), but it would affect any app that uses the portal for file dialogs.

Adding this line to niri-portals.conf fixes it:

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

Which is consistent with how Access and Notification are already explicitly routed to gtk in the same file.

For now, I'm working around it by overriding the whole portal config at the system level, but that means I'd miss any future changes you make to the defaults.

I can open a PR if any of the maintainers prefer and consider this change useful.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions