How do I Disable Context Menu Buttons like "Move To Other AppVM"?

Hello, does anyone know how to disable certain buttons in the context menu? I ask because the placement of some buttons, particularly “Move To Other AppVM”, would’ve caused me to lose important data on several occasions, if I had no backups.

I feel that an example would best explain the issue. Let’s say I need to copy over some important files from Qube A for use in a less-trusted Qube B. When I open the context menu in Qube A to copy over the files, the “Move To Other AppVM” button is right next to the “Copy To Other AppVM” button. As a result sometimes, my mouse cursor may slide over ever so slightly just before I click and I’d end up selecting “Move To Other AppVM” by accident instead. This operation will still copy the file to Qube B, like “Copy To Other AppVM” would, but the original file on Qube A will now be deleted.

This is a problem; now the only copy I have of this important file exists in the less-trusted Qube B.

Qube B is less-trusted (whether due to extra software, access to internet, etc.) and as a result, we must assume that the file in it could have been tampered with in some way. Copying the file back to Qube A is not an option.
There also seems to be no way to retrieve the file from within Qube A. The deleted file is nowhere to be found in the trash.
The only remaining option is to recover the file from an earlier backup, which would be cumbersome if this mistake happens somewhat often or if I’m outside at work, away from my backups.
The confirmation pop-up/window that shows up after clicking “Move To Other AppVM”, as shown below, doesn’t help either. The operation in the window, “qubes.Filecopy”, remains the same whether I select “Move To Other AppVM” or “Copy To Other AppVM”.


I’d greatly appreciate if someone knows of any way to remove certain operations/buttons from the context menu.

1 Like

These are nautilus extensions.
You’ll need to move all files from /usr/share/nautilus-python/extensions to somewhere else.

I guess you could also forbid the file copying/moving from the more trusted qubes to less trusted ones using the RPC policies: RPC policies | Qubes OS.

Well the thing is, I want to continue copying files between qubes. I just want to disable moving files so that I don’t accidentally choose that instead of copying.

You mean in dom0? I couldn’t find that directory there.
Also to clarify, I only want to disable the “Move To Other AppVM” button, not all the other inter-qube operation buttons. Would doing what you say accomplish that?

In the qube (VM) itself, that’s where the files are installed.
If you want to only remove the “move” option, delete or remove the file from there.
If you want to be more specific and apply that to more qubes, then you’ll need to use Qrexec RPC policies.

Remove the files? Just like that? Are you sure it won’t cause any future issues/conflicts?

If you don’t want to remove it, move it to somewhere else (in /home/user/ for example). It will breaks nothing since it’s only related to nautilus extensions.

1 Like

Okay, so I decided to use this command to remove the file:
sudo rm qvm_move_nautilus.py

But when I restart the qube to let the change take effect, the “Move To Other AppVM” button is still in the context menu. I go back to the same directory and the file is back there again. What do I do to stop it from coming back?

Do this in qube template or in qube using bind-dirs:

Or add this command in /rw/config/rc.local file in qube so it’ll be executed on every qube start.

That’s why I don’t use nautilus, beside other unfriendliness. In Thunar, it’s simple: Edit->Configure Custom Actions and delete/add there all desired entries

1 Like

Run the following commands in your qube, it will work without removing/moving any files or use bind-dirs:

mkdir -p ~/.local/share/nautilus-python/extensions
touch ~/.local/share/nautilus-python/extensions/qvm_move_nautilus.py

Re-open nautilus and it will be gone from the context menu.