↑ arvau

ArchWiki / GNOME/Files

de:Files es:GNOME (Español)/Files ja:GNOME/Files zh-hans:GNOME/Files

Files is the default file manager for GNOME. Files attempts to provide a streamlined method to manage both files and applications. Can be extended to provide access to files over the network via various protocols like SFTP, WebDav, NFS, etc.

Files was known as Nautilus prior to version 3.6. The application was given new descriptive names, one for each supported language. The name Nautilus is still used in numerous places such as the executable name, some package names, some desktop entries, and some GSettings schemas.

Installation

Install the nautilus package. This package is part of the gnome group. See also File manager functionality#Additional features.

Files does not depend on the gnome-shell package, only requiring gnome-desktop.

Extensions

Network Shares / Virtual Filesystems

By installing gvfs and the various gvfs-* packages, you can add support for various network based filesystems (e.g. SMB, NFS, WebDAV, Nextcloud) and some mobile phones (Android MTP, Apple AFC).

For more information and other supported virtual filesystems, see File manager functionality.

Other examples

Extensions written in Python require the Python bindings for the Nautilus Extension API (nautilus-python package).

  1. This extension works only with these icon-themes which contain additional colored icons, eg:numix-icon-theme-git, vibrancy-colors, humanity-icon-theme, mint-x-icons

    The upstream repository for seahorse-nautilus has been archived and warns against using it due to unfixed bugs.

If you wish to write new extensions, nextgen is a helper script that lets you set up easily new extension projects for GNOME Files (defaults to the C language).

Integrations

Some applications ship their own integrations with GNOME Files:

  1. The nautilus-python package, required for enabling the "Open in Tilix" extension, is marked as an optional dependency and must be installed explicitly

Integrations which rely on non-free software

Some, although free, might rely on non-free software. The following list provides a few examples:

Configuration

Files is simple to configure graphically, but not all options are available in the preferences menu. More options are available with dconf-editor under org.gnome.nautilus.

If you are using Files outside of the GNOME desktop environment, you have to make sure that /usr/lib/gsd-xsettings is running, otherwise the dconf settings are not applied in Files.

Change default item view

You can change the default view for the items by setting the default-folder-viewer variable, e.g. for the list view:

$ gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'

Sort by type

To sort files in all folders by type:

$ gsettings set org.gnome.nautilus.preferences default-sort-order 'type'

Always show text-entry location

The standard Files toolbar shows breadcrumbs interface for path navigation. To enter the path or URI, either click on a space in the breadcrumbs that is not a button, or press Ctrl+l.

To make the location text-entry field always present, use gsettings as shown below:

$ gsettings set org.gnome.nautilus.preferences always-use-location-entry true

After changing this setting, you will not be able to expose the button bar. Only when the setting is false can both forms of location navigation be employed.

Tips and tricks

Thumbnails

See File manager functionality#Thumbnail previews.

On linux-hardened, thumbnails generation fails (all thumbnails go in ~/.cache/thumbnails/fail/). This is due to unprivileged user namespace being disabled by default on this kernel for security reasons. Nautilus uses bwrap (provided by bubblewrap) to sandbox thumbnailers. You may decide to replace bubblewrap with bubblewrap-suid. See Security#Sandboxing applications for more information.

Sometimes video thumbnails are not shown. To solve it (as mentioned in No video thumbnails on nautilus), you must install ffmpegthumbnailer, gst-libav, gst-plugins-ugly, and remove the content of ~/.cache/thumbnails/fail/.

Create a new document from the right-click menu

To get this option one has to create a ~/Templates/ folder in your home folder and place an empty file inside the folder through your favorite Terminal by touch ~/Templates/new or by using any other file manager. Then just restart Files.

On non-English installations, the templates directory might have another name. One can find the actual directory with xdg-user-dir TEMPLATES.

The templates directory can be configured in the ~/.config/user-dirs.dirs file:

XDG_TEMPLATES_DIR="$HOME/some/path"

Hiding files

Like most other file managers GNOME Files hides files with names starting with a dot by default.

GNOME Files additionally hides files when their names are listed in a .hidden file in the same directory (one filename per line). See nautilus-hide for an extension that facilitates adding/removing entries from such .hidden files.

Open current directory in Tilix

If you are using tilix terminal you can easily add "Open in Tilix" option to the context menu of GNOME Files by installing its optional dependency nautilus-python.

Add a folder to bookmarks

To add a folder to your bookmarks, simply press Ctrl+d when you have the folder opened in Nautilus. Note that the list of bookmarks is shared with other GNOME-based graphical file managers (e.g. Nemo), so a folder added or removed from one will affect the bookmarks seen in the other.

Custom scripts

Scripts placed in ~/.local/share/nautilus/scripts can be run from the right click context menu of a file.

The context menu can also be organized into subfolders, e.g. ~/.local/share/nautilus/scripts/images and ~/.local/share/nautilus/scripts/music.

Scripts have access to the following environment variables:

NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
NAUTILUS_SCRIPT_SELECTED_URIS
NAUTILUS_SCRIPT_CURRENT_URI
NAUTILUS_SCRIPT_WINDOW_GEOMETRY

Some example scripts:

#!/bin/sh
gnome-terminal
~/.local/share/nautilus/scripts/open-terminal-here
#!/bin/sh
echo "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"  while read -r filename; do
    mv -n "$filename" "${filename%.*}"
done
~/.local/share/nautilus/scripts/remove-extension

Make sure the scripts are marked as executable. You may have to restart nautilus with nautilus -q for them to show up.

Keybinds

Keybinds to execute scripts can be assigned in the ~/.config/nautilus/scripts-accels file:

; Example Keybinds
; Modifiers: <Control> <Alt> <Shift>
F4 open-terminal-here
<Alt>x remove-extension

You cannot overwrite any pre-existing nautilus keybinds.

Troubleshooting

Files is no longer the default file manager

This can be caused by the file association for directories being reset. Installing anjuta or visual-studio-code-bin tend to do this.

To solve this, open Files, right-click on a folder, and choose Open With Other Application > Files > Select. This will set the association for directories back to Files.

If this does not solve the issue, see File manager functionality#Directories are not opened in the file manager.

Freezes for a few seconds after every copy operation

In case you have kdeconnect installed in your system, the problem might be caused by its file sharing module. Deactivate file sharing, and it should stop happening.

Windows machines with shared folders do not show up in Network view

To activate WSD support, install gvfs-wsdd to make GNOME/Files discover newer Windows machines in the network view.

WebDAV missing from mounting options

Install gvfs-dnssd and restart Nautilus.

Run as a Program does not work without gnome-console

'Run as a Program' context menu option is hardcoded for gnome-console and if you use different terminal and the default gnome terminal is not present, the context menu option will not do anything.

Since it's just executing /usr/bin/kgx (executable for gnome-console) directly, you can create script (or symlink if your terminal has the same arguments) named kgx and place it inside /usr/bin/ to use your terminal for 'Run as a Program' context menu option.

Example for using wezterm-git as a terminal for 'Run as a Program'

#!/bin/sh

wezterm -e $@
/usr/bin/kgx

gnome-console will keep window open with output until manually closed once the child program finishes. Different terminal emulators (like wezterm) will close immediately after the program that is being run exits. Use something like read -n 1 -s -r -p "Press any key to continue" at the end of above script to pause it until any button is pressed.

Open directory in an arbitrary terminal

It is possible to open a directory in a terminal emulator with "Open with..." right click menu entry. But the XDG desktop entry of the terminal is expected to contain appropriate Exec and MimeType values.

Following example shows how to create additional desktop entry for Alacritty terminal emulator which will be recognized by "Open with...".

[Desktop Entry]
Type=Application

# Flag `working-directory` takes argument
Exec=alacritty --working-directory %f
# MimeType contains special type `inode/directory;`
MimeType=inode/directory;

Icon=Alacritty
Terminal=false
Categories=System;TerminalEmulator;
Name=Open in Alacritty
GenericName=Terminal
StartupNotify=true
StartupWMClass=Alacritty
~/.local/share/applications/alacritty-directory.desktop

Run update-desktop-database ~/.local/share/applications/ to apply changes.

If a terminal app became default file manager, it can be fixed with command xdg-mime default org.gnome.Nautilus.desktop inode/directory.

Check flags and desktop entry file of your preferred terminal application to adopt the example.