PLEASE NOTE: This article is for earlier versions of Nautilus File Manager (2.x) found in earlier Ubuntu releases running on Gnome 2.x, so will not work in Unity (the default desktop environment) or Gnome Shell, both of which are based on Gnome 3.
You can add some extra buttons to your Nautilus toolbar, simply by editing a bit of text. What I’ll show you how to do is add buttons for “New Folder” (to create a new folder in the current one), standard editing tools “Cut“, “Copy” and “Paste“, as well as a “Trash” button (to move items to Trash).
There will be a separator after “New Folder“, and the new buttons will be in the centre of the toolbar, but you can leave out the separator (or add more), put the buttons wherever you want, and of course leave out any button you don’t think you’ll ever need.
You can also add an optional “Delete” button, which will bypass the Trash and permanently delete the selected item(s). While this sounds dangerous, you will get a warning message informing you of what you are about to do (unless you disabled that in Nautilus’ preferences), and you will need to click to proceed.
What you’ll be doing is editing a Nautilus configuration file, so we’ll back it up first, just in case. Simply copy the whole command below and paste it in a terminal, and it will backup nautilus-navigation-window-ui.xml before opening it up for editing:
cd /usr/share/nautilus/ui/ && sudo cp nautilus-navigation-window-ui.xml nautilus-navigation-window-ui-BACKUP.xml && sudo gedit nautilus-navigation-window-ui.xml
Copy the following text and paste it between the “Go to Computer” and “Zoom” toolbar entries near the bottom of the file:
<toolitem name=”New Folder” action=”New Folder”/>
<toolitem name=”Cut” action=”Cut”/>
<toolitem name=”Copy” action=”Copy”/>
<toolitem name=”Paste” action=”Paste”/>
<toolitem name=”Trash” action=”Trash”/>
If you want to maintain the formatting of the code, hit the Tab key once at the beginning of each line, so it looks like:
To add that “Delete” button, add the following code after the “Trash” entry (or wherever you want), and you can even add a separator between the two, to save you accidentally clicking the wrong one:
<toolitem name=”Delete” action=”Delete”/>
As you can see, it’s just plain text which you can move around and add to, so feel free to put things where you want and in whatever order you prefer. Then simply save the file once you’re finished, and to make the changes take effect without rebooting, you can force Nautilus to restart with the following command:
When you open the next folder window, your new buttons should be there. And if you want to edit the config file again in the future, just run the following command:
sudo gedit /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml
Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!