Kbuildsycoca5 returns ' "applications.menu" not found '

I’ve been having an odd issue after installing a large update yesterday, where krunner no longer recognises applications as things it can trigger. This is pretty inconvenient, since I use i3 as my window manager and generally don’t have another way to run applications besides whatever launcher. I’ve done some searching and found a post that suggested running kbuildsycoca5 --noincremental; this returned the following potentially indicative response:

"applications.menu" not found in ("/home/USER/.config/menus", "/etc/xdg/menus")

What do I need to do to regenerate this applications.menu file?

You need to use kbuildsycoca6, not kbuildsycoca5. I would also recommend completely logging out of Plasma, logging in at a tty, stopping sddm, emptying your ~/.cache/, and running kbuildsycoca6 from there. :point_down:

sudo systemctl stop sddm
rm -rf ~/.cache/*
kbuildsycoca6 --noincremental
sudo systemctl reboot

I tried following those instructions exactly (except ‘logging out of Plasma’ since I’m in i3, Plasma shouldn’t be running); and kbuildsycoca6 returned exactly the same error message and seems to have had no effect.

extra/plasma-workspace 6.0.4-1.0 (plasma)

Set XDG_MENU_PREFIX accordingly and retry.

Then, logout of i3 and follow the same instructions given;
and possibly a reboot also, before logging in again.

1 Like

Ah, yep, I think the issue is that $XDG_MENU_PREFIX is empty, but the applications menu file is plasma-applications.menu. I can bandaid it with a symlink to applications.menu, but I’d rather find the correct way to permanently set $XDG_MENU_PREFIX to "plasma-".

The document you linked to says nothing about setting that variable beyond this rather unhelpfully minimal summary -

In this case the $XDG_MENU_PREFIX environment variable must be set by the system to reflect the .menu file that is being used.

If the system isn’t setting that variable, how do I set it myself, or force the system to set it the way I want it?

(bizarrely, rofi -show drun has all the applications just fine; it’s only krunner that’s failing to recognise them)


I usually put big global env vars in /etc/environment, but it says .xinitrc.

This all seems more complex than I understand at this point. I’m giving up and switching to rofi, which seems to be 95% of what I need and has no problems at all.