Created attachment 2669 set XDG_MENU_PREFIX in startxfce4 if not set. Assigning the bug to libxfce4menu, though it could be assigned to xfce-utils, garcon, and/or xfdesktop, but bugzilla doesn't permit to assign to multiple components.. According to http://library.gnome.org/devel/menu-spec/, XDG_MENU_PREFIX should be set to 'xfce-' by default by startxfce4 script, so that apps relying on it (say, py-xdg, since in 0.18) can find the correct applications.menu file instead of relying on symlinks as it's done now in most distros/packages. Second part of the issue, xfdesktop and libxfce4menu should try to use XDG_MENU_PREFIX instead of hardcoding xfce-applications.menu in xfdesktop-4.6.1/common/desktop-menu-utils.c and libxfce4menu-4.6.1/libxfce4menu/xfce-menu.c. And finally, had a quick look at how garcon deals with this, looking for applications.menu then xfce- then gnome- then kde- might be wrong. sometimes it's kde3-applications.menu/kde4-applications.menu.. so it should definitely try to use XDG_MENU_PREFIX if set. Even more if the longterm plan is to propose garcon for inclusion into glib...
Applied to master of garcon, xfce-utils and xfdesktop: garcon: commit ab3d16ac5fb3870d51e1217183a46183427bb218 Author: Jannis Pohlmann <jannis@xfce.org> Date: Sat Dec 4 12:47:13 2010 +0100 Add support for XDG_MENU_PREFIX (bug #5980). With this change, we can finally drop the code that tries to guess the default application menu file, which makes garcon useful for any desktop environment, regardless of the default .menu file they decide on. xfce-utils: commit f21ca48e5fa7b0386a524de6e9ced69c813c5f22 Author: Jannis Pohlmann <jannis@xfce.org> Date: Sat Dec 4 13:28:59 2010 +0100 Only set XDG_MENU_PREFIX if it's empty. AFAIK, there is no way to check whether the variable has been defined before. We only have the is-it-empty check. This makes it impossible to set XDG_MENU_PREFIX="" to override the "xfce-" prefix... perhaps someone knows a way? commit f9e552c4b599949425978e176e5b7222c985fe64 Author: Jannis Pohlmann <jannis@xfce.org> Date: Sat Dec 4 12:41:09 2010 +0100 Set XDG_MENU_PREFIX to "xfce-" and export it (bug #5980). xfdesktop: commit 7749a45105e9437403e953c1be947e8752ea0420 Author: Jannis Pohlmann <jannis@xfce.org> Date: Sat Dec 4 13:21:30 2010 +0100 Let Garcon decide what menu file to choose. Drop UserMenu kiosk option. Garcon now supports XDG_MENU_PREFIX which we can use to make xfce-applications.menu the default menu file in all our applications. This way, xfdesktop no longer needs to decide which file to pick on its own. The bad news is that this makes the UserMenu kiosk option nearly impossible. Therefor I decided to drop it; we don't restrict the application menu in the panel either, so why should we do here?