keditfiletype video/x-msvideo application preference order -> add /usr/bin/mplayer, OK It shows "updating configuration" and nothing happens, list of applications stays empty. The following is printed in the console: keditfiletype(31505) KServiceFactory::findServiceByDesktopPath: "findServiceByDesktopPath: mplayer-3.desktop not found" I can see mplayer-3.desktop in ~/.local/share/applications, it's also added to ~/.local/share/applications/mimeapps.list Attempts to add it again create mplayer-4.desktop, mplayer-5.desktop etc. Tried to remove ~/.kde, ~/.kde4, ~/.local, /tmp/*, rebuild kdelibs (4.2.2-r1), checked revdep-rebuild, no success. stracing kbuildsycoca4 --noincremental shows that it doesn're read the contents of my ~/.local/share/applications at all
Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-gentoo x86_64) ================================================================= System uname: Linux-2.6.29-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-gentoo-2.0.0 Timestamp of tree: Tue, 28 Apr 2009 18:00:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] app-shells/bash: 4.0_p17-r1 dev-java/java-config: 1.3.7-r1, 2.1.7 dev-lang/python: 2.4.4-r15, 2.5.4-r2, 2.6.2 dev-util/cmake: 2.6.3-r1 sys-apps/baselayout: 2.0.0 sys-apps/openrc: 0.4.3-r2 sys-apps/sandbox: 1.9 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.28-r1 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="ru_RU.utf8" LC_ALL="" LDFLAGS="-Wl,-O1" LINGUAS="en ru" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage/layman/ion-overlay /usr/local/portage/layman/java-overlay /usr/local/portage/layman/haskell /usr/portage/local/kos-overlay" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="7zip X a52 aac aalib acl acpi alsa amd64 amr amrnb amrwb bash-completion berkdb bittorrent bl bluetooth branding bsf bzip2 cairo cdaudio cdda cddb cdio cdparanoia cdr cli cracklib crypt cscope css cups cupsddk curl cvs db dbus deprecated dga discouraged djvu dri dts dv dvd dvdr dvdread eds emboss enca encode esd evo exif expat extensions extrafiles extras fam fame fbcon ffmeg ffmpeg fftw firefox flac fluidsynth fontconfig fortran ftp fuse gd gdbm gif gimp glib glitz gnome gnutls gpgme gphoto2 gpm graphvis graphviz gs gstreamer gtk guile hal haskell hddtemp hdri iconv id3 id3tag imagemagick imlib inkjar isdnlog java javascript jbig jpeg jpeg2k kde kipi lame latex lcms ldap libcaca libnotify libsamplerate live lm_sensors logitech-mouse lua lzo mad madwifi mbox midi mikmod mjpeg mmap mmx mmxext mng mnt mouse mozdevelop mp2 mp3 mp4 mpd mpeg mudflap multilib multiuser musepack mysql ncurses nemesi network networking nls nntp npp nptl nptlonly nsplugin nvidia ogg openal opengl openmp pam pango pcre pdf perl png pnm ppds pppd pulseaudio pvr python qt3 qt3support qt4 quicktime rar rdesktop readline reflection rtc rtsp ruby samba sbcl scenarios sdl search-screen session sidebar slang slp smime smp sndfile speex spell spl sql sqlite srt sse sse2 sse3 ssl ssse3 startup-notification stream subversioh subversion svg sysfs tcpd tga theora threads tiff timidity tivo tk truetype twolame unicode usb utf8 vcd vcdx vim-pager vim-syntax vim-with-x visualization vncviewer vorbis wavpack webkit wmf wxwindows x264 xanim xcomposite xft xinetd xml xorg xpm xterm-color xulrunner xv xvid xvmc xvnc zlib zlo zoran" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" USERLAND="GNU" VIDEO_CARDS="nv nvidia vesa vga s3" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 189727 [details] kbuildsycoca4 strace
forum thread: http://forums.gentoo.org/viewtopic-p-5701904.html
i've the same problem...
I may of just stumbled across the problem, it may be related to bug #264647. First of all, I don't use KDE as my desktop (I use fluxbox), but I do use a few KDE 4.2 applications, e.g. Konqueror (as a file browser). So the problem is that XDG_MENU_PREFIX and XDG_DATA_DIRS get set by kde-base/kdebase-startkde, but I don't have that installed (as I have no need of it and it pulls half of KDE in). The symptoms I was seeing were: there were no applications set for file associations and I couldn't add my own associations (as with this bug). To fix this I added the following two lines to my .fluxbox/startup script: export XDG_DATA_DIRS=/usr/share:/usr/kde/4.2/share:/usr/local/share:/usr/kde/3.5/share export XDG_MENU_PREFIX=kde-4.2- Obviously that isn't ideal as kde-4.3 will break it and if other ebuilds set either of these I may be overriding them -- but it works for me, for now. The fundamental problem seems to be that startkde is setting something that other parts of KDE need (kbuildsycoca4 possibly, which is part of kdelibs, so set these variables via kdelibs? I have no idea how KDE "works" in this regard). Hope this helps construct a real fix, the problem makes using Konqueror very tedious.
(In reply to comment #5) > I may of just stumbled across the problem, it may be related to bug #264647. > > First of all, I don't use KDE as my desktop (I use fluxbox), but I do use a few > KDE 4.2 applications, e.g. Konqueror (as a file browser). So the problem is > that XDG_MENU_PREFIX and XDG_DATA_DIRS get set by kde-base/kdebase-startkde, > but I don't have that installed (as I have no need of it and it pulls half of > KDE in). > > The symptoms I was seeing were: there were no applications set for file > associations and I couldn't add my own associations (as with this bug). > > To fix this I added the following two lines to my .fluxbox/startup script: > export > XDG_DATA_DIRS=/usr/share:/usr/kde/4.2/share:/usr/local/share:/usr/kde/3.5/share > export XDG_MENU_PREFIX=kde-4.2- > > Obviously that isn't ideal as kde-4.3 will break it and if other ebuilds set > either of these I may be overriding them -- but it works for me, for now. > > The fundamental problem seems to be that startkde is setting something that > other parts of KDE need (kbuildsycoca4 possibly, which is part of kdelibs, so > set these variables via kdelibs? I have no idea how KDE "works" in this > regard). > > Hope this helps construct a real fix, the problem makes using Konqueror very > tedious. > In that case it is invalid. KDE Team clearly state that YOU HAVE TO install kde-base/startkde to get support.
(In reply to comment #6) > In that case it is invalid. > KDE Team clearly state that YOU HAVE TO install kde-base/startkde to get > support. I wasn't aware of that, I'll install startkde and confirm the problem disappears. Though be aware that I'm not the original reporter -- it's possible they are experiencing this same problem *with* startkde installed.
I *do* have startkde installed, although I don't usually use it. However I've just tried to login into full KDE session and got following results: kos@kos ~ $ echo $XDG_DATA_DIRS /usr/local/share:/usr/share:/usr/kde/3.5/share kos@kos ~ $ echo $XDG_MENU_PREFIX {empty line} Setting them manually as specified in comment #5 and restarting kdeinit4 fixes the problem
Ok, I installed kdebase-startkde and everything it depends on, but I still have to set the environment variables manually when running fluxbox or file associations don't work. Though if I log into KDE everything works fine there, presumably due to the startkde scripts running. So, is konqueror/dolphin on non-KDE desktops an unsupported configuration (if so I'll just use my own hack to fix it) or is something broken?
Ok this one is also important so adjusting severity. I guess pple wants to run kde4 apps out of the kde4 session :]
In chroot I have Gnome, kde3, kde4.2 in kdeprefix (/usr/share/kde4.2) and kde-live in /usr (note that mixed prefixes are *NOT* recommended and I have them only to expose issues and hopefully fix some of them). XDG_DATA_DIRS is installed by kdelibs, so kdebase-startkde should not be needed to get application icons im XDG aware menu. However, running those apps is another issue as no .desktop file has absolute path in Exec=. KDE4 apps installed in different location than kdelibs they were built against are now fixed by 'kdeglobals' file in KDEDIR/share/config. So, try now and report any further issues. Of course if you have any two KDE's installed - you'lll get duplicated menu entries for KDE apps (and not really working -> both launching the same application). In any KDE session it works because we reorder XDG_DATA_DIRS and PATHs in startkde script and any non-KDE session having Exec=kwrite would need to guess where to look for it. It could be done - analyzing .desktop file directory and appending proper bin/ prefix to 'kwrite' in Exec= section on the fly - it's actually currently done for KDE3 - but I don't feel like fixing every DE in that manner. The other approach is to replace relative Exec= paths with absolute ones during package install, so that it just works everywhere. It's WIP. Let this bug track this issue.
> The symptoms I was seeing were: there were no applications set for file > associations and I couldn't add my own associations (as with this bug). I had same problems after get kde upgraded and solved them by running /usr/bin/update-desktop-database -q /usr/share/applications /usr/bin/update-mime-database /usr/share/mime Got them from fdo-mime.eclass, hope will be helpful, btw: echo $XDG_DATA_DIRS /usr/share:/usr/local/share:/usr/share echo $XDG_MENU_PREFIX kde-4.2-
*** Bug 254881 has been marked as a duplicate of this bug. ***
Maybe it isn't clear, anyway - first of all - XDG_MENU_PREFIX has nothing to do with this issue so please don't assume too much - it's just for kickoff/lancelot - for menu definition. Actually the only real issue here is bug in Qt4 - messing qtplugins paths (causing Qt4 to dlopen wrong oxygen.so) - .desktop files lookup order (controlled by XDG_DATA_DIRS and alike) and relative paths in Exec= are really minor issue here.
For everyone's reference, I've just upgraded to KDE 4.3.0 and I still have to set the environment variables manually to have file associations work. If this is indeed a QT problem then this is not surprising, as I did not upgrade that (it is still at 4.5.1, the latest in portage at the time of writing is 4.5.2). The environment variables I now set are: export XDG_DATA_DIRS=/usr/share:/usr/kde/4.2/share:/usr/local/share:/usr/kde/3.5/share export XDG_MENU_PREFIX=kde-4.3- Note that there is no /usr/share/kde/4.3 so I didn't update XDG_DATA_DIRS.
Of course there's no /usr/share/kde/4.3, but there's /usr/kde/4.3/share (not mentioning you're using unsupported kdeprefix) - XDG_DATA_DIRS is crucial, so is XDG_MENU_PREFIX.
My apologies, that was a typo by me, I meant there is no /usr/kde/4.3/share. I think this is the case, I am at work but I will check when I get home later. Thus I think I do have XDG_DATA_DIRS set correctly (everything is working when I use the settings I copy-pasted). Also, I do not use kdeprefix at all, hence the lack of /usr/kde/4.3/share I assume. I did try installing it the past to see if it fixed this problem but my current install is with -kdeprefix (i.e. the default).
If you use *-4.3.xx:4.4, *-9999:live or *-4.3.9999:4.3 ebuilds, please try updating them in overlay, I've added some XDG_CONFIG_DIRS and XDG_MENU_PREFIX fixes (handling moved to kdelibs code) - that should those issues.
Please update to 4.3.1 and test, it's supposed to be fixed there.
I can confirm that this problem is now fixed (for me at least). I didn't think to try removing the lines setting XDG_DATA_DIRS and XDG_MENU_PREFIX after upgrading to 4.3.1, but just tried at comment #19's suggestion. My file associations now work correctly and I can add new associations, which is the original problem that this bug was reporting.
Ok, thanks. I'm closing this one, please reopen if still ceases to work with any KDE >=4.3.1.