Difference between revisions of "GNOME/Files"

From ArchWiki
Jump to navigation Jump to search
(→‎Plugins: add few extensions: Eiciel, Folder Color, Nautilus Admin)
(update interlanguage links)
Tag: wiki-scripts
 
(61 intermediate revisions by 26 users not shown)
Line 1: Line 1:
[[Category: File managers]]
+
[[Category:File managers]]
[[Category: GNOME]]
+
[[Category:GNOME]]
[[ar:Nautilus]]
+
[[ar:GNOME/Files]]
[[es:Nautilus]]
+
[[de:Nautilus]]
 +
[[es:GNOME (Español)/Files]]
 
[[ja:GNOME Files]]
 
[[ja:GNOME Files]]
 
{{Related articles start}}
 
{{Related articles start}}
Line 12: Line 13:
 
{{Related articles end}}
 
{{Related articles end}}
  
Files is the default file manager for [https://live.gnome.org/ GNOME].  Files attempts to provide a streamlined method to manage both files and applications.
+
Files is the default file manager for [https://wiki.gnome.org/ GNOME].  Files attempts to provide a streamlined method to manage both files and applications.
  
{{Note|Files was known as [http://live.gnome.org/Nautilus 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.}}  
+
{{Note|Files was known as [https://wiki.gnome.org/Apps/Nautilus 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 ==
 
== Installation ==
  
'''Files''' can be [[install]]ed with the {{Pkg|nautilus}} package from the [[official repositories]]. This package is part of the {{Grp|gnome}} group.
+
[[Install]] the {{Pkg|nautilus}} package. This package is part of the {{Grp|gnome}} group. See also [[File manager functionality#Additional features]].
  
 
{{Note|Files does not depend on the {{Pkg|gnome-shell}} package, only requiring {{Pkg|gnome-desktop}}.}}
 
{{Note|Files does not depend on the {{Pkg|gnome-shell}} package, only requiring {{Pkg|gnome-desktop}}.}}
 
* [[Install]] package {{Pkg|gvfs-smb}} for Windows network shares.
 
* [[Install]] package {{Pkg|gvfs-afp}} and {{Pkg|avahi}} for accessing apple network shares.  In addition to installing [[Avahi]], it must be [[enable]]d too.
 
  
 
=== Plugins ===
 
=== Plugins ===
Line 29: Line 27:
 
Some programs can add extra functionality to Files. Here are a few packages in the official repositories that do just that.
 
Some programs can add extra functionality to Files. Here are a few packages in the official repositories that do just that.
  
* {{App|Eiciel|Include extension which add graphical [[Access_Control_Lists|ACL]] editor into the file properties window.|http://rofi.roger-ferrer.org/eiciel/|{{AUR|eiciel}}}}
+
* {{App|Eiciel|Include extension which add graphical [[ACL]] editor into the file properties window.|http://rofi.roger-ferrer.org/eiciel/|{{AUR|eiciel}}}}
 
* {{App|Folder Color|Change the color of each icon separately then you are easily notice the right folder!|http://foldercolor.tuxfamily.org/|{{AUR|folder-color-nautilus-bzr}}}}
 
* {{App|Folder Color|Change the color of each icon separately then you are easily notice the right folder!|http://foldercolor.tuxfamily.org/|{{AUR|folder-color-nautilus-bzr}}}}
* {{App|Nautilus Actions|Configures programs to be launched when files are selected in Files|http://www.nautilus-actions.org/|{{Pkg|nautilus-actions}}}}
+
:{{Tip|This extension works only with these icon-themes which contain additional colored icons, eg:<br>{{AUR|numix-icon-theme-git}}, {{AUR|vibrancy-colors}}, {{AUR|vivacious-colors-icon-theme}}{{Broken package link|package not found}}, {{AUR|humanity-icon-theme}}, {{AUR|mint-x-icons}} }}
 +
* {{App|File Manager Actions|Configures programs to be launched when files are selected in Files|https://gitlab.gnome.org/GNOME/filemanager-actions|{{Pkg|filemanager-actions}}}}
 
* {{App|Nautilus Admin|Add to menu: "Open as administrator" or "Edit as administrator"|https://bitbucket.org/brunonova/nautilus-admin|{{AUR|nautilus-admin}}}}
 
* {{App|Nautilus Admin|Add to menu: "Open as administrator" or "Edit as administrator"|https://bitbucket.org/brunonova/nautilus-admin|{{AUR|nautilus-admin}}}}
 +
* {{App|Nautilus Bluetooth|Add to menu: "Send via Bluetooth"|https://gitlab.gnome.org/madmurphy/nautilus-bluetooth/|{{AUR|nautilus-bluetooth}}}}
 +
* {{App|Nautilus Git|Nautilus/Nemo extension to add important information about the current git directory|https://github.com/bilelmoussaoui/nautilus-git|{{AUR|nautilus-ext-git}}}}
 
* {{App|Nautilus Terminal|Terminal embedded in Files. It is always open in the current folder, and follows the navigation.|http://projects.flogisoft.com/nautilus-terminal/|{{Pkg|nautilus-terminal}}}}
 
* {{App|Nautilus Terminal|Terminal embedded in Files. It is always open in the current folder, and follows the navigation.|http://projects.flogisoft.com/nautilus-terminal/|{{Pkg|nautilus-terminal}}}}
* {{App|Open in Terminal|A Files plugin for opening terminals in arbitrary local paths|http://ftp.gnome.org/pub/GNOME/sources/nautilus-open-terminal|{{Pkg|nautilus-open-terminal}}}}
+
* {{App|Send to Menu|Files context menu for sending files.|https://gitlab.gnome.org/GNOME/nautilus-sendto|{{Pkg|nautilus-sendto}}}}
:{{Tip|This plugin is not needed if you have {{Pkg|gnome-terminal}} installed: since version 3.10.0-2 it provides the extension {{ic|/usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so}} which creates an entry in Files' context menu for opening the selected directory in a new terminal - see [https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h&#61;packages/gnome-terminal&id&#61;b143484f73a75663abacb69435fd663c348861d2 this commit].}}  
+
* {{App|Seahorse Nautilus|PGP encryption and signing for Files|https://gitlab.gnome.org/GNOME/seahorse-nautilus|{{Pkg|seahorse-nautilus}}}}
* {{App|Send to Menu|Files context menu for sending files.|http://download.gnome.org/sources/nautilus-sendto/|{{Pkg|nautilus-sendto}}}}
+
* {{App|File Roller|An application for browsing archives|https://wiki.gnome.org/Apps/FileRoller|{{Pkg|file-roller}}}}
* {{App|Seahorse Nautilus|PGP encryption and signing for Files|http://git.gnome.org/browse/seahorse-nautilus/|{{Pkg|seahorse-nautilus}}}}
+
* {{App|Python bindings for the Nautilus Extension API|With these bindings, you can write extensions for the Nautilus in python.|https://wiki.gnome.org/Projects/NautilusPython|{{Pkg|python-nautilus}} or {{AUR|python2-nautilus}}}}
 +
 
 +
If you wish to write new plugins, {{AUR|nextgen}} is a helper script that lets you set up easily new extension projects for Nautilus.
  
 
== Configuration ==
 
== 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 {{ic|org.gnome.nautilus}}.
 
Files is simple to configure graphically, but not all options are available in the preferences menu. More options are available with ''dconf-editor'' under {{ic|org.gnome.nautilus}}.
 +
 +
{{Note|If you are using Files outside of the GNOME desktop environment, you have to make sure that {{ic|/usr/lib/gsd-xsettings}} is running, otherwise the dconf settings are not applied in Files.}}
  
 
=== Desktop Icons ===
 
=== Desktop Icons ===
  
Files, by default, no longer manages the desktop window in GNOME Shell. However, Files does have the ability to provide desktop icons if they are desired. Files achieves this by drawing a transparent window (containing the icons) which sits on top of the desktop window.
+
See [[GNOME#Icons on the Desktop]].
  
To enable desktop icons, in {{Pkg|gnome-tweak-tool}}, choose: ''Desktop > Icons on Desktop > ON''. You may have to restart Files by running {{ic|killall nautilus; nautilus}} or if you are running [[GNOME]], press {{ic|ALT+F2}}, type {{ic|r}}, and press {{ic|Enter}} (this restarts GNOME Shell).
+
=== Change default item view ===
  
Alternatively, run the following command which will achieve the same effect:
+
You can change the default view for the items by setting the {{ic|default-folder-viewer}} variable, e.g. for the list view:
  
  $ gsettings set org.gnome.desktop.background show-desktop-icons true
+
  $ gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
  
{{Note|Sessions such as GNOME Classic call the ''nautilus-classic'' desktop entry which will ensure that desktop icons are always enabled.}}
+
=== Sort by type ===
  
=== Change default item view ===
+
To sort files in all folders by type:
  
You can change the default view for the items by setting the {{ic|default-folder-viewer}} variable, e.g. for the list view:
+
  $ gsettings set org.gnome.nautilus.preferences default-sort-order 'type'
 
 
  $ gsettings set org.gnome.nautilus.preferences default-folder-viewer 'list-view'
 
  
 
=== Remove folders from the places sidebar ===
 
=== Remove folders from the places sidebar ===
Line 81: Line 84:
 
See [[File manager functionality#Thumbnail previews]].
 
See [[File manager functionality#Thumbnail previews]].
  
=== Create an empty document in Files 3.6 and above ===
+
{{Note|On {{Pkg|linux-hardened}}, thumbnails generation fails (all thumbnails go in {{ic|~/.cache/thumbnails/fail/}}). This is due to unprivileged user namespace being disabled by default on this kernel for security reasons. Nautilus uses {{ic|bwrap}} (provided by {{Pkg|bubblewrap}}) to sandbox thumbnailers. You may decide to replace {{Pkg|bubblewrap}} with {{Pkg|bubblewrap-suid}}.
 +
See [[Security#Sandboxing applications]] for more information.
 +
}}
 +
 
 +
Sometimes video thumbnails are not shown. To solve it (as mentioned in [https://bbs.archlinux.org/viewtopic.php?id=168626 No video thumbnails on nautilus]), you must install {{Pkg|ffmpegthumbnailer}}, {{Pkg|gst-libav}}, {{Pkg|gst-plugins-ugly}}, and remove the content of {{ic|~/.cache/thumbnails/fail/}}.
  
GNOME 3.6 brought changes to Files. The option to create an empty document has been removed from the right-click menu in Files. To get this option back one has to create a {{ic|~/Templates/}} folder in your home folder and place an empty file inside the folder through your favorite Terminal by {{ic|touch ~/Templates/new
+
=== Create a new document from the right-click menu ===
}} or by using any other file manager. Then just restart Files.
+
 
 +
To get this option one has to create a {{ic|~/Templates/}} folder in your home folder and place an empty file inside the folder through your favorite Terminal by {{ic|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 {{ic|xdg-user-dir TEMPLATES}}.
 
On non-English installations, the templates directory might have another name. One can find the actual directory with {{ic|xdg-user-dir TEMPLATES}}.
 +
 +
The templates directory can be configure in {{ic|~/.config/user-dirs.dirs}}
 +
 +
XDG_TEMPLATES_DIR="$HOME/some/path"
  
 
=== Music files metadata in list view ===
 
=== Music files metadata in list view ===
Line 94: Line 106:
 
GNOME Files lacks the ability to display metadata for music files in list view mode. A [[Python]] script is available which adds list view columns for the artist, album, track title, bit rate and more.
 
GNOME Files lacks the ability to display metadata for music files in list view mode. A [[Python]] script is available which adds list view columns for the artist, album, track title, bit rate and more.
  
To use the script you first need to [[pacman|install]] the following: {{Pkg|python2-nautilus}}, {{Pkg|mutagen}}, {{Pkg|python2-pillow}}, {{Pkg|kaa-metadata}} and {{Pkg|python2-exiv2}}.
+
To use the script you first need to [[install]] the following: {{AUR|python2-exiv2}}, {{Pkg|python2-mutagen}}, {{AUR|python2-nautilus}}, {{Pkg|python2-pillow}} and {{AUR|kaa-metadata}}.
  
 
Once the dependencies are installed, save the [http://pastebin.com/zN69twVP bsc-v2.py] script to {{ic|~/.local/share/nautilus-python/extensions}} (create the directory if it does not exist) and restart Files.
 
Once the dependencies are installed, save the [http://pastebin.com/zN69twVP bsc-v2.py] script to {{ic|~/.local/share/nautilus-python/extensions}} (create the directory if it does not exist) and restart Files.
  
 
The new columns should now have been added. To enable them, navigate to Preferences -> List columns and tick the columns that you wish to use.
 
The new columns should now have been added. To enable them, navigate to Preferences -> List columns and tick the columns that you wish to use.
 +
 +
=== 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 {{ic|.hidden}} file in the same directory (one filename per line).
 +
 +
=== Open current directory in Tilix ===
 +
 +
If you're using {{Pkg|tilix}} terminal you can easily add "Open in Tilix" option to the context menu of GNOME Files by installing its optional dependency {{Pkg|python-nautilus}}.
 +
 +
=== Open current directory in Visual Studio Code ===
 +
 +
You can easily add "Open Code Here" to the context menu by using extension [https://github.com/cra0zy/code-nautilus]
 +
 +
=== 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.
  
 
== Troubleshooting ==
 
== Troubleshooting ==
Line 104: Line 134:
 
=== Files is no longer the default file manager ===
 
=== Files is no longer the default file manager ===
  
This can happen for a number of reasons, primarily when an installation of another application forces mime type changes.  If Files is not recognized as the default file manager, set Files as default handler for the mime type ''inode/directory'':
+
This can be caused by the file association for directories being reset. Installing {{Pkg|anjuta}} tends to do this.
  
$ xdg-mime default org.gnome.Nautilus.desktop inode/directory
+
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.
  
... which will generate:
+
If this does not solve the issue, see [[File manager functionality#Directories are not opened in the file manager]].
  
{{hc|~/.local/share/applications/mimeapps.list|2=
+
=== Freezes for a few seconds after every copy operation ===
[Default Applications]
 
inode/directory=org.gnome.Nautilus.desktop
 
}}
 
  
{{tip|If you want the change to be system-wide, run the command above as root or create/edit the file {{ic|/usr/share/applications/mimeapps.list}} and add the line there.}}
+
In case you have {{Pkg|kdeconnect}} installed in your system, the problem might be caused by its file sharing module.
 +
Deactivate file sharing, and it should stop happening.

Latest revision as of 21:14, 24 November 2019

Files is the default file manager for GNOME. Files attempts to provide a streamlined method to manage both files and applications.

Note: 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.

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

Plugins

Some programs can add extra functionality to Files. Here are a few packages in the official repositories that do just that.

  • Eiciel — Include extension which add graphical ACL editor into the file properties window.
http://rofi.roger-ferrer.org/eiciel/ || eicielAUR
  • Folder Color — Change the color of each icon separately then you are easily notice the right folder!
http://foldercolor.tuxfamily.org/ || folder-color-nautilus-bzrAUR
Tip: This extension works only with these icon-themes which contain additional colored icons, eg:
numix-icon-theme-gitAUR, vibrancy-colorsAUR, vivacious-colors-icon-themeAUR[broken link: package not found], humanity-icon-themeAUR, mint-x-iconsAUR
  • File Manager Actions — Configures programs to be launched when files are selected in Files
https://gitlab.gnome.org/GNOME/filemanager-actions || filemanager-actions
  • Nautilus Admin — Add to menu: "Open as administrator" or "Edit as administrator"
https://bitbucket.org/brunonova/nautilus-admin || nautilus-adminAUR
  • Nautilus Bluetooth — Add to menu: "Send via Bluetooth"
https://gitlab.gnome.org/madmurphy/nautilus-bluetooth/ || nautilus-bluetoothAUR
  • Nautilus Git — Nautilus/Nemo extension to add important information about the current git directory
https://github.com/bilelmoussaoui/nautilus-git || nautilus-ext-gitAUR
  • Nautilus Terminal — Terminal embedded in Files. It is always open in the current folder, and follows the navigation.
http://projects.flogisoft.com/nautilus-terminal/ || nautilus-terminal
  • Send to Menu — Files context menu for sending files.
https://gitlab.gnome.org/GNOME/nautilus-sendto || nautilus-sendto
  • Seahorse Nautilus — PGP encryption and signing for Files
https://gitlab.gnome.org/GNOME/seahorse-nautilus || seahorse-nautilus
  • File Roller — An application for browsing archives
https://wiki.gnome.org/Apps/FileRoller || file-roller
  • Python bindings for the Nautilus Extension API — With these bindings, you can write extensions for the Nautilus in python.
https://wiki.gnome.org/Projects/NautilusPython || python-nautilus or python2-nautilusAUR

If you wish to write new plugins, nextgenAUR is a helper script that lets you set up easily new extension projects for Nautilus.

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.

Note: 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.

Desktop Icons

See GNOME#Icons on the Desktop.

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'

Remove folders from the places sidebar

The displayed folders are specified in ~/.config/user-dirs.dirs and can be altered with any editor. An execution of xdg-user-dirs-update will change them again, thus it may be advisable to set the file permissions to read-only.

Always show text-entry location

The standard Files toolbar shows a button bar interface for path navigation. To enter path locations using the keyboard, you must expose the location text-entry field. This is done by pressing 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
Note: 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.

Note: 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 configure in ~/.config/user-dirs.dirs

XDG_TEMPLATES_DIR="$HOME/some/path"

Music files metadata in list view

Note: The script linked to below is slightly modified to fix an error. The original can be found here.

GNOME Files lacks the ability to display metadata for music files in list view mode. A Python script is available which adds list view columns for the artist, album, track title, bit rate and more.

To use the script you first need to install the following: python2-exiv2AUR, python2-mutagen, python2-nautilusAUR, python2-pillow and kaa-metadataAUR.

Once the dependencies are installed, save the bsc-v2.py script to ~/.local/share/nautilus-python/extensions (create the directory if it does not exist) and restart Files.

The new columns should now have been added. To enable them, navigate to Preferences -> List columns and tick the columns that you wish to use.

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).

Open current directory in Tilix

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

Open current directory in Visual Studio Code

You can easily add "Open Code Here" to the context menu by using extension [1]

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.

Troubleshooting

Files is no longer the default file manager

This can be caused by the file association for directories being reset. Installing anjuta tends 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.