On Wed, Apr 27, 2011 at 09:06:31PM -0400, des...@verizon.net wrote: > Thomas Adam <tho...@fvwm.org> writes: > > > On Tue, Apr 26, 2011 at 09:31:02PM -0400, des...@verizon.net wrote: > >> Jesús J. Guerrero Botella <jesus.guerrero.bote...@gmail.com> writes: > >> > >> > $ ls /etc/xdg/menus/ > >> > kde-4.6-applications.menu kde-information.menu lxde-applications.menu > >> > > >> > I can send you the files if you need to take a look inside. > >> > >> Yes, send me lxde-applications.menu. > >> It's the only one of those that I don't have. > >> > >> I think kde-4.6-applications would serve as a main menu, but > >> obviously, a name like that is a moving target. > > > > Can't we just glob() for these or do a readdir() on these? > > No, you're on the wrong track. > > All that needs changing is the identifier for the root menu. > > This code: > > my @menu_bases = (qw( > applications > debian-menu > ) > ); > > Just add lxde-applications to that list like this: > > my @menu_bases = (qw( > lxde-applications > applications > debian-menu > ) > ); > > and you'll be in business. > > But none of this makes sense to me. > The code we are using came from arch-linux. > > I'll see if I can figure out what they've been up to.
OK -- it seems a bit stupid to me. But: http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html Says: $XDG_CONFIG_DIRS/menus/${XDG_MENU_PREFIX}applications.menu This file contains the XML definition of the main application menu layout. The first file found in the search path should be used; other files are ignored. This implies that if the user has their own ${XDG_MENU_PREFIX}applications.menu, it replaces the system wide one. (Though the user's menu may explicitly merge the system wide one.) Systems that offer multiple desktop environments and that want to use distinct menu layouts in the different environments can use differently prefixed .menu files. In this case the $XDG_MENU_PREFIX environment variable must be set by the system to reflect the .menu file that is being used. For example if a system contains both the GNOME and the KDE desktop environments it can decide to use gnome-applications.menu as the menu layout in GNOME sessions and kde-applications.menu as the menu layout in KDE sessions. To correctly reflect this, it should set the $XDG_MENU_PREFIX environment variable to "gnome-" respectively "kde-". Implementations may chose to use .menu files with other names for tasks or menus other than the main application menu. Such usage is not covered by this specification. But we're not setting or using XDG_MENU_PREFIX, so perhaps we ought to be. -- Thomas Adam -- "Deep in my heart I wish I was wrong. But deep in my heart I know I am not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)