Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 267793 - KDE 4 applications fail runing out of kde4 enviroment
Summary: KDE 4 applications fail runing out of kde4 enviroment
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
: 254881 (view as bug list)
Depends on:
Blocks: 277868
  Show dependency tree
 
Reported: 2009-04-28 18:28 UTC by Konstantin Sobolev
Modified: 2009-09-14 08:54 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
kbuildsycoca4 strace (str,700.65 KB, text/plain)
2009-04-28 18:32 UTC, Konstantin Sobolev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Sobolev 2009-04-28 18:28:57 UTC
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
Comment 1 Konstantin Sobolev 2009-04-28 18:29:52 UTC
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

Comment 2 Konstantin Sobolev 2009-04-28 18:32:30 UTC
Created attachment 189727 [details]
kbuildsycoca4 strace
Comment 3 Konstantin Sobolev 2009-05-04 02:12:15 UTC
forum thread:
http://forums.gentoo.org/viewtopic-p-5701904.html
Comment 4 pip 2009-05-04 21:13:50 UTC
i've the same problem...
Comment 5 Alastair Murray 2009-05-09 12:53:33 UTC
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.
Comment 6 Tomáš Chvátal (RETIRED) gentoo-dev 2009-05-09 14:07:13 UTC
(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.
Comment 7 Alastair Murray 2009-05-09 15:15:30 UTC
(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.

Comment 8 Konstantin Sobolev 2009-05-09 19:06:56 UTC
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
Comment 9 Alastair Murray 2009-05-09 22:28:30 UTC
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?
Comment 10 Tomáš Chvátal (RETIRED) gentoo-dev 2009-05-13 08:20:30 UTC
Ok this one is also important so adjusting severity.
I guess pple wants to run kde4 apps out of the kde4 session :]
Comment 11 Maciej Mrozowski gentoo-dev 2009-05-30 00:44:27 UTC
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.
Comment 12 Alexey Oblozhko 2009-06-04 14:36:27 UTC
> 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-

Comment 13 Tomáš Chvátal (RETIRED) gentoo-dev 2009-06-13 11:32:25 UTC
*** Bug 254881 has been marked as a duplicate of this bug. ***
Comment 14 Maciej Mrozowski gentoo-dev 2009-06-16 23:27:10 UTC
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.
Comment 15 Alastair Murray 2009-08-16 14:59:20 UTC
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.
Comment 16 Maciej Mrozowski gentoo-dev 2009-08-17 14:50:26 UTC
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.
Comment 17 Alastair Murray 2009-08-17 15:00:16 UTC
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).
Comment 18 Maciej Mrozowski gentoo-dev 2009-08-23 21:57:35 UTC
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.
Comment 19 Maciej Mrozowski gentoo-dev 2009-09-06 22:37:37 UTC
Please update to 4.3.1 and test, it's supposed to be fixed there.
Comment 20 Alastair Murray 2009-09-06 23:36:36 UTC
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.
Comment 21 Maciej Mrozowski gentoo-dev 2009-09-07 05:39:51 UTC
Ok, thanks.
I'm closing this one, please reopen if still ceases to work with any KDE >=4.3.1.