Version: 4.0.1 (using 4.0.1 (KDE 4.0.1), Kubuntu packages)
OS: Linux (i686) release 2.6.22-14-generic
Klauncher doesn't seem to answer... In konqueror, the request of a new URL displays :
Could not start process Cannot talk to klauncher: Connection is closed.
While clicking on an icon (panel, desktop...) pops up a window with :
KLauncher could not be reached via D-Bus, error when calling start_service_by_desktop_name:
After this incident, there is only one klauncher process showed by a ps 'klauncher [kdeinit]', while there seem to be a second one when I restart KDE.There is on fathered by 'kdeinit4: kdeinit4 Run up', while the other has 'kdeinit Running...' as a father.
I have the same sort of situation with kded4 and kded... Could it be that there is a racing condition between the two ?
Hey David, I have run across quite a few of these now on Launchpad, however one guy attached some fairly decent traces as well as running Konqi from the command line to provide some further output. Here is the link for you to look over if you need to. Thanks!
I get a permission error on that bugs.launchpad.net URL, even though I'm logged in.
Does this bug still happen? (especially after revision 805923 - I committed today a fix for klauncher running kde3 desktop files... and you mention kde3's kded so maybe it helps).
It also happens in 4.1 beta, while selecting a Koffice file in Dolphin.
(fresh KDE4Daily) Happened to me today --> I cannot open KMenu.
Sounds like the kde3 klauncher is being started instead of the kde4 klauncher. Can you check the set up? Is the right klauncher in the PATH? Is KDEDIRS set to kde4? etc.
I kinda have this problem, if I pick a file on dolphin, right click, select open with > other and type kate, dolphin stops responding for awhile and then I get the
"KLauncher could not be reached via D-Bus, error when calling start_service_by_desktop_name:
It can be fixed by doing what is described in this comment ( https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/205517/comments/6 ) from this bug ( https://bugs.launchpad.net/ubuntu/+source/kde4libs/+bug/205517 ) [ I think no login is needed for these ].
I checked, and I seem to be running only one klauncher, which is the kde4 one.
> "/usr/lib/kde4/bin/kate %U". I changed %U into %u
%U is correct; kate can handle multiple urls in the command line.
1) there's a bug in the handling of %U
2) the fact that you change the Exec line makes a local copy of the desktop file in your KDEHOME,
and *that* is what works around the problem (not the %U->%u change itself).
Anyone trying this workaround, please double check if you have a kate.desktop file
in ~/.kde ~/.kde4 or ~/.local first.
Also, those who tried it already, please try if putting %U back in makes the bug come back.
Ok, so I've retested it on my openSUSE 11 / kde 4.0.4 and kde4daily, and it seems the bug is related to your #2 suggestion:
I searched for and deleted the kate.desktop file that was on ~/.local, tried it again, and it gave that error again; then I went to systemsettings and added and removed a space from the kate command line (so it would detect a change and create a new kate.desktop), and indeed it is confirmed, even with kate %U there is no problem.
So it seems that something (klauncher?) is having trouble starting kate in this case, it's not a problem with kate.
When you delete the kate.desktop from ~/.local, the question is, which kate.desktop is used then.
Please check all dirs returned by kde4-config --path xdgdata-apps
and those returned by kde4-config --path apps
I suspect the kde3 kate.desktop is being used.
I doubt it's using the kate.desktop from kde3, because it's the kde4 version that launches in both cases, and because neither kde4daily nor my current openSUSE 11 install have kde3 (the opensuse install has some kde3 stuff, but I don't have kate).
I also did a find / | grep "kate.desktop", and it found only the default kde4 one ( /usr/share/applications/kde4/kate.desktop ), after I'd deleted the one in .local again.
Do you want me to include here the output from the kde4-config stuff?
Strange... If you copy /usr/share/applications/kde4/kate.desktop to ~/.local/share/applications/, does it work then?
If you copy it to ~/.local/share/applications/kde4/, does it work then?
If it doesn't work when doing either one, please check if putting there the "local version that works", fixes it.
If yes, the answer lies in the difference between the global and the local file; I guess the local file that works
doesn't have the X-DBus-StartupType key? Can you try to find out if this line makes the difference, or which
other line makes a difference?
Sorry for having you do all the debugging, but I don't get this issue here so I can't do it myself.
Ok, so I've been trying with both kate.desktop files in ~/.local/share/applications/kde4/ -- the one created by systemsettings, and the system one. Just replacing one with the other triggers the bug immediately, so it really seems to be related to the .desktop file.
I'm attaching both .desktop files, but by looking at them I noticed that both have X-DBUS-StartupType=Multi, but the system one has "X-DBUS-ServiceName=org.kate-editor.kate" (on both suse and kde4daily), and I tried to remove just that line (that isn't present on the one created by ss), and it also seems to "fix" the problem.
So it seems to be related to the X-DBUS-ServiceName property, whatever that does.
Also, I should be the one to thank you for your time and patience.
Created attachment 25903 [details]
Original kate.desktop from opensuse 11.0
Created attachment 25904 [details]
kate.desktop created by systemsettings, which fixes the problem
Interesting, kate registers to DBus as org.kde.kate, not as org.kate-editor.kate!
1) klauncher has to give a better error message in this case (I can have a look at that)
2) the kate .desktop file is wrong. I'll fix it right now.
SVN commit 829142 by dfaure:
Commit r585903 by jowenn made kate register to dbus as org.kde.kate, but the desktop file wasn't updated so klauncher got very confused when trying to start up kate via its desktop file.
M +1 -1 kate.desktop
WebSVN link: http://websvn.kde.org/?view=rev&revision=829142
On Monday 07 July 2008, Ivo Anjo wrote:
> I went to systemsettings and added and removed a space from the kate command line
Oh, and 3) this action shouldn't change the X-DBUS-ServiceName.
Where exactly in systemsettings are you changing the kate command line?
In the filetypes editor, after looking for text/plain?
Thanks for fixing it, this is one of those bugs that is really annoying.
Yeah, filetypes editor, text/plain, select kate, edit, application, command. Also, if you compare the two files, it seems this "edit" is completely recreating the desktop file, with all the translations and most other stuff being thrown away.
I was reading comment #3 and decided to test kword on kde4daily, and it seems kword, kspread, kpresenter, kivio, krita also suffer from something similar.
[kexi, kplato, karbon don't seem to have it].
They don't have a X-DBUS-ServiceName, but I removing the X-DBUS-StartupType=Multi from kword.desktop, and it seemed to fix it, so, this time really is the StartupType.
It seems this also happens with ktorrent that has X-DBUS-StartupType=Single .
To repeat this I did what I always do: pick a random file on dolphin, right click, select open with, and type ktorrent.
Commenting the X-DBUS-StartupType line on the desktop file "fixed" it.
So maybe this deserves reopened? There seem to be a lot of apps where this happens. Or is the bug related to the open-with dialog and klauncher?
*** Bug 163768 has been marked as a duplicate of this bug. ***
*** Bug 161043 has been marked as a duplicate of this bug. ***
*** Bug 157407 has been marked as a duplicate of this bug. ***
*** Bug 164671 has been marked as a duplicate of this bug. ***
Since bug 164671 was marked as duplicate, reopening.
*** Bug 166895 has been marked as a duplicate of this bug. ***
Created attachment 26268 [details]
dbus-monitor log while konqueror tries to contact klauncher
I have a similar problem here: for some reason a konqueror process cannot
communicate with klauncher ("Cannot talk to klauncher: Connection is closed")
and every time I try to visit an URL kbuildsycoca4 is launched. When I launch a
new konqueror process, the message "Konqueror didn't close correctly" appears,
even though the previous session is still running, and the new process works
fine, like every other KDE application (kontact, akregator, dolphin).
I'm using the KDE 4.0.99 (4.1 RC1+) RPMs from the opensuse factory.
Well the exact same thing happened to me today (while it worked perfectly before) after modifying the mode for a gpx file to display it as an xml ...
Klauncher message , then the whole system begins to go heratic , mouse goes nuts , keyboard follows , the HD went wild ... I had to hard reboot , the same thing happened whenever I opened a gpx file with kate ...
I found this bug report , removed the X-DBUS-ServiceName line but it didn't change a thing ...
But removing also the X-DBUS-StartupType line seems to have fixed it ...
Kubuntu 8.04 - 126.96.36.199 - KDE 4.00.98 (kate still 4.00.83)
*** Bug 167106 has been marked as a duplicate of this bug. ***
*** Bug 167270 has been marked as a duplicate of this bug. ***
*** Bug 151760 has been marked as a duplicate of this bug. ***
*** Bug 168883 has been marked as a duplicate of this bug. ***
*** Bug 169017 has been marked as a duplicate of this bug. ***
I have this problem with Kcachegrind I use kde 4.1 fedora core9
same with ktorrent from archlinux
removing: "X-DBUS-StartupType=Unique" from desktop file solves this problem
Name : ktorrent
Version : 3.1.2-1
URL : http://ktorrent.org
Licenses : GPL
Groups : None
Provides : None
Depends On : kdelibs>4 gmp qca
Optional Deps : None
Required By : None
Conflicts With : None
Replaces : None
Installed Size : 12204.00 K
Packager : Hugo Doria <firstname.lastname@example.org>
Architecture : i686
Build Date : Wed 13 Aug 2008 08:24:29 PM EEST
Install Date : Thu 04 Sep 2008 10:31:49 PM EEST
Install Reason : Explicitly installed
Install Script : No
Description : A BitTorrent program for KDE
SVN commit 871391 by rdieter:
similar fix as for kate and bug #157853 comment #16
M +1 -0 ktorrent.desktop
WebSVN link: http://websvn.kde.org/?view=rev&revision=871391
oops, reopening. just fixed the ktorrent side of the issue... may well be other misbahaving apps (tho, I'd argue each should have their own bug)
*** Bug 173784 has been marked as a duplicate of this bug. ***
This happened to me today. I just installed Kubuntu 8.10 running KDE 4.1.3. I navigated through the K menu to find the Konsole icon. I right-clicked it and added it to the Desktop. I think clicked on the icon on the desktop to open the console. The system froze for a few moments and then I got the following error:
KLauncher could not be reached via D-Bus. Error when calling start_service_by_desktop_path:
Interestingly, after that happened, I was also no longer able to launch the Konsole from the K menu. I would get the same error! I re-started X in order to launch Konsole from the K Menu, but I did not attempt to add it to the desktop again.
The error message with "empty" is fixed for 4.2 (possibly even 4.1.3, I forgot if I backported that one).
The error when launching kcachegrind was 169017, fixed.
Rex fixed ktorrent, thanks.
kde3 apps (like kde3-koffice) was fixed for 4.1.x (DCOP key isn't parsed as being valid for DBUS anymore).
And I just fixed the kioexec case, as well as a more general porting bug in klauncher, in case any of the duplicates was about that.
I think this fixes all the cases mentionned here, if not, please open a new kdelibs bug report (or reopen those merged-in duplicates which are not solved in 4.2), I'm getting confused by all the various issues mixed up in the same report.