Bug 75492

Summary: KDEInit could not launch <program>
Product: [Frameworks and Libraries] kdelibs Reporter: dale <rdalek1967>
Component: kdeinitAssignee: kdelibs bugs <kdelibs-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: 4moonbeam, ahmedbassi, alexc223, arn.epsilon, asklemet, bugsbyhp, david.a.foote, faure, frankebay99, gonzabrusco, jackoshanter, jan.mette, jared.harder, jklsemicolon, klich.michal, kouzinopoulos, l.lunak, lynch.subscribe, mrzfbb, papadako, psychonaut, rdieter, sgh, shawvrana, upscope, webmaster, wstephenson
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:

Description dale 2004-02-18 07:41:22 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
OS:          Linux

I have Gentoo installed and up to date, just ran emerge sync and emerge -u kde.  I use a 2.6 kernel as well.  I recently upgraded to KDE 3.2.0 but still have one problem that seems to have carried over from previous version of KDE.  I had hoped the upgrade would fix.

If I open Konqueror as root and try to open a text file using Kwrite I get the error above.  It works fine as a regular user but not when I am root.  It will not work with pictures or any other file type that I want to open either.  It refuses to launch a app no matter what it is.

I have so far removed KDE and then re-installed KDE and still have the same problem.  It has not worked since a couple of months ago before the upgrade.  I did have the same problem in Mandrake a long time ago.  I could reboot and it would work fine for a while but this error in Gentoo is constant, never changes at all.  I suspect a conf file somewhere.  I can launch Kwrite and the other apps from the start menu just fine.  The apps do work.  I can use the preview thing too.

I have logged in to KDE as root and it works fine then but not when logged in as a regular user and switching.

The execution line in properties for the link to the app is this:

kfmclient openProfile filemanagement

I have tried with what little knowledge I have and have searched for a solution but have had no luck with a fix.  I would like to know how to fix this.  If you need me to, I will delete a file so that it will remake it if needed.  Basically, I'm getting desperate.  I'm even considering ordering up to date CD's and starting over with a fresh install, something Linux should not require.  That is what windoze users have to do.

If you need more info or have any suggestions, please e-mail me or post here.  

Thanks for the help.  I'm stumped.

Dale
Comment 1 dale 2004-02-22 10:25:25 UTC
OK.  A little update on what I found.  If I right click on desktop and select run command, then type in konqueror and check run as root, it opens kwrite just fine.  NO errors.  It seems to have something to do with kfmclient command for some reason.

I am still willing to try something, if you think of something to try.

I will update when I find out something new.  I am also about to upgrade the kernel again.  It will be 2.6.3 with supermount patched in.  :-)  May not make any difference but I like being up to date.  It is compiling as I type.

Let me know if you need more info.

Thanks!!!!

Dale
Comment 2 dale 2004-03-14 09:12:36 UTC
I just updated to 3.2.1 with no change in the problem.  

Still no clue on this end.

Thanks

Dale
Comment 3 Nadav Kavalerchik 2005-01-16 16:17:49 UTC
i get a similar notice ("KDEinit couldn't lunch the kfmclient") after generating an html from the digikam's export to html plug in (ver 0.7.1) but i got it earlier from other versions too. tho, the konqueror opens up and shows the page correctly... funny. it seems the error notice is not relevant, because there is no problem at all.
(i'm using kde 3.3.2 FC3 rpms)
Comment 4 Peter Vollebregt 2005-02-14 23:02:36 UTC
This error has harassed me through several SuSE and KDE versions. At the moment i am using Release 3.3.92 (beta 2) level "a" on SuSE 9.1 and it pops up with watever i do from konqueror as su. Note that the same happens when i use Krusader as a file manager. When i use mc to edit - no problem. When i open the file directly from a su shell (with /opt/kde3/bin/kwrite /etc/fstab) there is no problem.

This is security related and has to do with the .Xauthority file (mechanism) to block other users from looking graphically at files.

In former versions logging out of KDE and logging in again solved the issue (don't know if this is related to having another konquerer instance open). Sometimes i had to delete the .Xauthority file (from root) to get it to work.

What works (but not always) is to run as root in a shell 'xauth merge /home/<mortal user>/.Xauthority' (where mortal user is the user you are running as). This allows access if konqueror in root mode is opened again. But sometimes i have to run 'xhost + localhost' to solve the problem.

The problem pops up i think after upgrading KDE although i am not sure. but i really hate this because working in mc to change text files is no fun when you want to use kate or kwrite....
Comment 5 2007-07-04 23:41:48 UTC
Im using kde-3.5.7 from branch_3.5 svn release 682124 and when running konqueror as root, when double clicking in a file i get the error "KDEInit could not launch 'app'", in case of test files i get:

KDEInit could not launch 'kwrite'

I was told that this is a distro problem but what i have seen that is false since this problem exists in all distros i know, from mandriva, suse, fedora, etc...
Comment 6 2007-07-04 23:43:39 UTC
unbelivable that this was reported almost 4 years ago and continues being a valid bug...
Comment 7 Pedro Morgan 2008-03-15 14:32:47 UTC
Then I launch a file from Dolphin (Kubuntu latest 4.0+ series

1) I right click on "foo.js" for example and select open with Kate. Works cool
2) Second time I try to open "any" file with kate I get the message

============================================
Sorry - Dolphin
============================================
KDEInit could not launch '/usr/lib/kde4/bin/kate'

Comment 8 Ralph Janke 2008-03-23 17:52:34 UTC
This is also confirmed in https://bugs.launchpad.net/ubuntu/+source/kdelibs/+bug/205517 
Comment 9 kate.g.gordon 2008-05-30 07:30:28 UTC
I still have this problem from Konqueror (trying to open any file associated with Kate by left-click), and "Run Command Interface" (typing in "kate"):

======================================================
Sorry - Konqueror OR Run Command Interface
======================================================

KDEInit could not launch '/usr/lib/kde4/bin/kate'

However, this _only_ occurs (afaik) when Kate is already open -- very occasionally, not even then (although because of the rarity, I haven't been able to work out what's different)

Using Kubuntu KDE 4.0.3
Comment 10 Lubos Lunak 2008-05-30 11:06:44 UTC
*** Bug 162729 has been marked as a duplicate of this bug. ***
Comment 11 Lubos Lunak 2008-05-30 11:06:57 UTC
*** Bug 155873 has been marked as a duplicate of this bug. ***
Comment 12 Lubos Lunak 2008-05-30 11:07:07 UTC
*** Bug 162870 has been marked as a duplicate of this bug. ***
Comment 13 David Faure 2008-05-30 11:17:40 UTC
Lubos: I don't think those bugs were duplicates of 75492.
They were kde4-specific bugs, due to X-DCOP-ServiceType, which I fixed recently.
Comment 14 Bassio 2008-06-03 13:14:03 UTC
I have kde 4.0.3 on hardy heron kubuntu and many message boxes appear with the above complaint "KDEInit could not launch <program>" although the program appears to open!!

I did not track when does this exactly happen, but it occurs most often when I try to launch kde 3 apps (esp. from the ALT+F2 launcher "emphasis on the previous" .. or even kate from konqueror etc.)

I will try to notice a pattern the next few days.
Comment 15 Christophe Marin 2008-06-11 10:45:52 UTC
*** Bug 163768 has been marked as a duplicate of this bug. ***
Comment 16 Haris Kouzinopoulos 2008-06-11 11:26:24 UTC
Still valid on 4.1 Beta1, confirming this bug
Comment 17 abostock 2008-07-01 15:26:23 UTC
Problem still occurring in KDE 4.1 beta 2 (on kubuntu).
Comment 18 David Faure 2008-07-01 20:27:18 UTC
... with which program and which .desktop file for it?
Comment 19 Christophe Marin 2008-07-04 18:56:04 UTC
*** Bug 165729 has been marked as a duplicate of this bug. ***
Comment 20 Javier Jardon 2008-07-23 13:35:59 UTC
Problem still occurring in KDE 4.1 rc1 (on kubuntu). 
Comment 21 Jose 2008-07-31 14:14:22 UTC
Bug valid in 4.1 final release.
Comment 22 Jithin Emmanuel 2008-08-18 06:21:48 UTC
I have this problem with fedora 9  kde 4.1 
Comment 23 David Faure 2008-08-18 19:30:44 UTC
Comments #19 to #22 are useless since they don't answer my question: which application and what does the desktop file say about DBus.

Now that I fixed kdelibs for 4.1 (not read the DCOP-related property anymore), the remaining bugs are in the desktop file of the application you're trying to launch (or in old local overrides in ~/.kde or $KDEHOME). See bug 157853 for more information about what should be in the desktop file.
Comment 24 Will Stephenson 2008-09-20 18:23:01 UTC
David: please see https://bugzilla.novell.com:443/show_bug.cgi?id=420150

I'm getting this error on openSUSE when text/plain is associated with "kate --use %U" - kate passes the url to an existing kate instance, then the kate process started by kdeinit exits and because it has X-DBUS-StartupType=Multi klauncher thinks there was an error.  I don't know how to fix this in the desktop file as kate never registers itself uniquely on the bus, so a separate .desktop file for using an existing instance with StartupType=Unique would fail.

This doesn't happen in KDE3.  Any idea why not?
Comment 25 Götz 2008-09-26 06:05:55 UTC
In openSUSE 11 with KDE 4.1.1 I don't suffer this bug any more :)
Comment 26 Tristan Miller 2008-10-06 20:21:20 UTC
I am encountering this problem for the first time with KDE 4.1.2 on openSUSE 11.0.  I can reliably reproduce it as follows:

1. Type "krunner" from a terminal or press Alt-F2 to launch KRunner.

2. Type "ktorrent" and hit enter. (So far this seems to be a problem only when running ktorrent; every other application I've tried doesn't trigger the error.)

3. Ktorrent starts up just fine, but something (KRunner? KDE?) pops up the following error dialog:

Sorry - Run Command Interface

KDEInit could not launch '/usr/bin/ktorrent'

Also, the following message appears on the console:
findServiceByDesktopPath:  not found

4. If you click OK in the error dialog, it disappears, and the following message is printed to the console:

X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x200053b
Comment 27 David Faure 2008-10-07 10:34:55 UTC
Tristan: see comment #23: please report what the .desktop file says...
Comment 28 Gonzalo 2008-10-14 20:17:05 UTC
Happens here to. KDE 4.1.2

Steps to reproduce it:

1- Change file association of (fro example) .cpp to kate.
2- Make sure you use the option --use when launching kate (in order to reuse the open session, if any).
3- Open a .cpp. Everything goes right.
4- Open another .cpp. Kate opens the file in the current session but the "KDEInit could not launch <program>" message appears anyway.

This keeps happening everytime you repeat step 4.

The same exact thing happens with ktorrent.
Comment 29 David Faure 2008-12-16 02:25:02 UTC
Investigated #28: (kate --use): if you modify kate.desktop,  then this is kind of expected behavior, since kate.desktop says "I will register to DBUS" (X-DBUS-* lines). I guess for KDE 4.3 we should have a combo in the properties dialog in order to be able to change the dbus registration type, even though this is a rather technical setting (but it goes together with being able to change the Exec line).

The right way of setting this up for now is to add a new application in the filetypes editor with the command line kate --use %u. When trying this I hit a bug in kopenwithdialog which would save it as %25u, fixed for kde-4.2. The startup notification takes a bit of time to go away, but at least there's no klauncher error message.

I wish we hadn't done so much merging with this bug, each occurence of this bug is a separate problem.
I didn't investigate the initial "running apps as root" issue yet, that's rather more complicated.
Comment 30 Dario Andres 2008-12-19 14:21:16 UTC
*** Bug 173980 has been marked as a duplicate of this bug. ***
Comment 31 Dario Andres 2009-01-06 14:34:58 UTC
*** Bug 163835 has been marked as a duplicate of this bug. ***
Comment 32 David Faure 2009-01-15 01:03:36 UTC
SVN commit 911168 by dfaure:

Let klauncher be a bit more tolerant about dbus names: don't assume that kfoo will register as org.kde.kfoo
when its desktop file doesn't have X-DBUS-ServiceName, allow the domainname to be anything, i.e. watch
for "*.kfoo". This should minimize the number of occurences of the famous klauncher error quite a lot.
This fix will be in KDE-4.2.
CCBUG: 75492


 M  +21 -7     klauncher.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=911168
Comment 33 Christophe Marin 2009-01-26 16:45:13 UTC
*** Bug 181990 has been marked as a duplicate of this bug. ***
Comment 34 Harri Pasanen 2009-01-28 14:36:31 UTC
I got the same from starting konsole in KDE 4.2, Kubuntu 8.10.  I did not have it in 4.2 RC1.

.xsession-errors shows:

kdeinit4: preparing to launch /usr/bin/konsole
konsole(7114): Attempt to use QAction "change-profile" with KXMLGUIFactory!
kwin: X Error (error: <unknown>[DAMAGE+0], request: XDamageDestroy[DAMAGE+2], resource: 0x14256e0)

Testing further the problem seemed to be something in konsole settings.   I've been in the habit of hiding the menu bar, and there has been another bug with respect to that as well, it did not work in 4.2RC1.  Now after few trials back and forth I managed to make the menu bar stay hidden in new terminal, and the KDEinit error disappeared as well.  So possibly migrated app settings from earlier releases can surface as KDEInit errors?
Comment 35 Shaw Vrana 2009-01-28 18:58:55 UTC
I get the same error message when I run konsole in 4.2.  konsole is being run via a desktop icon.  Turning off dbus registration by right clicking, properties, application, Advanced Options, and changing 'DBUS Registration' to none removed the error message.

I have a global hotkey setting for konsole for which this did not work..perhaps it's using a different configuration file for which dbus registration has not been disabled, but I haven't figured out how to disable it.
Comment 36 MoonBeam 2009-01-28 19:06:31 UTC
I am usinge KDE 4.2 with Arch Linux.
Every time I start second (and every other) instance of  Konsole I get this error:

"KDEInit could not launch '/usr/bin/konsole'."

It starts, but this bug is very annoying.
Comment 37 Rex Dieter 2009-01-28 21:00:23 UTC
In my experience, these are often per-application bugs with missing
X-DBUS-ServiceName=...
entries in their respective .desktop files.

I'll try addressing konsole separately in bug #162729 , and will take a look at others when I can.
Comment 38 Rex Dieter 2009-01-28 21:44:59 UTC
SVN commit 917940 by rdieter:

Add X-DBUS-ServiceName to konsole.desktop
should help "KDEInit could not launch '.../konsole'" type errors

BUG: 162729
CCBUG: 75492


 M  +1 -0      konsole.desktop  


WebSVN link: http://websvn.kde.org/?view=rev&revision=917940
Comment 39 Rex Dieter 2009-01-28 21:45:12 UTC
SVN commit 917944 by rdieter:

Backport from trunk:
Add X-DBUS-ServiceName to konsole.desktop
should help "KDEInit could not launch '.../konsole'" type errors

BUG: 162729
CCBUG: 75492


 M  +1 -0      konsole.desktop  


WebSVN link: http://websvn.kde.org/?view=rev&revision=917944
Comment 40 Rex Dieter 2009-01-28 21:49:41 UTC
arg, missed comment #32, odd that folks are still seeing this (at least I could still reproduce with kde-4.2.0)
Comment 41 david.a.foote 2009-01-29 00:51:01 UTC
Hello.  I just upgraded to KDE 4.2 and am experiencing kdeinit errors.  While trying to run k3b, i got an error saying that k3b could not talk to klauncher and was unable to run the app.  When opening konsole, i got a message saying that kdeinit could not launch /usr/bin/konsole.  I use Kubuntu 8.10.
Comment 42 Götz 2009-01-29 01:39:37 UTC
In Kubuntu 8.10 with the kubuntu-experimental PPA I don't have this bug.

Also in my /usr/share/applications/kde4/konsole.desktop I don't have X-DBUS-ServiceName, Maybe it is a user configuration problem, can you test if with a new user the problem persists?
Comment 43 Christoph Roeder 2009-01-29 09:40:27 UTC
Same problem here...

Adding the fix from rev. 917944 fixes the problem for me.

PS: using kubuntu 8.10 with kubuntu-experimental PPA
Comment 44 Jared Harder 2009-01-29 23:14:27 UTC
I'm getting similar functionality after upgrading to KDE 4.2 (Ubuntu 8.10 repositories).  I click on a text file in Dolphin, and I get 

"KDEInit could not launch '/usr/lib/kde4/bin/kate'."

This happens if Kate is open or closed.

I notice though that /usr/lib/kde4/bin/ doesn't exist, so /usr/lib/kde4/bin/kate cannot exist.  Kate appears to be located at /usr/bin/kate

Comment 45 David Faure 2009-01-30 13:46:40 UTC
SVN commit 918654 by dfaure:

Repair klauncher support for unique-applications like konsole.
  (adding org.kde.konsole in konsole.desktop was just a workaround, org.kde is still assumed when not present)
Brown paper bag for me - now expecting tons of new klauncher error reports from 4.2.0... :(
Fix will be in 4.2.1.
CCBUG: 162729
CCBUG: 75492


 M  +42 -18    klauncher.cpp  
 M  +1 -0      klauncher.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=918654
Comment 46 david.a.foote 2009-01-30 21:37:14 UTC
I added the line Christoph suggested to konsole.desktop using kate but it didn't work for me, unfortunately.  Is there a way to uninstall kde 4.2 without having to do a reinstall?
Comment 47 Maurizio 2009-01-30 23:16:57 UTC
I just installed KDE 4.2 from Debian experimental (sidux amd64)
When opening a second konsole, i got a message saying that kdeinit could not launch /usr/bin/konsole.
however, the second konsole starts and works fine
Comment 48 András Manţia 2009-02-12 20:17:06 UTC
*** Bug 184044 has been marked as a duplicate of this bug. ***
Comment 49 Russ Fineman 2009-07-09 19:27:16 UTC
This says its resolved in Novel Bugzilla, but I'm experiencing this as normal user with KDE 4.2.4 release 2, Dolphin 1.2.1 on openSUSE 2.6.27.23-0.1-default.

When I click on a .sql document I get error KDEInit could not launch 'konsole'. Then get blank GUI that say user name: Kate for title and another GUI with user name: Kate with the sql displayed. My file association for .sql is :
        Kate
        Kwrite
        OpenOffice write
I did not change the file associations except for order of Kate and Kwrite. I also reported this on Bugzilla.
Comment 50 Frank 2009-09-02 03:38:20 UTC
Still reproducible with exact same behavior on openSUSE 11.2 64-Bits Milestone 6 with KDE4.3. It's very annoying as I have to go in konsole all the time to edit as root.
Comment 51 Russ Fineman 2009-09-02 17:19:46 UTC
Ref comment 49. I am still seeing this in openSUSE11.1 (2.6.27.29-0.1-default){2.6.27.29-0.1-default)[KDE 4.3.0 release 158] when opening a file from Dolphin with Kate as the editor.
Comment 52 Russ Fineman 2009-09-06 17:36:06 UTC
Ref comment #51. This appears resolved on my openSUSE 11.2 RC8-5, KDE4.3.1 test system. Still occurs on my openSUSE 11.1. production system. KDE 4.3.00 Release 158.
Comment 53 Frank 2010-01-06 16:18:19 UTC
In Final 11.2 openSUSE 64-bits KDE4.3.1, the problem persists and is worse.

Opening Dolphin (Super-User Mode) and trying to open a text file with Kwrite or Kate generates the error and cannot launch. What's worse is now if I open up konsole and do a 'sudo kwrite file.ext' it says 'Cannot start X'.

So the only 2 ways to edit a file as root is either using a console editor (vi, pico, ed, nano, etc.) or installing a small service menu which gives access to ROOT MENU ACTIONS in the Service Menu of Dolphin/Konqueror, such as http://kde-apps.org/content/show.php/Root+Actions+Servicemenu?content=48411.
Comment 54 Jack o'Shanter 2010-01-06 23:12:21 UTC
(In reply to comment #53)

Try kdesu instead of sudo.
Comment 55 Frank 2010-01-06 23:55:04 UTC
You are right, it's working, it's a valid workaround, though it forces user to use command line.

tnx
Comment 56 Papadakos Panagiotis 2010-02-12 10:16:00 UTC
I have the same problem with gwenview, when I launch it from krunner.
This is in Ubuntu lucid and I think it is happening in every version of KDE 4.

The message is:
KDEInit could not launch '/usr/lib/kde4/bin/gwenview',
when gwenview is in /usr/bin/gwenview
Comment 57 David Faure 2010-02-26 02:06:44 UTC
(In reply to comment #56)
> KDEInit could not launch '/usr/lib/kde4/bin/gwenview',

This error is obviously different from all previous errors in this thread --> it should have been a different bug report.

Do you have a .desktop file that contains Exec=/usr/lib/kde4/bin/gwenview?
(Look under /usr/share/applications, but also in ~/.local/share for instance)?

(In reply to comment #49)
> When I click on a .sql document I get error KDEInit could not launch 'konsole'.
This confuses me too, why would kate run konsole? Please use the filetypes editor to locate the .desktop file being use for kate, and check if that desktop file mentions konsole, or says Terminal=true.

Everyone:
I know that we usually frown at duplicates, but in this case it's really the opposite; this one report is becoming a mix of 10 different causes (~ 8 of them being fixed by now) for one error message. I strongly suggest opening a NEW BUG REPORT to anyone who comes here to add a comment.
I can see that there is one bug left with running stuff as root, but anything else looks like wrong .desktop files to me.
Comment 58 Russ Fineman 2010-02-26 20:32:03 UTC
(In reply to comment #57)
> (In reply to comment #56)
> > KDEInit could not launch '/usr/lib/kde4/bin/gwenview',
> 
> This error is obviously different from all previous errors in this thread -->
> it should have been a different bug report.
> 
> Do you have a .desktop file that contains Exec=/usr/lib/kde4/bin/gwenview?
> (Look under /usr/share/applications, but also in ~/.local/share for instance)?
> 
> (In reply to comment #49)
> > When I click on a .sql document I get error KDEInit could not launch 'konsole'.
> This confuses me too, why would kate run konsole? Please use the filetypes
> editor to locate the .desktop file being use for kate, and check if that
> desktop file mentions konsole, or says Terminal=true.
> 
> Everyone:
> I know that we usually frown at duplicates, but in this case it's really the
> opposite; this one report is becoming a mix of 10 different causes (~ 8 of them
> being fixed by now) for one error message. I strongly suggest opening a NEW BUG
> REPORT to anyone who comes here to add a comment.
> I can see that there is one bug left with running stuff as root, but anything
> else looks like wrong .desktop files to me.

In reply to comment #49 reply you sent. I am now running KDE 4.3.5, openSUSE 11.2 and still have a problem only when I run as root. Example: kdesu dolphin. When i click on a file I get the message:
KLauncher could not be reached via D-Bus. Error when calling  start_service_by_desktop_path:
The name org.kde.klauncher was not provided by any .service files

Not sure why I put Konsole, should have been kate. I selected a file from dolphin, said open with kate and got message. 

Since this is root related, I will wait until you solve that problem, or  let me know to open a new bug, if that is OK. 

I also have openSUSe 11.3 installed with KDE 4.4. I will check it there later today.

Thanks for you support.
Comment 59 Frank 2010-04-07 18:54:10 UTC
Maybe starting with comment #26 at https://bugzilla.novell.com/show_bug.cgi?id=450203#c26 there is a potential workaround.

Be careful, it's not really acceptable on a security point of view, but for single-user installation/usage it's less important.
Comment 60 Lubos Lunak 2010-05-31 19:17:30 UTC
SVN commit 1132903 by lunakl:

A somewhat hackish way of making kdeinit work in su sessions, but I couldn't
think of anything better. Kdeinit should still clean up properly in such
sessions and exit after a timeout, like dcopserver did in KDE3.
BUG: 75492



 M  +37 -0     kinit.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1132903