No such interface “org.freedesktop.portal.Settings”

I can’t seem to open file pickers any more.

For example, if I click “Save page as…” from within Zen (Firefox fork), or “Save as…” from within Thunderbird, no file picker is displayed.

From the command line, if I run:

zenity --file-selection

I get:

enity --file-selection

(zenity:9469): Gdk-WARNING **: 22:01:27.172: Failed to read portal settings: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.Settings” on object at path /org/freedesktop/portal/desktop

Any guidance on how I can get this working again?

Please share any portal-related config you have.
Also, what DE/compositor do you use?

I am running hyprland.

configuratoin.nix:

programs.hyprland = {
    enable = true;
    package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
    portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};

...  

xdg.portal = {
    enable = true;
    extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
    config = {
      hyprland = {
        default = [ "hyprland" "gtk" ];
      };
    };
};

That config actually looks perfectly normal. Are there any errors on the systemd user services associated with those portals?

Getting a similar error when opening a newly created .md file in yazi. All other markdown files open fine.

Error: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.OpenURI” on object at path /org/freedesktop/portal/desktop
Exited with status code: 4
Process failed

My xdg related configuration.nix code:

xdg.autostart.enable = true;
  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal-gtk
    ];
    config = {
      hyprland = {
        default = [ "hyprland" "gtk" ];
      };
    };
  };

If anyone has any sugggestions, it would be a big help.

Had to comment out an env var, add a couple xdg configs, and enable rtkit security for a dbus/pipewire error. Hope that helps any passersby.

  environment.sessionVariables = {
    # NIXOS_XDG_OPEN_USE_PORTAL = "1"; # Disabled - causes issues with OpenURI portal interface
  };

  security.rtkit.enable = true;


  xdg.autostart.enable = true;
  xdg.portal = {
    enable = true;
    extraPortals = with pkgs; [
      xdg-desktop-portal
      xdg-desktop-portal-hyprland
      xdg-desktop-portal-gtk
    ];
    config = {
      common = {
        default = [ "gtk" ];
        "org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
      };
      hyprland = {
        default = [ "hyprland" "gtk" ];
        "org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
        "org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
      };
    };
  };

Worth noting the xdg-desktop-portal is needed to resolve the OpenURI error that I originally posted. Neither xdg-desktop-portal-hyprland or xdg-desktop-portal-gtk provide OpenURI.

I am setting up my new PC right now and I am running into the same issue, not sure if i fixed it not declarative before and have to deal with it again now, or if this is a new issue.

@guttermonk solution fixed part of my issue, I now have the FileChooser again, but for me gnome-keyring (when 1password tries to save the mfa token) (gnome-keyring was fixed by using gdm which properly unlocks it) and OpenUri don’t work. OpenUri worked with website links once (maybe I clicked set default browser or something?) yesterday, but after the reboot it is back to not working