Ongoing issues with Qmenu shortcuts, how to manually remove?

one example, I have FooAppVM in my Qmenu shortcuts, but there is not FooAppVM, I deleted it long time ago

Can I go into dom0 somewhere and safely delete its reference? or please suggest something else

so the Qmenu shortcut AppVM I would like to be rid of is called computer9
your link with notes added

## Fixing shortcuts

First, try this in dom0:

* *$ qvm-appmenus --update --force <vm_name>* *

If that doesn’t work, you can manually modify the files in ~/.local/share/applications/ or /usr/local/share/applications/ .

For example, suppose you’ve deleted my-old-vm , but there is a leftover Application Menu shortcut, and you find a related file in ~/.local/share/applications/ .
In dom0:

* *$ rm -i ~/.local/share/applications/my-old-vm-** *

## Behind the scenes

qvm-sync-appmenus works by invoking GetAppMenus Qubes service in the target domain. This service enumerates installed applications and sends formatted info back to the dom0 script ( /usr/libexec/qubes-appmenus/qubes-receive-appmenus ) which creates .desktop files in the AppVM/TemplateVM directory.

For Linux VMs the service script is in /etc/qubes-rpc/qubes.GetAppMenus . In Windows it’s a PowerShell script located in c:\Program Files\Invisible Things Lab\Qubes OS Windows Tools\qubes-rpc-services\get-appmenus.ps1 by default.

The list of installed applications for each AppVM is stored in dom0’s ~/.local/share/qubes-appmenus/<vmname>/apps.templates . Each menu entry is a file that follows the .desktop file format with some wildcards ( %VMNAME% , %VMDIR% ). Applications selected to appear in the menu are stored in ~/.local/share/qubes-appmenus/<vmname>/apps .

Actual command lines for the menu shortcuts involve qvm-run command which starts a process in another domain. Examples: qvm-run -q -a --service -- %VMNAME% qubes.StartApp+7-Zip-7-Zip_File_Manager or qvm-run -q -a --service -- %VMNAME% qubes.StartApp+firefox

Note that you can create a shortcut that points to a .desktop file in your AppVM with e.g. qvm-run -q -a --service -- personal qubes.StartApp+firefox .

there is No computer9 in .local/share/qubes-appmenus/
nor in
so there is no way to manually remove anything
in dom0 qvm-appmenus --update --force isn’t going to work because per the Qubes Manager it doesn’t exist

I do admit I’m sure I follow the 2nd half of the instructions as per what they mean.

I did do a

I’m not sure you’re right about how it works. You should still that command first, since that’s what the documentation recommends to try first.

can someone think of a reason why I can’t
dom0 can’t sudo cd /home/user/.local

I can do a ls -l ~/.local and see files there but not sudo cd

maybe its a ‘feature’ ? I am trying Still to delete a non-existing AppVM’s .desktop shortcuts


I also am unable to $sudo cd /root , is this also by design?

The command is working but nothing results from it. From my understanding when you do sudo it opens a subshell and runs that command – so it changes directory and then exits that subshell (returning to the directory of the parent shell)

you probably can just do sudo rm /path/to/file to remove it.

But in this case all things under ~/.local seem to be under the regular user. So there should be no need for sudo.

1 Like

This is basic Linux command-line stuff, not Qubes-specific. In short: You’re trying to do it the wrong way.

This is clearly an XY Problem. I’m guessing that what you’re really trying to do is something like sudo rm -i ~/.local/share/applications/my-old-vm-*.

1 Like

Even better.

1 Like

not so basic to me, sorry, disregard that part.

so now when I do $sudo find / -name computer1
nothing is found.
But, the reference is Still in my shortcuts

I , therefore, see nothing else I can manually do ?

(I merged this into your previous thread on the same topic in order to make it easier to follow.)

Try: ls -l ~/.local/share/applications/ and see whether the offending VM is mentioned anywhere.

andrew, there is no reference to it there.

since there is No AppVM there is No AppVM to reference for the command
qvm-appmenus --update

though, the shortcut must be referenced Somewhere

thank for your patience

You’re absolutely certain that it isn’t mentioned anywhere in the output of ls -l ~/.local/share/applications/?

If that’s truly the case, then I’m afraid I have no more ideas to help you. The only way such a shortcut should be able to exist is to have a corresponding file in that directory. If there really is no such file, then I don’t understand how the shortcut could exist.

a reference to the AppVM (that has no AppVM) in /usr/local/share/applications

so do I just go into that Dir and delete all the references to the app.desktop ?

bit hestitant to manually edit /usr/local/share in dom0 ?

or shouldn’t be?

Always make backups!

You can simply rename the file to see if that removes the offending shortcut, e.g.:

foo.desktop -> foo.desktop.bak

do you backup dom0 when you backup?


  1. whta version of qubes release?

  2. how did you delete the qube in question?

not sure, but all this may have transpired because I wanted to use /install an application that had no package, …eventually I just installed it in each AppVM, but then I wanted a shortcut to launch it, and created something in the Template so it would appear in the Q -Menu for the AppVMs…

I may also have initially attempted to install the application in the Template, when apparently it belongs in each individual AppVM ? esp since it requires some unusual build in .venv ; (qutebrowser up to date versions)