Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 269270

Summary: Duplicate entries on lancelot/kick off ( kde-4.2.3, 4.3.0 )
Product: Gentoo Linux Reporter: Markos Chandras (RETIRED) <hwoarang>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED TEST-REQUEST    
Severity: normal CC: daggs, ivan.cukic+kde, kejpi, reavertm, shade.poczta
Priority: High Flags: tampakrap: Bugday+
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugs.kde.org/show_bug.cgi?id=192229
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: full debug
Patch with qDebug

Description Markos Chandras (RETIRED) gentoo-dev 2009-05-10 14:57:09 UTC
Hello there

SInce I upgraded to kde-4.2.3 my meny entry is kinda messy. I do have duplicate entries for several programs. Those entries are not always valid. Some entries even point to .desktop files 

I open an upstream report for this but it seems to be Gentoo related due to recent changes on XDG stuff

Reproducible: Always

Steps to Reproduce:
1.updated to kde-4.3.2
2.
3.
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2009-05-10 14:58:31 UTC
Grrr my 'steps to reproduce' is b0rked

I meant 'upgrade to kde-4.2.3' :)
Comment 2 Ivan Čukić 2009-05-10 15:41:47 UTC
I think it should be fastest way to diagnose the problem is you add some debugging info in the BaseModel for Lancelot - to see where are the .desktop files it uses located.

To do so (I don't have the 4.2 branch installed, so I can't just post a patch), you should open the
   $LANCELOT_ROOT_SRC/app/src/models/BaseModel.cpp
locate the BaseModel::addService(const KService::Ptr & service) function, and before the add(...) line add:
   qDebug() << service->entryPath();

and in the beginning of the file add one #include <QDebug>

You'll get the list of .desktop files, so you could investigate where the duplicates are located.

Cheerio!

Comment 3 Markos Chandras (RETIRED) gentoo-dev 2009-05-11 15:42:13 UTC
Ok Ivan, I did compile lancelot using your code modification proposal. This is some of the output

lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kopete not found"        
"/usr/share/applications/kde4/kopete.desktop"                                                                  
lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kontact not found"       
"/usr/share/applications/kde4/Kontact.desktop"                                                                 
lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kopete not found"        
"/usr/share/applications/kde4/kopete.desktop"                                                                  
lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kontact not found"       
"/usr/share/applications/kde4/Kontact.desktop"                                                                 
lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kopete not found"        
"/usr/share/applications/kde4/kopete.desktop"
lancelot(13569) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: kontact not found"
"/usr/share/applications/kde4/Kontact.desktop"


Is this output enough or you need something more?
Comment 4 Ivan Čukić 2009-05-11 15:48:19 UTC
That is not the useful output :) it is just from the Kontact and Kopete models (the contacts section of Lancelot).

I need the other applications. (those that are duplicated)
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2009-05-11 15:48:27 UTC
Created attachment 190947 [details]
full debug

Actually I am attaching the full debug log. It should be more helpfull :)
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2009-05-11 15:54:17 UTC
Created attachment 190948 [details]
Patch with qDebug

And this is the patch i ve used. I think it is ok :/
Comment 7 Ivan Čukić 2009-05-11 16:20:20 UTC
Bummer... not much help there... i guess that those .desktop files are in your Favourites section?

Could you try browsing through the applications, see what application is doubled, and then post the parts of the output that relate to it here... (if you get any output, that is, if not, we'll have to do some more patching :) )
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2009-05-11 16:30:18 UTC
Sorry I dont get any other related output. I only get the attached output and the errors about kopete and kontact. Every application in lancelot is duplicated. As we said in upstream bug, the one entry is an actual application launcher whilst the second one is a reference to .desktop file ( opens kate if you click it )

On the other hand, on default KDE4 application laucher, there are no duplicates at all :/

How strange

So I guess we need some more patching on lancelot :)
Comment 9 shade 2009-05-12 09:46:34 UTC
(In reply to comment #8)

> On the other hand, on default KDE4 application laucher, there are no duplicates
> at all :/
> 
> How strange
> 
> So I guess we need some more patching on lancelot :)
> 

There are, go to search in kickoff, type opera/firefox and you will se dubled
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2009-05-12 09:50:57 UTC
Kickoff is the old style kde3 application launcher. I am not talking about this but for the new application launcher introduced with kde4
Comment 11 shade 2009-05-12 09:59:28 UTC
kicker=kde3  http://kde-look.org/CONTENT/content-pre1/26561-1.png
kickoff=kde4   http://www.kde.de/infos/ankuendigungen/40/screenshots/kickoff-favorites.jpg
sory but there is need on focusing on problem, not on names
Comment 12 Ivan Čukić 2009-05-12 10:07:09 UTC
Kicker was the panel in 3.x series, not a menu.
KMenu was the menu, and now Kickoff is.

Ok, let's continue the troubleshooting.

1. Find an application that is duplicated
2. If it is Firefox, then search for firefox.desktop (make it follow the symlinks)

How many results did you get?
Comment 13 shade 2009-05-12 10:21:26 UTC
Ok, so new thing, if .desktop is in     /usr/share/applications/ (default for all applations) then kickoff will show dubled entries. All kde4 stuff is in /usr/share/applications/kde4. Moving .desktops to path/kde4 is making dubles go away.
Comment 14 Ivan Čukić 2009-05-12 10:26:35 UTC
try doing 

unset XDG_DATA_DIRS
unset XDG_CONFIG_DIRS

before you start plasma/kickoff/lancelot

(kill them, and start them after the unset commands)
Comment 15 shade 2009-05-12 10:28:36 UTC
maybe XDG_MENU_PREFIX=kde-4.2- is the problem?
Comment 16 Ivan Čukić 2009-05-12 10:31:01 UTC
I don't know. Try changing it and tell us what you got.
Comment 17 shade 2009-05-12 10:54:39 UTC
(In reply to comment #14)
> try doing 
> 
> unset XDG_DATA_DIRS
> unset XDG_CONFIG_DIRS
> 
> before you start plasma/kickoff/lancelot
> 
> (kill them, and start them after the unset commands)
> 

Those dont help. After star kde/X sets XDG_DATA_DIRS=/usr/share:
And it sets if even i dont unset XDG_DATA_DIRS, it dont looks if is there already so it looks then like "XDG_DATA_DIRS=/usr/share:/usr/local/share:/usr/share" after start of X/kde without doing anything

Comment 19 Maciej Mrozowski gentoo-dev 2009-05-13 13:28:48 UTC
First of all - please try to reproduce issue with clean account, then provide information about kdeprefix (whether enabled or not) and all installed KDE's (and their prefixes, also note whether kde3 is installed as well).
Comment 20 Markos Chandras (RETIRED) gentoo-dev 2009-05-13 13:44:07 UTC
(In reply to comment #19)
> First of all - please try to reproduce issue with clean account, then provide
> information about kdeprefix (whether enabled or not) and all installed KDE's
> (and their prefixes, also note whether kde3 is installed as well).
> 

I can reproduce it with clean account. I am not using kdeprefix , and yes kdelibs:3.5 are installed
Comment 21 Maciej Mrozowski gentoo-dev 2009-05-26 16:29:06 UTC
Duplicated icons issue when only KDE4 in installed (regression introduced in 4.2.3) - should be fixed now.
About this bug - works in progress - this will probably need processing some .desktop files - I'm working on desktop-file-edit tool currently to do the job (maybe it will be included in desktop-file-utils some day).
Comment 22 Petr Kopecky 2009-07-06 12:49:20 UTC
This bug is also present in Lancelot KDE4.3 RC1. Is it Gentoo specific problem?
Comment 23 Maciej Mrozowski gentoo-dev 2009-07-07 17:25:24 UTC
Please provide more information, like what versions of KDE do you have installed, values of XDG_DATA_DIRS (and possibly XDG_MENU_PREFIX) within all those KDE sessions, whether you have kdeprefix USE flag enabled (which is unsupported) etc, relevant parts of emerge --info.
Without this - such 'also present in XXX' reports are useless - as for example I cannot reproduce with any version now.
Comment 24 Petr Kopecky 2009-07-07 17:54:35 UTC
Sorry, I thought it is reproducible.

It is KDE 4.2.95 (RC1) installed from KDE testing overlay but I had the same problem with KDE 4.2.4

my XDG_* variables:
XDG_CONFIG_DIRS = /etc/xdg
XDG_DATA_DIRS = /usr/local/share/:/usr/share/
XDG_MENU_PREFIX = kde-4.3-

kdeprefix not used 

It is only affecting Lancelot and "Open with..." dialog not kickoff 
KDE application are not duplicated, only non-kde applications are duplicated
Also reproducible with clean account.
"kbuildsycoca4 --noincremental" does not help

I am using paludis, so "emerge --info" is not relevant, 

This is part of output from 
# paludis --info =kde-base/kdelibs-4.2.95::installed

I hope it helps.

paludis 0.36.1                                              
Paludis build information:                                  
    Compiler:                                               
        CXX:                   x86_64-pc-linux-gnu-g++ 4.3.2
        CXXFLAGS:               -march=core2 -O2 -pipe      
        LDFLAGS:               -Wl,-O1                      
        DATE:                  2009-06-12T19:37:11+0200     

    Libraries:
        C++ Library:           GNU libstdc++ 20080827

    Reduced Privs:
        reduced_uid:           105
        reduced_uid->name:     paludisbuild
        reduced_uid->dir:      /var/tmp/paludis
        reduced_gid:           1019            
        reduced_gid->name:     paludisbuild    

    Paths:
        DATADIR:               /usr/share
        LIBDIR:                /usr/lib64
        LIBEXECDIR:            /usr/libexec
        SYSCONFDIR:            /etc        
        PYTHONINSTALLDIR:                  
        RUBYINSTALLDIR:        /usr/lib64/ruby/site_ruby/1.8/x86_64-linux

Package kde-base/kdelibs-4.2.95::installed:

        >>> Running ebuild phase killold as paludisbuild:paludisbuild...
        bunzip2 < /var/db/pkg/kde-base/kdelibs-4.2.95/environment.bz2 > /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19160
        ebuild_scrub_environment /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19160                                       
        ebuild_safe_source /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19160                                             
        rm /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19160                                                             
        >>> Starting builtin_killold                                                                                              
        >>> Done builtin_killold                                                                                                  
        >>> Completed ebuild phase killold                                                                                        
        >>> Running ebuild phases initmisc infovars info as paludisbuild:paludisbuild...                                          
        bunzip2 < /var/db/pkg/kde-base/kdelibs-4.2.95/environment.bz2 > /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19214
        ebuild_scrub_environment /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19214                                       
        ebuild_safe_source /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19214                                             
        rm /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19214                                                             
        >>> Starting builtin_initmisc                                                                                             
        >>> Done builtin_initmisc                                                                                                 
        >>> Starting builtin_infovars                                                                                             
        ACCEPT_KEYWORDS=amd64                                                                                                     
        CBUILD=x86_64-pc-linux-gnu                                                                                                
        CFLAGS=-march=core2 -O2 -pipe                                                                                             
        CHOST=x86_64-pc-linux-gnu                                                                                                 
        CONFIG_PROTECT=/usr/share/config /etc                                                                                     
        CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/env.d/java/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild /etc/splash /etc/env.d /etc/gconf
        CPPFLAGS= -DQT_NO_DEBUG -DNDEBUG
        CTARGET=
        CXXFLAGS=-march=core2 -O2 -pipe
        DISTDIR=/var/db/pkg/kde-base/kdelibs-4.2.95
        FEATURES=strict sfperms
        FFLAGS=
        GENTOO_MIRRORS=
        INSTALL_MASK=
        LANG=
        LC_ALL=C
        LDFLAGS=-Wl,-O1
        LINGUAS=cs
        MAKEOPTS=-j3
        PORTAGE_COMPRESS=
        PORTAGE_COMPRESS_FLAGS=
        PORTAGE_CONFIGROOT=
        PORTAGE_RSYNC_EXTRA_OPTS=
        PORTAGE_RSYNC_OPTS=
        PORTAGE_TMPDIR=/var/tmp/tmp/paludis
        PORTDIR=/var/db/pkg/kde-base/kdelibs-4.2.95
        PORTDIR_OVERLAY=
        SYNC=
        USE=acl alsa bzip2 handbook mmx nls opengl semantic-desktop spell sse sse2 ssl amd64 alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mmap_emul alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2_modules_actions apache2_modules_alias apache2_modules_auth_basic apache2_modules_auth_digest apache2_modules_authn_anon apache2_modules_authn_dbd apache2_modules_authn_dbm apache2_modules_authn_default apache2_modules_authn_file apache2_modules_authz_dbm apache2_modules_authz_default apache2_modules_authz_groupfile apache2_modules_authz_host apache2_modules_authz_owner apache2_modules_authz_user apache2_modules_autoindex apache2_modules_cache apache2_modules_dav apache2_modules_dav_fs apache2_modules_dav_lock apache2_modules_dbd apache2_modules_deflate apache2_modules_dir apache2_modules_disk_cache apache2_modules_env apache2_modules_expires apache2_modules_ext_filter apache2_modules_file_cache apache2_modules_filter apache2_modules_headers apache2_modules_ident apache2_modules_imagemap apache2_modules_include apache2_modules_info apache2_modules_log_config apache2_modules_logio apache2_modules_mem_cache apache2_modules_mime apache2_modules_mime_magic apache2_modules_negotiation apache2_modules_proxy apache2_modules_proxy_ajp apache2_modules_proxy_balancer apache2_modules_proxy_connect apache2_modules_proxy_http apache2_modules_rewrite apache2_modules_setenvif apache2_modules_so apache2_modules_speling apache2_modules_status apache2_modules_unique_id apache2_modules_userdir apache2_modules_usertrack apache2_modules_vhost_alias cameras_canon cameras_directory elibc_glibc input_devices_evdev kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text linguas_cs linguas_en userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vesa amd64
        >>> Done builtin_infovars
        >>> Starting pkg_info
        >>> Done pkg_info
        >>> Completed ebuild phases initmisc infovars info
        >>> Running ebuild phase tidyup as paludisbuild:paludisbuild...
        bunzip2 < /var/db/pkg/kde-base/kdelibs-4.2.95/environment.bz2 > /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19311
        ebuild_scrub_environment /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19311
        ebuild_safe_source /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19311
        rm /var/tmp/paludis/environment-kde-base-kdelibs-4.2.95-19311
        >>> Starting builtin_tidyup
        rm -fr /var/tmp/paludis/kde-base-kdelibs-4.2.95-info
        >>> Done builtin_tidyup
        >>> Completed ebuild phase tidyup

Comment 25 Maciej Mrozowski gentoo-dev 2009-07-08 02:43:17 UTC
Please remove /usr/share/config/kdeglobals if you have one.
Comment 26 Maciej Mrozowski gentoo-dev 2009-07-08 02:47:57 UTC
Besides, your XDG_DATA_DIRS should be sth like:
/usr/share:/usr/local/share:/usr/share
If it's not, then you probably have 'source /etc/profile' line in .bashrc, which would be wrong of course as it overwrites any env variable that is set in startkde script.
Comment 27 shade 2009-07-08 12:09:53 UTC
For kickoff test go to search in kickoff and type name of app that isnt part of kde like search : openoffice/cups/firefox. It should report dubled entries to. kdeglobals file isnt part of kde now? I can confirm that removing this file helps for this bug (tested on 4.2.4), but it will not be added while updating kde once again?
Comment 28 shade 2009-07-08 19:08:40 UTC
@Maciej removing that files fixed this bug, but makes another one. kdeglobals file have line pointing to mimes (dir_mime=/usr/share/mime ). That line need to be there :) or you will not see ikons in many parts of kde, like kde plasma applets chose menu, RMB menu etc.
Comment 29 Petr Kopecky 2009-07-08 19:13:32 UTC
I can confirm it works after removing /usr/share/config/kdeglobals nevertheless XDG_DATA_DIRS is the same after removing "source /etc/profile" from .bashrc 
Comment 30 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-23 00:17:51 UTC
(In reply to comment #25)
> Please remove /usr/share/config/kdeglobals if you have one.
> 

We should add pkg_postinst command to remove that file... Maciej what do you think?
Comment 31 Tomáš Chvátal (RETIRED) gentoo-dev 2009-11-23 00:26:29 UTC
*** Bug 282636 has been marked as a duplicate of this bug. ***
Comment 32 Andreas K. Hüttel archtester gentoo-dev 2010-04-20 21:13:13 UTC
Any news on this one (kde-4.3.5, kde-4.4.2)?
Comment 33 Andreas K. Hüttel archtester gentoo-dev 2010-05-01 17:33:16 UTC
Last report was for kde-4.3.0, no dupes since then. 

Resolving as test-request, feel free to reopen of you still have the problem.