I don't use Backups in my PC, since I don't have enough hard drive space. How can I remove the "Restore Missing Files…" entry from my context menu?
Ubuntu – Remove “Restore Missing Files…” from the context menu in Nautilus
nautilus
Related Solutions
Your (short) script seems not to do the job as a nautilus script, but here on Ubuntuforums, I found one that works quite nicely. It has some more advanced options, as described in the poster's comment on Ubuntuforums:
"Note: This is non-recursive by default, so it will only operate on the specific folder and files that you have selected. If you want recursive behavior - uncomment the "#RECURSIVE=-R;" line. It is left out be default since the risk of messing up ownerships is pretty big when something like this gets so easy. "
How to use
The script below is copied without a change. Paste it in an empty file and save it in ~/.local/share/nautilus/scripts
(the script's comment mentions ~/.gnome2/nautilus-scripts
, but that seems outdated) , make it executable, and after log out / in, it will be available in the context menu (under > scripts
).
Note: you need gksu to be installed to use it
#!/bin/bash
#Title=Make owned by current user
#Title[se]=Gör nuvarande användare till ägare
# Make owned by current user - Makes the selected files owned by the current user with group
# being the user's primary group (the first in the output from the "groups" command)
# Installation:
# Put this script into the Nautilus script dir (~/.gnome2/nautilus-scripts) and make it executable.
#
# Usage:
# Right-click on files in Nautilus and choose Scripts -> Make owned by current user
#
# Notes:
# This operates non-recursively by default, so it will only operate on the specific folder and files that
# you have selected. If you want recursive behavior - uncomment the "#RECURSIVE=-R;" line further down.
# It is left out be default since the risk of messing up ownerships is pretty big when something
# like this gets so easy.
#
# Acknowledements and version history:
# v20080131 - Fredrik Wollsén
#
# License GPL v3
#
# Feel free to provide feedback on this script here:
# http://ubuntuforums.org/showthread.php?t=683945
#
# Suggestions for improvements:
# - Show a zenity dialogue box to dynamically decide whether or not the command
# should be run recursively or not.
# - Show a zenity progress bar for the execution of the command.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
USER=`whoami`;
GROUP=`groups | sed -r 's/ .*//g'`;
#RECURSIVE=-R; # Uncomment this to make the ownerships be implemented resursively
# default to a group name identical to the username if a group is not found (is this case even possible? this if-statement could be totally useless - but: better safe than sorry...)
if [ "$GROUP" == "" ] ; then
GROUP=$USER;
fi
gksudo -- chown -v $RECURSIVE $USER:$GROUP "$@"| zenity --text-info --height=100 --width=300;
exit 0;
Some of the right-click options in Files (nautilus) are determined by systemwide nautilus extensions, and may indeed be removed by removing that extension.
To remove the "E-mail" option:
sudo apt remove nautilus-sendto
Removing the "Compress" option is less obvious. This comes installed with the file compression utility file-roller. You will remove the option with the following command, but you also will remove the file compression utility file-roller:
sudo apt remove file-roller
If you want to remove only the option, but keep the application file-roller, then you need to resort to an unsupported hack: rename (or delete) the file `/usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so'.
sudo mv /usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so /usr/lib/x86_64-linux-gnu/nautilus/extensions-3.0/libnautilus-fileroller.so.old
To restore, just switch the two file paths.
This is "unsupported", because you operate out of the packet management at the file level. An upgrade in file-roller will put the file back, so you then will need to repeat the process.
Best Answer
The extension for this menu entry is in the package
deja-dup
.Therefore and as you don't use backups (really? You should read this.), a simple solution. Remove Déjà Dup from your system:
and the menu entry will disappear.
Unfortunately this solution is like you having cancer and not wanting to take any chemo-therapy because it makes you feel bad. The better solution is to actually do backups, because otherwise we'll see each other again in a few years when your hard drive blows up and you've lost all your data!