Version: (using Devel) Installed from: Compiled sources OS: Linux When opening a text file in dolphin or konqueror Kwrite starts without problems. But after a while an error message pops up which tells that "Klauncher is not reachable by D-Bus Error while accessing start_service_by_desktop_path: empty". Kwrite works still without problems. But when i close Kwrite 2-3 seconds after is has been started another error pops up: "KDEinit can't start usr/bin/kwrite" And Kwrite is beeing started automatically once again. When i close it the second time the last error pops up again but kwrite is beeing closed correctly. Hope this is understandable.
Oh I forgot to mention: I'm using the latest Opensuse-KDE4.0 RPMs
This is a setup problem, the wrong kwrite.desktop is being found. Do you have a kwrite.desktop in ~/.kde (~/.kde4)? Otherwise it's the system one that is being found, which is definitely a (OpenSuse?) setup problem.
In opensuse all .desktop files are located in /usr/share/applications/kde4. There is a kwrite.desktop file, too. I noticed that the bug doesn't appear when kwrite is started from Konsole.
> In opensuse all .desktop files are located in /usr/share/applications/kde4. > There is a kwrite.desktop file, too. But there are KDE-3 desktop files around too, right? You didn't explicitely answer about whether your KDE usage created a kwrite.desktop in ~/.kde or ~/.kde4, too.
No i don't think there are kde3 .desktop files. At least there is no kontact.desktop, kmail.desktop etc. But i'm not 100% shure. How to find out? No there are no .desktop files in ~/.kde or ~/.kde4.
find /usr/share -name kwrite.desktop find ~/.kde* -name kwrite.desktop Also, does /usr/share/applications/kde4/kwrite.desktop have those lines? X-DBUS-StartupType=Multi X-DBUS-ServiceName=org.kate-editor.kwrite
There is just the kwrite.desktop in /usr/share/applications/kde4/. Yes it has the two lines.
Same bug here too with 4.0.2 on debian. It doesn't only happen with kwrite but also with kate, kword, krita and others, but there are some apps like okular that work fine. Some notes: - When I close kwrite, sometimes it respawns after I click ok on the error message but sometimes it doesn't. It's a totally random behaviour. - The dbus error message only appears if I keep kwrite open for more than 20-30 seconds. During these 20-30 secs, the browser app (konq/dolphin) is not repainted, which means it is out of the event loop, probably waiting for a reply via dbus. If I close kwrite before 20-30 secs have passed, the message "Could not launch /usr/bin/kwrite" appears but the dbus error message doesn't and dolphin/konq is repainted imediately. - These messages also appear when launching apps from the "Run command" dialog and from there, I can also confirm that the "Could not launch ..." message appears also when launching kde 3.5.9 apps like kmail or akregator. About the kwrite.desktop, there is a kwrite.desktop in /usr/share/applications/kde4/ and it does have the two "X-DBUS..." lines.
On Friday 21 March 2008, George Kiagiadakis wrote: > About the kwrite.desktop, there is a kwrite.desktop in /usr/share/applications/kde4/ and it does have the two "X-DBUS..." lines. Yes but isn't there also a kwrite.desktop in /usr/share/applications/kde3, or somewhere else in the search path shown by "kde4-config --path xdgdata-apps" ?
>Yes but isn't there also a kwrite.desktop in /usr/share/applications/kde3, or somewhere else in the search path shown by "kde4-config --path xdgdata-apps" ? Nope... see yourself. Any other ideas? gkiagia@gklaptop:~$ kde4-config --path xdgdata-apps /home/gkiagia/.local/share/applications/:/usr/share/applications/:/usr/local/share/applications/ gkiagia@gklaptop:~$ find /home/gkiagia/.local/share/applications/ -name kwrite.desktop gkiagia@gklaptop:~$ find /usr/share/applications/ -name kwrite.desktop /usr/share/applications/kde4/kwrite.desktop gkiagia@gklaptop:~$ find /usr/local/share/applications/ -name kwrite.desktop gkiagia@gklaptop:~$
Update: There was a kde3 version of kwrite.desktop in /usr/share/app-install/desktop but I replaced it with the kde4 version from /usr/share/applications/kde4 and restarted KDE, but there is still no difference.
David, I solved it. You were right about the desktop file. There is indeed a file called ~/.local/share/applications/kde-kwrite.desktop which seems to be the kde3 version of kwrite.desktop. The mime type text/plain was associated with this file. What I did was that I removed the association with kwrite and then added it again. Voila! Problem solved. I wonder how I didn't notice that before... The thing is that ~/.local/share/applications seems to have many wierd files... For example, apart from kde-kwrite.desktop, there is also a kde4-kwrite.desktop and the same for kate, kword, kmplayer and also for amarok (kde4-amarok.dekstop), although I don't have ever installed the kde4 version of amarok. Which app creates all this crap? Anyway, this bug seems to be invalid. Also, bug #155873 seems to be a duplicate ;)
On Thursday 27 March 2008, George Kiagiadakis wrote: > Which app creates all this crap? The filetypes association module, and the open-with dialog, used to create a local .desktop file when the user added a new mimetype-application association. This is fixed now, using the new mimeapps.list file instead of generating local .desktop file copies, because of all the problems generated by such local .desktop files - your problem is one of them :)
SVN commit 805921 by dfaure: Remove reading of X-DCOP-ServiceType from desktop files -- this was a bad idea. When launching a kde3 application, it's going to register to DCOP, not to DBUS, so if klauncher waits for DBUS registration (because of this key being parsed as if it was X-DBUS-StartupType), it will show a "could not start" error message... BUG: 156339, 155873 M +0 -6 kservice.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=805921
*** Bug 155905 has been marked as a duplicate of this bug. ***
The same problem appears when opening a text file in dolphin using Kate (invoked with "open with"). The problem occurred in version 4.0.83, kubuntu packages.
*** Bug 167978 has been marked as a duplicate of this bug. ***
I don't really think this is fixed in 4.0.5 and 4.1 as David says in bug 155905 comment 15. The last report I marked as duplicate was from a 4.0.5 user and I can also confirm that bug 155873 (which should have been fixed by that patch in comment 14) is still valid in 4.1.0.
Reopening. I found a standard way to reproduce it in KDE 4.1.0. I have kword 2.0 alpha 9 installed from debian packages. If I try to open a file in dolphin with kword or open kword from krunner, this klauncher error message appears. The affecting .desktop file is this one (I have only removed the various localization messages as they are probably not relevant): [Desktop Entry] Type=Application Name=KWord Exec=kword %u GenericName=Word Processor Comment=Write text documents MimeType=application/vnd.oasis.opendocument.text;application/x-kword;application/msword;application/rtf;text/plain;application/x-mswrite; Icon=kword X-KDE-NativeMimeType=application/vnd.oasis.opendocument.text #X-KDE-NativeMimeType=application/x-kword X-DocPath=kword/index.html X-KDE-StartupNotify=true X-DBUS-StartupType=Multi Categories=Qt;KDE;Office; InitialPreference=3 PS: this time I checked it, it's *that* file and not some other in my ~/.local. Even if I go to /usr/share/applications/kde4 in dolphin and click on this kword.desktop, the error message appears.
See bug 157853. Double-check which dbus name kword registers as (simply type "qdbus" in a terminal) and try adding X-DBUS-ServiceName=org.kde.kword (or whatever the name is, without the PID) to the dekstop file.
Ok, adding X-DBUS-ServiceName=org.koffice.kword fixes it. I guess that should be fixed in all koffice applications as they all do not seem to have such a line in their .desktop files. However, I still don't understand why we need this dbus check. kword and most applications that I have seen will launch fine even without the check. PS: I am not really sure if I should close again that bug. Do as you wish, David.
May be bug 164864 is related/duplicate to this.
bug #122604 generates this error, if you need something slightly more complicated to test
Have anyone experienced this bug again with a recent KDE version recently? (4.1.3 / 4.2beta2 / 4.2svn) ? Thanks :)
No. It works for me. At least with 4.1.3(In reply to comment #24) > Have anyone experienced this bug again with a recent KDE version recently? > (4.1.3 / 4.2beta2 / 4.2svn) ? Thanks :) > No. It works for me. At least with 4.1.3. But I've not tested 4.2 until now.
The answer to "However, I still don't understand why we need this dbus check." is now up at http://techbase.kde.org/Development/Architecture/KDE4/Starting_Other_Programs#klauncher About the koffice apps, you're right, they register as org.koffice.*, and don't specify that in their desktop file... so indeed they should lead to the klauncher error message, but here I can't seem to reproduce that bug... strange, I'll have to look into it more...
Ah the wrong kword desktop file was used. Indeed, I can reproduce the bug now. Will fix.
SVN commit 907990 by dfaure: Add missing X-DBUS-ServiceName=org.koffice.kmyapp lines in order to fix the klauncher error msg when starting koffice apps by clicking on a file in a filemanager for instance. (I did kword and kpresenter in a separate commit). Fix will be in koffice-2.0-beta6 BUG: 156339 M +1 -0 filters/krita/bmp/krita_bmp.desktop M +1 -0 filters/krita/openexr/krita_openexr.desktop M +1 -0 filters/krita/png/krita_png.desktop M +1 -0 filters/krita/raw/krita_raw.desktop M +1 -0 kchart/kchart.desktop M +1 -0 kformula/kformula.desktop M +1 -0 kivio/src/part/kivio.desktop M +1 -0 krita/krita.desktop M +1 -1 krita/sdk/templates/filefilter/krita_APPNAMELC.desktop M +1 -0 kspread/kspread.desktop WebSVN link: http://websvn.kde.org/?view=rev&revision=907990
For info: for kde-4.2 I also made klauncher more tolerant so that kword registering as org.koffice.kword works even without the key in the desktop file, i.e. klauncher expects something of the form "*.kword", any domainname works -- see bug 75492 comment 32.