In this tutorial, we will see how to add extra actions to the right-click menu of Nautilus (Ubuntu File Explorer). This can be done with the help of the nautilus-action utility. This tip is tested under Ubuntu 11.04/10.10/10.04.
Nautilus-Action Installation and Use
To install nautilus-action on Ubuntu, run simply this command via the Terminal:
sudo apt-get install nautilus-actions
After the installation is complete, let's now see a quick example of how to add an extra action to the right-click menu with nautilus-actions. The example consists of adding to the right-click menu the "Edit With Gimp" action to edit, for example, image files using The Gimp (Image Editor).
1. Using the dash search "nautilus-actions" and click Nautilus-Actions Configuration.
2. Click the Add icon.
3. Under the Action tab, fill the following fields:
- Context label: The text that will be displayed in the right-click menu, in our example, it's "Edit With Gimp".
- Icon: This option allows to select an icon for your action (optional)
4. Open now the Command tab and fill in the following fields:
- Label: Enter any label of your choice for your action.
- Path: Enter the path to the program you want to use using the Browse button. For our example, we will simply type "gimp".
- Parameters: Click the Legend button to get suggested parameters. In our example, we will use the %f parameter to be able to edit image files with The Gimp.
5. Click the Save button to save your command.
6. Right-click now on any image file, you will notice that the "Edit With Gimp" action is added to the context menu. If nothing appears, try to log out and log in the current running session, then right-click again on any image file.
Hot To Add The Shred Command To Your Context Menu
The shred command is very useful, especially when you want to delete a file completely so that it cannot be recovered. Here is how to add the shred command to your context menu (right-click menu) using Nautilus:
1. Launch Nautilus Actions Configuration Tool and add a new action, then fill in the Action tab with these details:
Context label: Shred
Tooltip: Delete files securely
2. In the Command tab, add the following details:
Parameters: -f -u -v -z %f
3. Click the Save button, then exit Nautilus Actions Configuration Tool.
4. Log out the current session and log on again, or simply restart Nautilus with these commands from the Terminal:
Then right-click on any file(s) you want to delete and select Shred:
5. The file(s) will be destroyed completely. If the command icon is not displayed in the context menu, then run this command from the Terminal:
gconftool-2 --type Boolean --set /desktop/gnome/interface/menus_have_icons True
You can do these steps to add other actions to the context menu, but make sure you select the appropriate parameter. You can also check the other tabs of the program to customize more your actions.