Thursday, December 30, 2010

Add Buttons for New Folder, Copy, Cut, Paste and Delete to the Nautilus Toolbar [GNOME]

Although I am particular to use keyboard shortcuts, I always thought that all graphical interface should have the necessary visual elements to make every user's work more productive.

In the case of Nautilus, the default file manager in GNOME, I feel your toolbar lacks basic functionality : Create new folder, cut, copy and paste files and elimination (to trash) of themselves.

To me understand better what I want is to change this:


to this:


Thanks to the great freedom that Linux offers, we can add these buttons so very easily, without needing to install anything (like typical patches and hacks in Windows), just modifying the text file nautilus-navigation-window-ui.xml found in the folder /usr/share/nautilus/ui/.

First, we will support the file in question, so we can easily recover our original settings if something comes out wrong (never forget Murphy's Law).
  • cd /usr/share/nautilus/ui/
  • sudo cp nautilus-navigation-window-ui.xml nautilus-navigation-window-ui-RESPALDO.xml
ow, with your favorite text editor (vim, nano, gedit, etc), open the configuration file:
  • sudo gedit nautilus-navigation-window-ui.xml
At the end of this file, which are specified which buttons appear in the Nautilus toolbar, through statements <toolitem name="..." action="..."/>; as a separator for each button is used <separator/>.

To add the buttons you want, just have to paste the following statements in the position we most like:
  • <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"/>
You can use spacers if you like. As an example, so I moved my buttons:
  • <toolbar name="Toolbar">
  •     <toolitem name="Back" action="Back"/>
  •     <toolitem name="Forward" action="Forward"/>
  •     <toolitem name="Up" action="Up"/>
  •     <toolitem name="Reload" action="Reload"/>
  •     <separator/>
  •     <toolitem name="Home" action="Home"/>
  •     <toolitem name="Computer" action="Go to Computer"/>
  •     <separator/>
  •     <toolitem name="New Folder" action="New Folder"/>
  •     <separator/>
  •     <toolitem name="Cut" action="Cut"/>
  •     <toolitem name="Copy" action="Copy"/>
  •     <toolitem name="Paste" action="Paste"/>
  •     <separator/>
  •     <toolitem name="Trash" action="Trash"/>
  •     <separator/>
  •     <toolitem name="Zoom" action="Zoom"/>
  •     <toolitem name="ViewAs" action="ViewAs"/>
  •     <toolitem name="Search" action="Search"/>
  •     <placeholder name="Extra Buttons Placeholder">
  •               <placeholder name="Extension Actions"/>
  •         </placeholder>
  • </toolbar>
Saves changes and exit your text editor. Finally, we must restart Nautilus for the changes are applied.
killall nautilus
That's it!

The procedure mentioned I've tried in ArchLinux and Ubuntu, so I can infer that also applies to any other Linux distro you use a recent version of GNOME.
If this article was useful and you want to help us to grow Subscribing to our feed or Click "Like" in our Facebook page ,or follow us via Twitter or subscribing to our feed.

People who read this post also read :



0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More