Not sure of the original motivation, but I think it's time has come and gone. Problems: 1. When in use, it doesn't show any subsubmenus, ie Office->More Applications 2. Wreaks havoc with menu editors, like kmenuedit and kiosktool
I cleaner implementation (that actually follows spec) would be to set $XDG_CONFIG_DIRS to point to a different location (holding applications.menu).
It's vitally important this get fixed before (wide) deployment of menu editors.
Problem being that if/when anyone *does* use a menu editor, menus can (not always?) end up blank. Only workaround is to undo any previous menu mods: remove/rename ~/.config/menus run: kbuildsycoca
Have I mentioned this hack makes using $XDG_CONFIG_DIRS non-functional? (:
Here's the implementation I've been using for awhile now in kde-redhat packaging: 1. Drop use of Patch7: kdelibs-3.4.0-menu.patch which hard-codes use of /etc/xdg/menus/kde-applications.menu 2. Use this snippet in kdelibs.spec: ## menus pushd $RPM_BUILD_ROOT%{_sysconfdir}/xdg/menus/ mv applications.menu kde-applications.menu ln -s applications-merged kde-applications-merged popd ## xdg.d/ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/xdg.d/kde/menus pushd $RPM_BUILD_ROOT%{_sysconfdir}/xdg.d/kde/menus ln -s ../../../xdg/menus/kde-applications.menu applications.menu popd You could alternatively simply move /etc/xdg/menus/applications.menu to /etc/xdg.d/kde/menus/applications.menu and skip the symlinks (I don't think they help backward-compatibility-wise anyway). 3. Set $XDG_CONFIG_DIRS I chose to do this in kdebase, creating /etc/kde/env/kde-menus.sh containing: ## from http://standards.freedesktop.org/menu-spec/latest/ # XDG_CONFIG_DIRS: where to look for menu config(s) if [ -z "${XDG_CONFIG_DIRS}" ]; then XDG_CONFIG_DIRS=/etc/xdg.d/kde:/etc/xdg export XDG_CONFIG_DIRS fi It's not completely clear to me (from reading the spec) whether including /etc/xdg explicitly in XDG_CONFIG_DIRS is absolutely required, but I figured it doesn't hurt either.
it's fixed in new kdelibs-3.5.2-3/kdebase-3.5.2-7. Thanks for your report.
Arg, I see kdelibs-3.4.0-menu.patch is back, which effectively disables the use of $XDG_CONFIG_DIRS.
I suspect kdelibs-3.4.0-menu.patch was reintroduced, because of reported crashes due to its removal (notably from users who had previously used kmenuedit and had ~/.config/menu bits referencing kde-applications.menu).
ping, any comment? I'm (still) receiving reports about kiosktool not working correctly due to this.
ok, i have reread the menu-spec. We should avoid adding of extra directories for KDE menu. I think the correct fix is to use XDG_MENU_PREFIX as in menu-spec . there's the fix cat /etc/kde/env/env.sh if [ -z "${XDG_MENU_PREFIX}" ] ; then XDG_MENU_PREFIX="kde-" export XDG_MENU_PREFIX fi install KDE applications.menu into /etc/xdg/menus/kde-applications.menu The fix will be included in next kdelibs-3.5.4-9.fc6.
Nice, even better, thanks.
Your idea of trying to use XDG_MENU_PREFIX was a good one, but unfortunately kdelibs didn't support it (as of 3.5.5). I'll attach a patch recently applied upstream to address that, so that we can try it out.
Created attachment 143053 [details] upstream patch to enable use of XDG_MENU_PREFIX
yes i have seen the fix commited in 3.5 tree, it will be included in next kdelibs rebuild. I hope it will not cause any menu problem with XDG_MENU_PREFIX. Anyway thanks for your attached patch!
I've confirmed that using XDG_MENU_PREFIX (with patch) now works as advertised. yay.