Is it possible to hide the "Copy To" and "Move To" context menus?
I've just read this question and realized that I had never used either the "Copy To" or "Move To" context menu - is it possible to hide them?
Solution 1:
For 11.10 and earlier
Yes, edit the file:
/usr/share/nautilus/ui/nautilus-directory-view-ui.xml
and find the last instance of this:
<menu action="CopyToMenu">
<menuitem name="Copy to next pane" action="Copy to next pane"/>
<menuitem name="Copy to Home" action="Copy to Home"/>
<menuitem name="Copy to Desktop" action="Copy to Desktop"/>
</menu>
<menu action="MoveToMenu">
<menuitem name="Move to next pane" action="Move to next pane"/>
<menuitem name="Copy to Home" action="Move to Home"/>
<menuitem name="Copy to Desktop" action="Move to Desktop"/>
</menu>
and make the insides empty like this:
<menu action="CopyToMenu">
</menu>
<menu action="MoveToMenu">
</menu>
That should solve your problem.
Solution 2:
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:
The UI definitions are part of the application: modifying them is the equivalent of modifying the binary on disk.
In another response, Emmanuel goes into more detail and points out that:
It's not possible because now (in the interest of relocatability of the application, and to improve the startup time) the UI description file is "compiled" inside the binary itself; the UI description file is only available in the Git repository, and every change requires recompiling Nautilus.
Given that editing the UI file once installed was never a supported action for the reasons I pointed out in this thread, this is not a break in functionality.
What you want to achieve cannot be done with the current, or any future, version of Nautilus; the only way to do it is to actually modify Nautilus so that it can do what you want.
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.