How to Make Nautilus Even More Useful in Linux

Spread the love

Nautilus is a beautiful and sleek file manager for the GNOME desktop environment. It works by providing an accessible interface that is both easy to use and highly extensible. Here we will show you how to level up your file manager with some of the best tweaks and extensions for Nautilus in Linux.

Content

Tip: if you are not comfortable with Nautilus, there are many other alternative file managers that you can install on your Linux distro.

Enable Traditional Path Addresses

One quirk of Nautilus compared to other file managers for Linux is that it doesn’t show the full path of the current directory by default. While you can find this by opening a terminal on that folder and running pwd, doing that is clunky and cumbersome.

To solve this, press Ctrl + L to replace the full path of the currently active folder. You can press the same keybind again to go back to the original path style.

You can also make the traditional path permanent by running the following command in a terminal:

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

To apply your new settings, reset your current Nautilus session:

nautilus -q

Create a Blank Text File Generator

Another quirk Nautilus has is that its context menu doesn’t have an option to create arbitrary files. This can be annoying if you want to create an empty file and you don’t want to open a new terminal session.

To fix this, navigate to your home directory in Nautilus.

Open the “Templates” folder, then right-click the mouse and select “Open in Terminal.”

Create a new file in the templates folder by running the following command:

touch ./New.txt

Check whether your new context option is working properly by right-clicking on the Nautilus window.

Select “New Document”, then click your new blank text file option.

Modify the Navigation Sidebar

The navigation sidebar is an iconic part of the modern Nautilus interface in Linux. While it’s a simple way of presenting the important folders on your computer, changing the default values can be confusing to a novice user.

To modify the sidebar values, go to your home directory in Nautilus.

Press Ctrl + H to reveal the hidden files in the directory, then double-click the “.config” folder.

Open the “user-dirs.dirs” file with your favorite text editor.

Modify the directory path of the XDG variable that you want to change. In my case, I want to set my Videos folder to “$HOME/Downloads/Media.”

Save the “user-dirs.dirs” file, then run nautilus -q on a terminal to reload your new settings.

FYI: learn more about what Bash variables are in Linux.

Enable Permanent Deletion for Files

By default, Nautilus will always hold your recently deleted files in its Trash Can folder. This is always helpful whenever you’ve accidentally deleted a file and you want to restore it. However, there are cases where you might want to delete a file without moving it to the Trash Can.

To enable permanent deletion, open Nautilus then click the file manager’s settings menu.

Click “Preferences” on the dropdown menu list, then scroll down on the Preferences window and select the “Delete Permanently” toggle button.

Confirm that your settings are working properly by pressing Right Click on any file and checking for the “Delete Permanently” option.

Enable Secure File Deletion

Nautilus-wipe is a lightweight extension that adds a “secure delete” option to the file context menu in Nautilus. Unlike a regular delete, it ensures that any file you remove will be irretrievable even from data recovery programs.

Aside from that, this extension also comes with an option to wipe your drive’s free disk space. This is helpful if you want a drive that is completely clean of any residual data.

To install this extension, run the following command in your terminal:

sudo apt install nautilus-wipe

Load your new extension on the current session by reloading your Nautilus process:

nautilus -q

Good to know: learn how to encrypt your sensitive files with Tomb in Linux.

Enable Administrator Mode

One of the biggest downsides of Nautilus is that it doesn’t come with a built-in way to open files and run programs as root. This can be frustrating especially if you’ve already opened the Linux system file on the Nautilus GUI only to find out that it requires root access.

Nautilus-admin is a simple extension that adds an “Administrator Mode” option on the file manager’s context menu. Similar to the “Open as Administrator” option in Windows, this gives you a prompt where you can access a folder as the root user.

To use this for your Nautilus instance, run the following:

sudo apt install nautilus-admin

Hide Files in Your Filesystem

Traditionally, hiding files in Linux requires you to append a dot (.) at the start of a file’s name. The nautilus-hide extension brings this feature straight to your file manager, by providing a context menu option for hiding files.

This extension also works for multiple files and entire directories. As such nautilus-hide is a handy tool for users that want to hide a large amount of files in their filesystem but don’t want to rename them one by one.

With that said, you can install this extension by running the following:

sudo apt install nautilus-hide

Edit and Convert Images

Nautilus-image-converter is a nifty little tool that provides a way to perform basic image editing straight from your file manager. It works by using the Imagemagick CLI utility as the backbone for its image manipulation features.

Another great feature of this extension is that it can handle multiple image edits at once. For instance, you can select an entire directory of images and resize them at exactly 50% scale.

You can install this utility by running the following command:

sudo apt install nautilus-image-converter

Open A Custom Terminal Window

By default, Nautilus allows you to open a Linux terminal at the current folder location through its context menu. However, it only does it for the Gnome Terminal emulator.

The nautilus-open-any-terminal utility solves this by extending the default “Open in Terminal” option to almost any emulator client.

To get this, open a new terminal and run the following command:

sudo apt install python3-nautilus python3-full gettext

Download the latest release file from the developer’s Github page.

Open a new terminal window on your Downloads folder, then extract the contents of the extension’s zip file:

unzip ./nautilus-open-any-terminal-0.5.0.zip

Go inside the extension’s folder, then run the installer script:

sh ./tools/update-extension-user.sh install
glib-compile-schemas ~/.local/share/glib-2.0/schemas/

Run the following list commands to set a new custom terminal shell. In my case, I will adjust the terminal value to “urxvt” since it’s the terminal that I use.

gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal urxvt

Reload your Nautilus instance to apply your new settings.

Enable Path Copying in Nautilus

For the most part, selecting and copying a file in most file managers will usually result in copying that exact file. However, there are instances where you want to copy some metadata for that file.

In Nautilus, it is possible to do this by installing nautilus-copy-path. This is a small extension that adds three new types of copy action: “Path, URI, and Name” on the file manager’s context menu. It’s also configurable and comes with keyboard shortcuts to automate actions.

To install this, run the following command to obtain the dependencies for the utility:

sudo apt install python3-nautilus python3-gi git make

Fetch the Git repository from the developer’s Github page:

git clone https://github.com/chr314/nautilus-copy-path.git
cd ./nautilus-copy-path

Navigate to the extension’s directory, then run the following command:

make install

Check whether your new extension is working by opening a context menu on a file.

Create Custom Context Menu Commands

Actions For Nautilus is a powerful extension that enables you to create custom menus, submenus, and commands for Nautilus in Linux. You can even create custom behavior depending on the type and number of the currently selected files.

Further, Actions for Nautilus also comes with a GUI tool which makes it incredibly easy to configure and get started with.

To obtain Actions for Nautilus, go to the project’s Github page and download the latest .deb package for the extension.

Once done, open a new terminal session, then navigate to your Downloads folder:

cd ~/Downloads

Get the optional dependencies for the extension from apt:

sudo apt install zenity xclip

Install the Actions for Nautilus utility by running dpkg on the .deb package:

sudo dpkg -i ./actions-for-nautilus_1.6.1_all.deb

Reload your Nautilus session to enable your new extension:

nautilus -q

Run Custom Scripts for Nautilus

It is also possible to run custom shell scripts directly from Nautilus. Unlike Actions for Nautilus, this native feature doesn’t have any GUI support nor a more granular way of filtering through file listings. Regardless, this can still be a handy way of adding custom actions if you don’t want to install third-party extensions.

To start, open a new terminal and navigate to the custom scripts directory for Nautilus:

cd ~/.local/share/nautilus/scripts

Create a new shell script file using your favorite text editor:

nano ./open-nano

Paste the following code inside your new script file:

#!/bin/bash
gnome-terminal -e "nano $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS"

Save your file, then set its permissions bits to execute using chmod:

chmod +x ./open-nano

Reload Nautilus to apply your new script:

nautilus -q

Test whether the script is working by right-clicking a file, then selecting your script under the “Scripts” submenu.

Learning how to tweak and use extensions in Nautilus is just the first in configuring Gnome. Discover more customization options for your desktop by looking at some of the best Gnome Shell Extensions today.

Image credit: ThisisEngineering RAEng via Unsplash (Background) and Wikimedia Commons (Logo). All alterations and screenshots by Ramces Red.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Sign up for all newsletters.
By signing up, you agree to our Privacy Policy and European users agree to the data transfer policy. We will not share your data and you can unsubscribe at any time. Subscribe


Ramces Red
Staff Writer

Ramces is a technology writer that lived with computers all his life. A prolific reader and a student of Anthropology, he is an eccentric character that writes articles about Linux and anything *nix.

Comments (2)