Bug 271264 - Can't start krusader in root mode from the Tools menu
Summary: Can't start krusader in root mode from the Tools menu
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.0.0
Platform: Mageia RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Lepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 04:46 UTC by Ahmad Samir
Modified: 2012-02-26 22:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.0-beta1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Samir 2011-04-19 04:46:16 UTC
When I open Tool -> "Start Root Mode Krusader", after typing the root password, I get this error message:
Cannot execute command ' '/usr/bin/krusader --left=file:///home/KDE --right=file:///home/KDE''.

the problem stems from the fact that kdesu needs to be loaded with the '-c' switch when the command is supposed to be executed as one string.

This patch fixed the issue:
--- krusader-2.0.0/krusader/krslots.cpp 2011-04-19 01:21:22.725908212 +0200
+++ krusader-2.0.0/krusader/krslots.cpp.new     2011-04-19 02:34:25.573686085 +0200
@@ -561,7 +561,7 @@
   }
   
   KProcess proc;
-  proc << KrServices::fullPathName( "kdesu" ) << KrServices::fullPathName( "krusader" )
+  proc << KrServices::fullPathName( "kdesu" ) << "-c" << KrServices::fullPathName( "krusader" )
        + " --left=" + MAIN_VIEW->left->func->files()->vfs_getOrigin().url()
        + " --right=" + MAIN_VIEW->right->func->files()->vfs_getOrigin().url();
Comment 1 Christoph Feck 2011-04-24 18:22:59 UTC

*** This bug has been marked as a duplicate of bug 265026 ***
Comment 2 Ahmad Samir 2011-04-24 21:43:09 UTC
I don't see how this is a dupe of bug 265026.

The command actually passed by krusader is:
'/usr/bin/krusader --left=file:///home/a --right=file:///home/a'

exactly like that with the quotes; so this:
/usr/lib64/kde4/libexec/kdesu '/usr/bin/krusader --left=file:///home/a --right=file:///home/a'

will fail with:
Cannot execute command ' '/usr/bin/krusader --left=file:///home/KDE
--right=file:///home/KDE''.

The way krusader invokes kdesu, doesn't work without '-c', AFAICS.
Comment 3 Kevin Kofler 2011-05-24 07:33:25 UTC
Indeed. This is not fixed in kdelibs 4.6.2, it doesn't work with 4.6.3 either. I think the patch to Krusader is the best solution. Reopening.
Comment 4 Oswald Buddenhagen 2012-02-04 08:36:28 UTC
this is a "semantic duplicate" of bug 264947 (the "parent" of bug 265026), which makes this a krusader bug, indeed, and the proposed fix is correct.
Comment 5 Jan Lepper 2012-02-26 22:08:01 UTC
The fix is included in 2.4.0-beta1.