1

Is there a recommended way to remove unwanted menu shortcuts from the application menu (XDG standards compliant). I've got a few packages that tend to install multiple shortcuts even though I only need one of them, for example Xonotic installs shortcuts:

  • Xonotic (SDL)
  • Xonotic (GLX)

But since I have no need to use the GLX binary, it'd be good to remove the unneeded shortcut. In the past, I've simply deleted the second shortcut file, but I've found that just results in the shortcut being reinstalled the next time I update the package.

I'd like to be able to remove them more permanently, as I like to use the alt-f2 launcher and would prefer not to have to worry about accidentally starting the wrong program.

  • If you want to change what appears in the menu, edit the menu. I believe in KDE, if you right-click menu button, you will get a menu configuration option. If you install a new application, it will generally get added to the menu, but updating a package shouldn't affect the menu. – fixer1234 Jul 18 '16 at 6:23
  • Another option would be to leave them in the menu, but create a menu branch to hold items you don't want to see. Then stash everything you don't want to wade through there. – fixer1234 Jul 18 '16 at 6:31
  • It's not so much the removing them bit that's the problem - it's making sure they stay removed when the next system update rolls around (because it will usually reset everything to where it was). – Adam Luchjenbroers Jan 2 at 5:37
1

The way the menu works is a bit convoluted. It isn't surprising that just deleting the files results in the menu entries returning when the files get put back during an update.

When you install a package, it includes menu information files that support the menu entries. When you update a package, it basically reinstalls the package using the latest components (but doesn't replace your existing application configuration files). So if you delete application files, they will be put back when the package is updated.

The menu system looks for those individual menu information files and incorporated them into the menu. Then there are customization files that tell the menu system what to change from that baseline.

When you edit the menu (in KDE it's usually accessible by right-clicking the main menu icon, but sometimes there's a separate menu editing app), it edits the customization files. So if you tell it to delete an entry, it doesn't really remove anything, it instructs the menu system to ignore the application's menu information file if it exists.

Editing the menu to remove entries you don't want should survive updates.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.