On Mon, 18 Apr 2011 13:46:22 -0400 [email protected] wrote:
> Thomas Adam <[email protected]> writes:
>
> > On Mon, Apr 18, 2011 at 02:14:38PM -0300, Jim Diamond wrote:
> >> I am running fvwm 2.6.0 on Slackware64 13.1.
> >>
> >> When it starts up it (apparently) runs fvwm-menu-desktop, which
> >> sends out the following complaints:
> >>
> >> --------------------------------------------------------------------------
> >> WARNING: '/etc/kde/xdg/menus/applications-kmenuedit.menu' does not exist
> >> Unknown 'DefaultLayout':
> >> '
> >> DestroyMenu "FvwmMenu"
> >> AddToMenu "FvwmMenu" "KDE Menu" Title
> >> --------------------------------------------------------------------------
> >>
> >> I don't see anything in my configuration which is asking fvwm to call
> >> this program.
> >>
> >> Should I be getting this without asking for it, or am I doing
> >> something wrong. (If the latter, my apologies for the noise.)
> >
> > It's coming from fvwm-menu-desktop which is called from fvwm.c in liey of no
> > config found, *or* your config doesn't override the builtin menu.
>
> There's no way to override the creation of the built in menu.
> There probably should be.
Yes, the current behavior (always invoking fvwm-menu-desktop at
startup) is highly undesirable (in particular, scanning all those
*.desktop files may take several seconds with a cold cache).
> Is there a way to defer creation of the menu until it is invoked?
It is possible to create the menu at the first popup attempt:
--- fvwm-2.6.1/fvwm/fvwm.c.builtin-menu-delayed 2011-04-18 21:37:58.000000000
+0400
+++ fvwm-2.6.1/fvwm/fvwm.c 2011-04-18 21:43:53.860000011 +0400
@@ -1429,7 +1429,7 @@ static void SetRCDefaults(void)
{ "Key Up M A MenuMoveCursor -1", "", "" },
{ "Key Down M A MenuMoveCursor 1", "", "" },
{ "Mouse 1 MI A MenuSelectItem", "", "" },
- { "PipeRead 'fvwm-menu-desktop --enable-mini-icons
--fvwm-icons'", "", "" },
+ { "AddToMenu FvwmMenu DynamicPopupAction PipeRead
'fvwm-menu-desktop --enable-mini-icons --fvwm-icons'", "", "" },
/* don't add anything below */
{ RC_DEFAULTS_COMPLETE, "", "" },
{ "Read "FVWM_DATADIR"/ConfigFvwmDefaults", "", "" },
This will cause slowdown on the first attempt to use that menu - which
is probably acceptable for a fallback menu, but not so good for an
actual user configuration. But there should not be many existing
configs which depend on the builtin FvwmMenu definition (this feature
was added just before the 2.6.0 release), and adding explicit
"PipeRead 'fvwm-menu-desktop --enable-mini-icons --fvwm-icons'" to a
custom ~/.fvwm/config will fix the problem (and will be required
anyway if some customization of fvwm-menu-desktop options is desired).
>
> > I am not too surprised to see the above, but I don't have the environment
> > installed to reproduce it, as that would mean KDE being installed. The
> > error comes from interpret_menu() -- which it will then spit out the above
> > as a last resort.
> >
> > Probably nothing to worry about, it's just this script is perhaps overly
> > chatty.
>
> I think it's a bug in the kde config files.
Actually <DefaultLayout> and <Layout> are valid freedesktop menu tags,
but they are not implemented in fvwm-menu-desktop. These tags are
optional, but should be ignored silently instead of printing such
debug output.