When starting fvwm or fvwm-crystal with startx and something like the following into ~/.xinitrc: exec ck-launch-session fvwm-crystal 2> .errors_fvwm-crystal I get the following error at the top of .errors_fvwm-crystal: ERROR: Can't find root menu file. According to this thread http://www.mail-archive.com/fvwm@fvwm.org/msg01641.html, it should be a /etc/xdg/menus/applications.menu or debian-menu.menu file. If I run fvwm-menu-desktop --verbose | xsel I get ... app dirs /usr/local/share/applications app dirs /usr/kde/3.5/share/applications app dirs /usr/share/applications app dirs /usr/share/gdm/applications app dirs /home/dom/.local/share/applications desktop dirs /usr/kde/3.5/share/desktop-directories:/usr/share/desktop-directories KDE legacy dirs /usr/kde/3.5/share/applnk /home/dom/.kde/share/applnk DEBUG: root menu is DEBUG: charset is UTF-8. DEBUG: language is fr_CH.UTF-8. DEBUG: root-cmd is kdesu. at /usr/bin/fvwm-menu-desktop line 215. ERROR: Can't find root menu file. I guess they changed something in the way fvwm is starting in fvwm-2.6.1. I try to put some Echo statement in my fvwm-crystal config, and this error message come before any config file is read by fvwm. Also, "ls /etc/xdg/menus/" give me: applications-merged gnome-screensavers.menu settings.menu ggz.menu kde-4.6-applications.menu xfce-applications.menu gnome-applications.menu kde-information.menu gnomecc.menu lxde-applications.menu No applications.menu file. If I try to symlink one of those files to applications.menu, the error message is gone, but I get a lot of "Name is not defined" messages instead: As root in /etc/xdg/menus/: ln -s gnome-applications.menu applications.menu As user: startx Same result with fvwm-menu-desktop --verbose | xsel Reproducible: Always Steps to Reproduce: 1. put "exec ck-launch-session fvwm 2> .errors_fvwm" in ~/.xinitrc 2. startx 3. tail -n 20 ~/.errors_fvwm Actual Results: "ERROR: Can't find root menu file." at the very top of ~/.errors_fvwm Expected Results: This error must not appear.
This belongs upstream. They ship a broken fvwm-menu-desktop script, and that script is called in the default config to create the root menu, so you get that message. I know about this because I was hit by this and I have had a number of conversations about this issue. They are working to fix the script, which seems to rely so heavily in kde-config, in the while, you have a couple of alternatives. If you have kde4 installed, you could just symlink /usr/bin/kde4-config to /usr/bin/kde-config, or You could modify the fvwm-menu-desktopp script to disable it. It's easy enough (as a workaround; fixing it is another issue). I'll attach a modified fvwm-menu-directory which will work this way: $ XDG_MENU_PREFIX=kde-4- .fvwm/scripts/fvwm-menu-desktop Or use the relevant preffix (look into /etc/xdg.....). MIND: THIS IS NOT A FIX. It just works ok for me, nothing else is guaranteed. ;)
Created attachment 276977 [details] fvwm-menu-desktop which will work around the kde-config bug Again, this is not a fix, it's just a temporal workaround until a proper fix is in place from upstream.
(In reply to comment #2) > Created attachment 276977 [details] > fvwm-menu-desktop which will work around the kde-config bug > > Again, this is not a fix, it's just a temporal workaround until a proper fix is > in place from upstream. No -- my understanding is that this has been fixed on branch-2_6 in CVS, or: https://github.com/ThomasAdam/fvwm/commit/c5dfd5a6e9ec2154fd644b0df36e463e467201d3 Does this somehow not work for you? I know I've not released 2.6.2, and won't be for a while. -- Thomas Adam
(In reply to comment #3) > (In reply to comment #2) > > Created attachment 276977 [details] > > fvwm-menu-desktop which will work around the kde-config bug > > > > Again, this is not a fix, it's just a temporal workaround until a proper fix is > > in place from upstream. > > No -- my understanding is that this has been fixed on branch-2_6 in CVS, or: Hello, Thomas. Well, it works as long as you define a valid XDG_MENU_PREFIX pointing to something under /etc/xdg/menus/*-applications.menu. Just running "fvwm-menu-desktop" will produce no output. > Does this somehow not work for you? I know I've not released 2.6.2, and won't > be for a while. I guess I could produce a suitable patch for 2.6.1 and apply it into the official ebuild.
(In reply to comment #4) > (In reply to comment #3) > > (In reply to comment #2) > > > Created attachment 276977 [details] > > > fvwm-menu-desktop which will work around the kde-config bug > > > > > > Again, this is not a fix, it's just a temporal workaround until a proper fix is > > > in place from upstream. > > > > No -- my understanding is that this has been fixed on branch-2_6 in CVS, or: > > Hello, Thomas. > > Well, it works as long as you define a valid XDG_MENU_PREFIX pointing to > something under /etc/xdg/menus/*-applications.menu. Just running > "fvwm-menu-desktop" will produce no output. Yes, that's how it should be. Something, or someone, has to determine which set of menus are wanted -- that can be done at any time, although I would recommend: export XDG_MENU_PREFIX="kde-" Or what have you, in whichever script Gentoo uses to set those things before X starts. > > Does this somehow not work for you? I know I've not released 2.6.2, and won't > > be for a while. > > I guess I could produce a suitable patch for 2.6.1 and apply it into the > official ebuild. You'll have to -- I still don't see how this fix applies upstream. -- Thomas Adam
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > (In reply to comment #2) > > > > Created attachment 276977 [details] > > > > fvwm-menu-desktop which will work around the kde-config bug > > > > > > > > Again, this is not a fix, it's just a temporal workaround until a proper fix is > > > > in place from upstream. > > > > > > No -- my understanding is that this has been fixed on branch-2_6 in CVS, or: > > > > Hello, Thomas. > > > > Well, it works as long as you define a valid XDG_MENU_PREFIX pointing to > > something under /etc/xdg/menus/*-applications.menu. Just running > > "fvwm-menu-desktop" will produce no output. > > Yes, that's how it should be. Something, or someone, has to determine which > set of menus are wanted -- that can be done at any time, although I would > recommend: > > export XDG_MENU_PREFIX="kde-" > > Or what have you, in whichever script Gentoo uses to set those things before X > starts. > > > > Does this somehow not work for you? I know I've not released 2.6.2, and won't > > > be for a while. But if you are not inside a major desktop (and I guess most fvwm users use it standalone) you get a default configuration that users this scripts but doesn't set the prefix, which gives you an empty menu. In any case, the script relies heavily in kde-config which is bad, as someone else acknowledged on the fvwm mailing list. So it needs fixing. > > > > I guess I could produce a suitable patch for 2.6.1 and apply it into the > > official ebuild. > > You'll have to -- I still don't see how this fix applies upstream. Because the script, in 2.6.1, which is the supported official version, won't produce any output, even if you set the xdg prefix adequately. Your git version will work, but that's neither released nor supported. So, the proper fix belongs upstream, as far as I can tell. We can patch the bug in 2.6.1 while 2.6.2 arrives, though. Current output for 2.6.1: ========================= $ XDG_MENU_PREFIX=kde-4- /usr/bin/fvwm-menu-desktop --verbose; ls /etc/xdg/menus/ DEBUG: foreach fvwm_app. INTERMEDIATE icons to use fvwm_title -> folder.xpm. INTERMEDIATE icons to use fvwm_app -> mini/mini-x.xpm. INTERMEDIATE icons to use fvwm_folder -> folder.xpm. INTERMEDIATE icons to use fvwm_toptitle -> mini-k.xpm. icons to use fvwm_title -> folder.xpm. icons to use fvwm_app -> . icons to use fvwm_folder -> folder.xpm. icons to use fvwm_toptitle -> mini-k.xpm. DEBUG: foreach fvwm_folder. INTERMEDIATE icons to use fvwm_title -> folder.xpm. INTERMEDIATE icons to use fvwm_app -> . INTERMEDIATE icons to use fvwm_folder -> mini/folder.xpm. INTERMEDIATE icons to use fvwm_toptitle -> mini-k.xpm. icons to use fvwm_title -> folder.xpm. icons to use fvwm_app -> . icons to use fvwm_folder -> . icons to use fvwm_toptitle -> mini-k.xpm. DEBUG: foreach fvwm_title. INTERMEDIATE icons to use fvwm_title -> mini/folder.xpm. INTERMEDIATE icons to use fvwm_app -> . INTERMEDIATE icons to use fvwm_folder -> . INTERMEDIATE icons to use fvwm_toptitle -> mini-k.xpm. icons to use fvwm_title -> . icons to use fvwm_app -> . icons to use fvwm_folder -> . icons to use fvwm_toptitle -> mini-k.xpm. DEBUG: foreach fvwm_toptitle. INTERMEDIATE icons to use fvwm_title -> . INTERMEDIATE icons to use fvwm_app -> . INTERMEDIATE icons to use fvwm_folder -> . INTERMEDIATE icons to use fvwm_toptitle -> mini/mini-k.xpm. icons to use fvwm_title -> . icons to use fvwm_app -> . icons to use fvwm_folder -> . icons to use fvwm_toptitle -> . desktop dirs /usr/share/desktop-directories KDE legacy dirs DEBUG: root menu is DEBUG: charset is UTF-8. DEBUG: language is es_ES.utf8. DEBUG: root-cmd is kdesu. at /usr/bin/fvwm-menu-desktop line 218. ERROR: Can't find root menu file. kde-4-applications.menu kde-information.menu
(In reply to comment #6) > But if you are not inside a major desktop (and I guess most fvwm users use it > standalone) you get a default configuration that users this scripts but doesn't > set the prefix, which gives you an empty menu. In any case, the script relies Yes -- and because of that, the user must set it themselves, because I don't agree that second-guessing them is a good thing. I'll update the documentation for this point. > heavily in kde-config which is bad, as someone else acknowledged on the fvwm > mailing list. So it needs fixing. That was I. > Your git version will work, but that's neither released nor supported. So, the Then that's all I wanted to know. I do not care it's broken in 2.6.1, I already knew this. -- Thomas Adam
Created attachment 277603 [details] patched ebuild for 2.6.1 x11-wm/fvwm ebuild to fix this issue, needed patch will follow
Created attachment 277605 [details, diff] Patch to make fvwm-menu-desktop actually work You need to set up XDG_MENU_PREFIX yourself. Look into /etc/xdg/menus to guess valid values ("gnome-", "kde-4-", etc).
This should be fixed in 2.6.2, not yet in portage.
(In reply to comment #10) > This should be fixed in 2.6.2, not yet in portage. +*fvwm-2.6.2 (08 Aug 2011) + + 08 Aug 2011; Jeremy Olexa <darkside@gentoo.org> -fvwm-2.5.30.ebuild, + -fvwm-2.6.1.ebuild, +fvwm-2.6.2.ebuild: + Version bump, bug 378251 - tested by Jesús Guerrero