/etc/xdg/menus/applications.menu is being provided by both, causing to get messed menus under gnome just after merging kdelibs (and running dispatch-conf). There seems to be some possible solutions for this: 1. Patching kdelibs for using, for example, kde4-applications.menu instead of applications.menu (this is the way chosen by debian, look at http://patch-tracking.debian.net/patch/series/view/kde4libs/4:4.2.0-2/11_default_kde4_xdg_menu_prefix.diff , and also chosen by fedora, look at ftp://ftp.free.fr/pub/Distributions_Linux/Fedora/development/source/SRPMS/kdelibs-4.2.0-4.fc11.src.rpm : # see also use-of/patching of XDG_MENU_PREFIX in kdebase/kde-settings mv %{buildroot}%{_kde4_sysconfdir}/xdg/menus/applications.menu \ %{buildroot}%{_kde4_sysconfdir}/xdg/menus/kde4-applications.menu 3. Move both, creating kde and gnome subdirs under /etc/xdg/menus (this is the mandriva's way: ftp://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/devel/cooker/SRPMS/main/release/kdelibs4-4.2.0-2mdv2009.1.src.rpm ftp://ftp.free.fr/pub/Distributions_Linux/MandrivaLinux/devel/cooker/SRPMS/main/release/gnome-menus-2.25.5-4mdv2009.1.src.rpm But I don't know which one would be better :-/ Thanks a lot :-) 2. Move gnome-menus provided file to something like gnome-applications.menu (this is the opensuse's way: http://download.opensuse.org/factory/repo/src-oss/suse/src/gnome-menus-2.24.1-3.15.src.rpm # Rename applications.menu to not collide with other desktops: mv $RPM_BUILD_ROOT/%{_sysconfdir}/xdg/menus/applications.menu $RPM_BUILD_ROOT/%{_sysconfdir}/xdg/menus/gnome-applications.menu Reproducible: Always
Ups, I accidentally moved the text just before sending causing "2. ..." to be at end of report :-S
OMG, maybe GNOME and KDE should block each other. :)
Nah, just remove KDE from the tree... :P
Actualy find me brave person that will install kde and gnome on one pc :P
(In reply to comment #3) > Nah, just remove KDE from the tree... :P In the spirit of equality, why not remove both? *wink* *wink*, *nudge*, *nudge*
(In reply to comment #4) > Actualy find me brave person that will install kde and gnome on one pc :P Bought the T-shirt.
(In reply to comment #3) > Nah, just remove KDE from the tree... :P > CCing tree-cleaners... *g*
Nirbheek, nice but let's not get this go too far shall we? :) @treecleaners, sorry for the noise. The new guy will be properly reprimanded. Cheers
(In reply to comment #7) > (In reply to comment #3) > > Nah, just remove KDE from the tree... :P > > > > CCing tree-cleaners... *g* > Oh my, I see I'm going to have some forced "vacations" ;-) Thanks Pacho for the bug report and for listing all these alternatives. In my view, from the above, creating subdirs for GNOME and KDE would probably be the best option. Unless we can have a unified file, both DEs respect the existing file and don't trash the other DE entries and if it even makes sense to do it. PS - Any chance of XFCE or some other DE joining this "fun" later? cc'ing XFCE just in case.
(In reply to comment #9) > PS - Any chance of XFCE or some other DE joining this "fun" later? cc'ing XFCE > just in case. Current xfce doesn't provide /etc/xdg/menus/ ;) %% ls /etc/xdg/ Thunar/ autostart/ xfce4/ xfce4-session/ We don't need the noise of this bug, so I'm going to remove us.
(In reply to comment #4) > Actualy find me brave person that will install kde and gnome on one pc :P I did. Works nicely after applying the Debian kdelibs patch that Pacho Ramos linked to. Installing Gnome and KDE together is a perfectly reasonable thing to do if you love a few KDE applications (Konqueror, Kate) but find the overall KDE desktop to be spectacularly unusable.
The correct way of doing it would be[1] : rename applications.menu to gnome-applications.menu export XDG_MENU_PREFIX="gnome-" in gnome session startup script install file in /etc/xdg/menus/ for kde4 rename applications.menu to kde-${SLOT}-applications.menu export XDG_MENU_PREFIX="kde-${SLOT}-" in startkde install file in /etc/xdg/menus/ DE sessions will pick their own application menu definitions. 1. http://standards.freedesktop.org/menu-spec/menu-spec-latest.html (File locations, 6th paragraph)
errata - for KDE of course use prefixed sysconf install dir (/etc for -kdeprefix, /usr/kde/slot/etc for kdeprefix) Fixed in kde-testing (dropped-kdeprefix-on-non-kde-base branch), will enter tree along with 4.2.2.
Fixed in kde-testing, >kde4.2.2? that XDG_MENU_PREFIX=@REPLACE_MENU_PREFIX@=kde-${SLOT}- ? but i don't use kdeprefix USE flag and then menu file path '/etc/xdg/menus/kde-${SLOT}-applications.menu' doesn't need for me. i think it's file path mast be '/etc/xdg/menus/kde-applications.menu' and XDG_MENU_PREFIX mast be 'kde-'. see http://bugs.gentoo.org/show_bug.cgi?id=267793
We know it is fixed on kde side, but what about gnomies. :]
Imho, every DE that makes use of any applications.menu in XDG_CONFIG_DIRS location, should install that file prefixed if it provides one (and setting appropriate XDG_MENU_PREFIX within its session). This ensures no more collisions in a future and also ensures that the one installed is an effective one.
*** Bug 275101 has been marked as a duplicate of this bug. ***
Setting this in /etc/X11/Sessions/Gnome doesn't work for gdm 2.26 as it is using the more modern /usr/share/xsessions/ files. Setting this in /etc/X11/gdm/Xsession is non-sense because users could use gdm to log into kde or xfce or a custom session. However, it seems modern session manager export what session has been selected by setting DESKTOP_SESSION as ${session%.desktop}. old gdm (<2.24) also does this export but based older filename in other locations. It basically results in DESKTOP_SESSION value being either: gnome, kde{-4,-4.2,...}, xfce (possible with version), custom or default. I propose that DEs drop a little file in /etc/X11/xinit/xinitrc.d/10-xdg-menu-$de that basically contains the following: #!/bin/sh if [ -z "$XDG_MENU_PREFIX" ] && [ "$DESKTOP_SESSION" = "$de" ] then export XDG_MENU_PREFIX=$de- fi Users starting their DE's by hand would have to set this variable to get their menus but that doesn't sound too bad. It is that or making hacky stuff in gnome-session which will probably confuse users with upgrading.
fixed in gnome-menus-2.26.2. Thanks for reporting.
This fix broke for me not using a DM. I login in on a TTY and run startx (this is becouse of unrelated lockup problems after loggin in with the help of gdm) but this seems to give me a empty menu since nothing sets DESKTOP_SESSION to "gnome"... Is the proper fix for this setting DESKTOP_SESSION like XSESSION in /etc/env.d (using openrc)?
I also ran into this problem since I use SLiM (a login manager), and had not set this variable. Not that I mind having to set it, but maybe /etc/X11/Sessions/Gnome should set this DESKTOP_SESSION to gnome by default?
broke metisse for me here and setting DESKTOP_SESSION="gnome" didn't fix it. Now I know metisse isn't even in portage but this is getting out of hand. Are we actually guessing how to fix those things? </rant>
Ok, so DESKTOP_SESSION needs to be set before xinitrc.d is sourced... Sigh, this is not getting simpler :)
Meh :)
So where is it documented how to set the DESKTOP_SESSION variable when launching your DE from within ~/.xinitrc? I thought this was an acceptable way of running the DE, per http://www.gentoo.org/doc/en/gnome-config.xml#doc_chap2_sect2 The /etc/X11/xinit/xinitrc.d/10-xdg-menu-gnome file exists with its expected content. My ~/.xinitrc now contains: #!/bin/sh export DESKTOP_SESSION=gnome exec gnome-session But my Applications menu is still empty and XDG_MENU_PREFIX is still unset when I run startx.
See bug 279555 for gnome-base/gnome-menus-2.26.2
I think this might help: * Messages for package gnome-base/gnome-menus-2.26.2: * Due to bug #256614, you might loose icons in applications menus. * If you use a login manager, please re-select your session. * If you use startx and have no .xinitrc, just export XSESSION=Gnome. * If you use startx and have .xinitrc, export XDG_MENU_PREFIX=gnome-. Haven't tried it since I use gdm but thought I'd let you know :)
Or instead maybe you could patch the crap out of Gnome libs like I did in with kdelibs: http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob_plain;f=kde-base/kdelibs/files/dist/01_gentoo_set_xdg_menu_prefix.patch;hb=master and http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob_plain;f=kde-base/kdelibs/files/dist/02_gentoo_append_xdg_config_dirs.patch;hb=master This way it appears to work with no user intervention.
This bug bugs me.
(In reply to comment #29) > This bug bugs me. > Any idea on how to fix this when using NX/Neatx? I have installed both KDE and Gnome on a remote server and on KDE, menu is fine, under Gnome it is completely empty. I've tried some of the posted solutions, but none seems to work so far.
(In reply to comment #30) > (In reply to comment #29) > > This bug bugs me. > > > > Any idea on how to fix this when using NX/Neatx? I have installed both KDE and > Gnome on a remote server and on KDE, menu is fine, under Gnome it is completely > empty. > > I've tried some of the posted solutions, but none seems to work so far. > OK, disregard that... Just using a script that sets those env variables and then launches gnome-session did work. Still, it would be nice if this issue was handled automatically.
*** Bug 349208 has been marked as a duplicate of this bug. ***