[KDE4] in Konsole sudo can not execute programs (e.g. kate)

Bug #199787 reported by Onlinelli
2
Affects Status Importance Assigned to Milestone
kubuntu-default-settings (Ubuntu)
Incomplete
Medium
Daniel Hahler

Bug Description

in KDE 4 (Hardy) i cannot exectute programms with 'sudo', e.g. editing the xorg.conf with kate.

nelli@chuck-norris:~$ sudo kate /etc/X11/xorg.conf
sudo: kate: command not found

Revision history for this message
Daniel Hahler (blueyed) wrote :

What the output of the following command on your system?
$ sudo sh -c 'echo $PATH'

For me it works, and the output is:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

Changed in kubuntu-default-settings:
assignee: nobody → blueyed
importance: Undecided → Medium
status: New → Incomplete
Revision history for this message
Onlinelli (cornelius-maihoefer) wrote :

$ sudo sh -c 'echo $PATH'

gives

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin

but for me it still does not work.... How can I provide more information?

Revision history for this message
Paul Hoell (hoellp) wrote :

Same problem here.
I use Hardy-KDE4 64 bit and there is no way for me to execute kate or kwrite with su-permissions. kdesu gives the same error (command not found).
My Path is the same as Daniel's (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin) but it seems kate-kde4 (which is also known to the system as kate) is located in /usr/lib/kde4/bin/kate which is obviously not in the path.
It works as normal user, so it seems the problem is restricted to the root-path.

Revision history for this message
Paul Hoell (hoellp) wrote :

I tried adding /usr/lib/kde4/bin to my path, but that just works for the userpath.
So echo $PATH now shows '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/kde4/bin' but it still can't find kate.
The strangest thing is, that tab completion for sudo ka<Tab> shows kate, but when i to execute it won't find it.
Executing sudo /usr/lib/kde4/bin/kate directly does work though...

Revision history for this message
Onlinelli (cornelius-maihoefer) wrote :

This bug is a duplicate of https://bugs.launchpad.net/ubuntu/+source/kdesudo-kde4/+bug/191264 so it should be closed.

Revision history for this message
Ralph Janke (txwikinger) wrote :

sudo should not be used to start kde applications from commandline. Please use kdesu or kdesudo instead.

However, both those have the same problem as seen in https://bugs.launchpad.net/ubuntu/+source/kdesudo-kde4/+bug/191264.

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.