kdesu is not in $PATH

Bug #503847 reported by Jonathan Riddell
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ntfs-config
Triaged
Medium
Florent Mertens

Bug Description

kdesu is not in $PATH in KDE 4, it's in /usr/lib/kde4/libexec/kdesu

I've added the patch below to the package in Ubuntu. However this is not quite distro agnostic since KDE might not be installed to /usr so `kde4-config --prefix` should be used to find the prefix.

--- ntfs-config/ntfs-config-root.in 2010-01-05 17:30:54.000000000 +0000
+++ ntfs-config/ntfs-config-root.in 2010-01-05 17:44:38.000000000 +0000
@@ -53,12 +53,12 @@
         desktop = get_desktop()
         if desktop == "GNOME" and test_cmd("gksu") :
             auth = "gksu"
- elif desktop == "KDE" and test_cmd("kdesu") :
- auth = "kdesu"
+ elif desktop == "KDE" and test_cmd("/usr/lib/kde4/libexec/kdesu") :
+ auth = "/usr/lib/kde4/libexec/kdesu"
         elif test_cmd("gksu") :
             auth = "gksu"
- elif test_cmd("kdesu") :
- auth = "kdesu"
+ elif test_cmd("/usr/lib/kde4/libexec/kdesu") :
+ auth = "/usr/lib/kde4/libexec/kdesu"
         else :
             dialog("error", _("No authentication program founds"), \
                 _("ntfs-config need to be run as root, but I can't find\n"

Revision history for this message
Henning Moll (drscott) wrote :

Are you aware, that /usr/lib/kde4/libexec/kdesu is actually NOT using kdesu but kdesudo? Please also note, that the kdesu FAQ in the source code suggest the following:

Q: How do I use kdesu from a bash script?
A: kdesu is a libexec program, so does not normally reside in your PATH.
   Use something like:

     $(kde4-config --path libexec)kdesu -- program_to_run

So, the path should not be hard coded.
BTW: Does somebody know why kdesu is hidden under /usr/lib/kde4/libexec/kdesu? One can say that it doesn't matter as this is usually just a link to /usr/bin/kdesudo. So the real question is: Why is the real kdesu, which resides in /usr/lib/kde4/libexec/kdesu-distrib/kdesu, is not in PATH like kdesudo is? Please note, that /usr/lib/kde4/libexec/kdesu-distrib/kdesu is no link, but the real kdesu binary.

Revision history for this message
Henning Moll (drscott) wrote :

It's possible that kdesu is linked to kdesudo is a Ubuntu specific issue, isn't it?

Florent Mertens (givre)
Changed in ntfs-config:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Florent Mertens (givre)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.