When kde 3.5.8 and kde 4.0.0 is installed on one machine the XDG_DATA_DIRS variable is set to /usr/share:/usr/kde/4.0/share:/usr/local/share independent of the kde session one is logged in. This causes the problem that in kde3 are a lot of double menu entries and mission icons in the k-menu. This can be removed when kbuildsycoca is run after removing the path /usr/kde/4.0/share form the environment variable XDG_DATA_DIRS. But after some time the double entries and the missing icons reappear. Reproducible: Always Steps to Reproduce: 1. install kde-3.5.8 2. install kde-4.0.0 3. start kde-3.5.8
*** Bug 208136 has been marked as a duplicate of this bug. ***
(In reply to comment #0) > when kbuildsycoca is run after removing the path /usr/kde/4.0/share form the > environment variable XDG_DATA_DIRS. But after some time the double entries and > the missing icons reappear. > > Reproducible: Always > > Steps to Reproduce: > 1. install kde-3.5.8 > 2. install kde-4.0.0 > 3. start kde-3.5.8 > in /usr/kde4.0/bin/startkde, there are: if test -z "$XDG_DATA_DIRS"; then XDG_DATA_DIRS="`kde4-config --prefix`/share:/usr/share:/usr/local/share" export XDG_DATA_DIRS fi but /usr/kde3.5/bin/startkde,there arent...
*** Bug 210756 has been marked as a duplicate of this bug. ***
*** Bug 211305 has been marked as a duplicate of this bug. ***
the problem can be solved by changing the startkde files, so before the start every kde version exports the right XDG_DATA_DIRS. in the export section in /usr/kde/3.5/bin/startkde, 'export XDG_DATA_DIRS="/usr/share:/usr/local/share:/usr/kde/3.5/share"' needs to be added, while in /usr/kde/4.0/bin/startkde 'export XDG_DATA_DIRS="/usr/share:/usr/local/share:/usr/kde/4.0/share"' needs to be added in the same section. this keeps the double entries from the menu, although the main problem comes from the file which sets the XDG_DATA_DIRS, because in /etc/env.d/44kdepaths-kde-4 and 45kdepaths-3.5 it is set the right way, but in /etc/csh.env and profile.env, which are both generated by env-update and in profile.csh which is the eselect configuration file, the XDG_DATA_DIRS exports the wrong dirs, while changing them there will make no sense, after each kde version needs it's own dirs in there, so in my opinion, the startkde script is the right place to export the dirs.
I believe this was fixed on KDE-4.1. Furthermore, we're currently working to get a default XDG_DATA_DIRS in the system. You can follow that on bug 264647