11.10 onwards
Maybe this might work:
Nautilus scripts the bullets state, amongst others:
- Move To... #selected files/folders to ... whereever you want. the script will check if you have write-permissions and if the file already exists
- Copy To...
Pick the 2 scripts from the download link and just install those just to see if it works. It is fairly old but the way Nautilus works had not changed for as far as I know.
To add menu items to can write a Nautilus extension, like
from gi.repository import Nautilus, GObject
class MyItemExtension(GObject.GObject, Nautilus.MenuProvider):
def get_file_items(self, window, files):
menuitem = Nautilus.MenuItem(name='MyItem::SomeItem',
label='My Item',
tip='my own item',
icon='')
menuitem.connect('activate', self.on_menu_item_clicked, files)
return menuitem,
def on_menu_item_clicked(self, item, files):
print [f.get_name() for f in files]
Save this into something like /usr/share/nautilus-python/extensions/myitem.py
, install the package python-nautilus
and restart Nautilus, for example by running nautilus -q; sleep 2; nautilus
. Now you should see a new item "My Item" if you rightclick a file.
As far as I know there is no documented way to remove menu items.
The see API reference for some more information.
Best Answer
It is unfortunately not possible to do this in either 12.04 or 12.10, because of the changes to
Nautilus
and the removal of/usr/share/nautilus/ui/nautilus-directory-view-ui.xml
. It has been asked very recently (June 2012) in the gnome nautilus mailing lists, and it is clear from the developers' responses that one would now have to download the source code, patch it, and then recompile it to eliminate or hide the copy to and move to menus.Emmanuel Bassi, a gnome developer, responded to the same request on the mailing list by noting that:
In another response, Emmanuel goes into more detail and points out that:
This is the official position on
Nautilus
, and so the only thing to do is to suggest a patch, or simply prepare your own patch and build your own custom version. The source code that you need is available from the git repository.There is no dirty 'hack' that can accomplish what you want at the moment, as the developers have explained. It may change in the future, but this is the current state of affairs.