Jump to content

Nautilus: Difference between revisions

From Official NixOS Wiki
Klinger (talk | contribs)
Phobos (talk | contribs)
m Added details for automounting
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Nautilus is the [[GNOME]] desktop's file manager. When using Nautilus without GNOME, you may need to enable additional services to get familiar functionality.
Nautilus is the [[GNOME]] desktop's file manager. When using Nautilus without GNOME, you may need to enable additional services to get familiar functionality.


== GVfs ==
== Installation ==
{{File|3=environment.systemPackages = [
  pkgs.nautilus
];|name=/etc/nixos/configuration.nix|lang=nix}}


If GVfs is not available, you may see errors such as "Sorry, could not display all the contents of “trash:///”: Operation not supported" when trying to open the trash folder, or be unable to access network filesystems.
== Configuration ==
 
=== Mount, trash, and other virtual filesystems ===
If [[wikipedia:GVfs|GVfs]] is not available, you may see errors such as "Sorry, could not display all the contents of “trash:///”: Operation not supported" when trying to open the trash folder, or be unable to access network filesystems.


To enable GVfs:
To enable GVfs:
Line 14: Line 20:
When using X11, this is probably sufficient (though, see the general notes on [[GNOME#Running_GNOME_programs_outside_of_GNOME|running GNOME programs outside of GNOME]]). On Wayland, more effort may be required: [https://github.com/NixOS/nixpkgs/issues/128026].
When using X11, this is probably sufficient (though, see the general notes on [[GNOME#Running_GNOME_programs_outside_of_GNOME|running GNOME programs outside of GNOME]]). On Wayland, more effort may be required: [https://github.com/NixOS/nixpkgs/issues/128026].


== Gstreamer ==
=== Mount external drives in sidebar ===
In a window manager such as [[Sway]] it may be necessary to enable [https://github.com/coldfix/udiskie udiskie] to auto-mount USB devices. See [[USB storage devices]] for more configuration details.
{{File|3=services.udisks2.enable = true;|name=/etc/nixos/configuration.nix|lang=nix}}
And in Home Manager:
{{File|3=services.udiskie = {
    enable = true;
};|name=/etc/nixos/home.nix|lang=nix}}


=== Gstreamer ===
Unless you've installed Gstreamer plugins system-wide, the "Audio and Video Properties" pane under the "Properties" menu for media files will say "Oops! Something went wrong. Your GStreamer installation is missing a plug-in."
Unless you've installed Gstreamer plugins system-wide, the "Audio and Video Properties" pane under the "Properties" menu for media files will say "Oops! Something went wrong. Your GStreamer installation is missing a plug-in."


Line 21: Line 34:


{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
nixpkgs.overlays = [(self: super: {
nixpkgs.overlays = [
   gnome = super.gnome.overrideScope' (gself: gsuper: {
   (final: prev: {
     nautilus = gsuper.nautilus.overrideAttrs (nsuper: {
     nautilus = prev.nautilus.overrideAttrs (nprev: {
       buildInputs = nsuper.buildInputs ++ (with gst_all_1; [
       buildInputs =
        gst-plugins-good
        nprev.buildInputs
        gst-plugins-bad
        ++ (with pkgs.gst_all_1; [
      ]);
          gst-plugins-good
          gst-plugins-bad
        ]);
     });
     });
   });
   })
})];
];
</nowiki>}}
</nowiki>}}


=== HEIC image preview ===
To enable HEIC image preview in Nautilus, add following to your system configuration<syntaxhighlight lang="nix">
environment.systemPackages = [ pkgs.libheif pkgs.libheif.out ];
environment.pathsToLink = [ "share/thumbnailers" ];
</syntaxhighlight>
[[Category:Applications]]
[[Category:Applications]]
[[Category:File Manager]]
[[Category:File Manager]]

Latest revision as of 16:34, 16 January 2026

Nautilus is the GNOME desktop's file manager. When using Nautilus without GNOME, you may need to enable additional services to get familiar functionality.

Installation

❄︎ /etc/nixos/configuration.nix
environment.systemPackages = [ 
  pkgs.nautilus 
];

Configuration

Mount, trash, and other virtual filesystems

If GVfs is not available, you may see errors such as "Sorry, could not display all the contents of “trash:///”: Operation not supported" when trying to open the trash folder, or be unable to access network filesystems.

To enable GVfs:

❄︎ /etc/nixos/configuration.nix
services.gvfs.enable = true;

Then log out and back in, and verify that the GIO_EXTRA_MODULES environment variable is set.

When using X11, this is probably sufficient (though, see the general notes on running GNOME programs outside of GNOME). On Wayland, more effort may be required: [1].

Mount external drives in sidebar

In a window manager such as Sway it may be necessary to enable udiskie to auto-mount USB devices. See USB storage devices for more configuration details.

❄︎ /etc/nixos/configuration.nix
services.udisks2.enable = true;

And in Home Manager:

❄︎ /etc/nixos/home.nix
services.udiskie = {
    enable = true;
};

Gstreamer

Unless you've installed Gstreamer plugins system-wide, the "Audio and Video Properties" pane under the "Properties" menu for media files will say "Oops! Something went wrong. Your GStreamer installation is missing a plug-in."

To enable the A/V Properties and see details like media length, codec, etc, the following overlay may be used:

❄︎ /etc/nixos/configuration.nix
nixpkgs.overlays = [
  (final: prev: {
    nautilus = prev.nautilus.overrideAttrs (nprev: {
      buildInputs =
        nprev.buildInputs
        ++ (with pkgs.gst_all_1; [
          gst-plugins-good
          gst-plugins-bad
        ]);
    });
  })
];

HEIC image preview

To enable HEIC image preview in Nautilus, add following to your system configuration

environment.systemPackages = [ pkgs.libheif pkgs.libheif.out ];
environment.pathsToLink = [ "share/thumbnailers" ];