Changing default file manager doesnt really work?

Changing the default file manager is supposed to be changing the inode/directory mimetype default app, which i have done, but it still does not seem to work in every situation. Like when settings prompt you to pick a file for a background image, either nautilus still pops up or nothing happens if nautilus is not installed. How do I change the default file browser properly?

should mention im using nix home manager to configure my mimetypes, with this in my config:

  xdg.mimeApps = {
    enable = true;
    defaultApplications = 
    let 
      firefox = "firefox.desktop";
    in 
    {
      "application/pdf" = firefox;
      "application/x-pdf" = firefox;
      "inode/directory" = "nemo.desktop";
    };
  };

inode/directory is used to defined the program which should display a folder. However, this is a relatively rare case. The only one I know is an IDE allowing to open the folder a file is in with the file manager.

If you’re asking about the file chooser, this is not governed by the inode/directory. Instead, on older apps, this is managed by the UI toolkit of the app. Newer apps use the XDG Desktop Portal.
The XDG Desktop Portal provides the interface for providing a file chooser, but it relies on a backend which implements it.

While Nautilus does provide this interface, Nemo does currently not. As an alternative, you can install xdg-desktop-portal-gtk, which provides a file chooser for general purpose use.

2 Likes