Tweak Nautilus to better suit your needs

Jack Wallen
Jul 21, 2010
Updated • Dec 5, 2012
Linux
|
10

If there's one thing that Linux has it's flexibility. And this is true from the top down; from the desktop environment all the way down to the kernel. One area that offers a lot of tweaks, one that most new users aren't used to being able to tweak, is the file manager. This is true for both the GNOME file manager and the KDE file manager. The GNOME file manager is Nautilus. I've written about it before here on Ghacks (see Nautilus-related content on Ghacks) and I thought I should show you some further explorations of one of the strongest file managers for the Linux desktop.

In this article I will show you how to deal with such issues as handling media, handling the deletion of files, browsing Nautilus as the root user, and maybe more. Read on Macduff!

Handling media

Figure 1

If you open up Nautilus to any of your folders that contain media and double click on any of those files, most likely Nautilus will ask you what to do with that file (unless you've already set a default application for that file type). Did you know, however, that you can instruct Nautilus what to do with just about any media type you can think of? Sure! Here's what you need to do:

  1. Open up Nautilus.
  2. Click on the Media tab (see Figure 1).
  3. From the media type you are wanting to change select the action you want from the drop down.
  4. From the Other Media section you can set up less common media formats, and how you want Nautilus to handle them.

That's it. You will notice, from the drop downs, there are already applications pre-configured to handle certain media types. If you don't see the application you want to use just select Open with other application and then (in the new window) navigate to the executable for the application you want to use (usually in /usr/bin).

Now when you double click on of those media types the action you have configured will occur.

Deleting files

Have you noticed, if you right-click a file within Nautilus, your only option for deleting a file is to send it to the Trashcan? What if you KNOW you want that file gone (and not saved for later un-deletion)? Well, that is not a problem. You can easily add a Delete option to your right-click action menu. To do this click Edit > Preferences and then, from the Behavior tab, check the box for Include a Delete command that bypasses Trash. After you have done that, click Close on the Preferences window and now, when you right-click a file, you will see a Delete entry.

Open a root user Nautilus window

There are times you just need the power of root - even in your file manager. By default the only way to do this is to open up a terminal window and issue the nautilus command with either sudo or after you have su'ing to the root user. That is not the case. Here's what you do:

1. Open up a terminal window.

2. Issue the command sudo nano /usr/share/applications/Nautilus-root.desktop

3. Add the following to that file:
[Desktop Entry]
Name=File Browser (Root)
Comment=Browse the filesystem with the file manager
Exec=gksudo "nautilus --browser %U"
Icon=file-manager
Terminal=false
Type=Application
Categories=Application;System;

Save that file and then click Applications > System Tools > File Browser (Root) and (after entering the root user password) you will have a Nautilus browser open as the root user! Handy.

Final thoughts

The configurations you can undertake with the Nautilus file manager seem limitless. In this article you have seen three such configurations, but you know there are plenty more where that came from. I hope these three tips have made your Linux file browsing much easier.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. kilgore said on April 27, 2013 at 10:18 am
    Reply

    How to fix messed up sudo nano /usr/share/applications/Nautilus-root.desktop??
    It probably worked on 10 or 10.04 but it keeps creating tmp files now and doesnt do what its supposed to do.

  2. kilgore said on April 27, 2013 at 10:16 am
    Reply

    I am using 13.04 and it screwed up everything. How do I fix it. I have three copies of that file nautilus-desktop and noway to rid them

  3. Craig said on August 3, 2010 at 7:17 am
    Reply

    For the Nautilus as root – I’d suggest changing the background colour (to red perhaps) so that you don’t forget which Nautilus window is running as root and cause major damage.

    Select Edit – Backgrounds and Emblems
    Then Colors
    Then drag and drop red (Fire Engine Red perhaps) onto the background of Nautilus

    That will be the colour of all your Nautilus backgrounds when logged in as Root

  4. tmx said on July 22, 2010 at 7:31 am
    Reply

    I DEMAND to know what theme/gtk engine you are using in that screenshot with the glass theme. I looks excellent.

    I recommend using Nautilus Elementary which is Nautilus with a bit nicer
    interface. You can download nautilus extensions as well (find them by searching ‘nautilus’ in Synaptic) that add features like ‘set as wallpaper’, ‘open in terminal’ and convert music files.

    On top of that, you can install ‘Gloobus’ which will give Nautilus Elementary the feature to preview files like how you press ‘Space’ in Mac’s Finder.

    https://launchpad.net/~am-monkeyd/+archive/nautilus-elementary-ppa
    http://gloobus.net/download/

  5. Pedro said on July 21, 2010 at 5:24 pm
    Reply

    do you know if there is multi-file renaming with nautilus like how there is with thunar? I’m running xubuntu 10.04 and the default file manager is thunar but i also have nautilus installed (for dropbox). I like how thunar has built in support for renaming multiple files. But there are times when I forget i’m using nautilus and I have to open thunar and navigate back to where I was in nautilus.

  6. Dave said on July 21, 2010 at 2:33 pm
    Reply

    Hi Jack,
    nice post as always. However, one minor complaint: While showing off your desktop environment’s nifty transparency features is cool in and of itself, it doesn’t really add to the readability of the posted figures / pictures. Just sayin’…

    Thanks for waving the Linux flag!
    -Dave

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.