[SOLVED] - kdesu doesn't work

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] - kdesu doesn't work

Postby gohlip » Apr 21st, '13, 05:55

I installed package 'sudo' and this works fine at user terminal (after amending /etc/sudoers).
However, to use gui apps (like kwrite or kate), command 'kdesu' does not work (I assume neither would gksu, but I don't use gnome).
Code: Select all
bash: kdesu: command not found

If I use only 'sudo' for gui, eg., I get
Code: Select all
$ sudo kwrite /boot/grub2/custom.cfg
[sudo] password for .......
No protocol specified
kwrite: cannot connect to X server :0
(but that is to be expected)

Also checked that I have kdebase4 installed.
How can I get kdesu to work? Thanks.

ps: I'm on m3b4, but I don't suppose that makes any difference (but systemd...?).
Last edited by gohlip on Apr 21st, '13, 16:17, edited 1 time in total.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby doktor5000 » Apr 21st, '13, 10:42

kdesu has nothing to do with systemd, and also not with sudo.
Can't tell for cauldron, but in Mageia 2 kdesu comes with kdebase4-runtime, but the problem is it's not in $PATH.
E.g. i created a symlink to be able to use it easily:

[doktor5000@Mageia2 ~]$ ls -al /usr/bin/kdesu
lrwxrwxrwx 1 root root 29 Jan 19 18:59 /usr/bin/kdesu -> /usr/lib64/kde4/libexec/kdesu*


If you want to use sudo with GUI apps, you probably need to use sudo -E to preserve your environment variables.
This is the case since at least Mageia 1. I'm using an alias for that, works fine:
Code: Select all
[doktor5000@Mageia2 ~]$ alias sudo
alias sudo='sudo -E'
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 11:35

Thanks again for your response.

doktor5000 wrote:kdesu has nothing to do with systemd, and also not with sudo.
Yes, I think you're right.
doktor5000 wrote:Can't tell for cauldron, but in Mageia 2 kdesu comes with kdebase4-runtime, but the problem is it's not in $PATH.
kdebase4-runtime was also installed.
doktor5000 wrote:E.g. i created a symlink to be able to use it easily:

[doktor5000@Mageia2 ~]$ ls -al /usr/bin/kdesu
lrwxrwxrwx 1 root root 29 Jan 19 18:59 /usr/bin/kdesu -> /usr/lib64/kde4/libexec/kdesu*


If you want to use sudo with GUI apps, you probably need to use sudo -E to preserve your environment variables.
This is the case since at least Mageia 1. I'm using an alias for that, works fine:
Code: Select all
[doktor5000@Mageia2 ~]$ alias sudo
alias sudo='sudo -E'

I did the above link and alias, unfortunately, I still could not get kdesu to work.
Code: Select all
ls: cannot access /usr/bin/kdesu: No such file or directory
but alias command has no error and I assume is performed.
I then use "ln" instead of "ls" thinking it might be a typo, but same error message.

doktor5000, this is not a show-stopper (meaning it is not a big deal as I can still go to root terminal "su -" and do my things there) but I want to thank you again for your help. Having sudo alone is a great utility itself and I was hoping to use kdesu as well.
Danke.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby alf » Apr 21st, '13, 13:16

to create the link use
Code: Select all
ln -s /usr/bin/kdesu /usr/lib64/kde4/libexec/kdesu
for windows problems reboot; for linux problems be root
alf
 
Posts: 326
Joined: Apr 1st, '11, 23:07
Location: DE Paderborn

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 14:02

Thanks alf,
but following results...
Code: Select all
ln: failed to create symbolic link ‘/usr/lib64/kde4/libexec/kdesu’: File exists
and I still cannot kdesu :)

Googling this gives an interesting find..
http://lists.kde.org/?l=kde&m=135698471620558
> A few months ago, the last time a topic like this came up on the kde
> lists, I actually tried kdesu and kdesudo and discovered they no
> longer even worked.

but honestly, I don't know what polkit is all about. :)
I also have Chakra (with systemd) and Kubuntu and both works with kdesu (kdesudo) at installation..

Thanks everyone, and as I mentioned, there's no need to sweat this.
Cheers!

[edit] sudoedit works....but I'd rather not.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby tom_ » Apr 21st, '13, 14:28

try:

Code: Select all
sudo ln -s  /usr/lib64/kde4/libexec/kdesu /usr/bin/kdesu
tom_
 
Posts: 423
Joined: Sep 3rd, '11, 12:26
Location: Porto Ercole, Italy

Re: kdesu doesn't work

Postby doktor5000 » Apr 21st, '13, 14:37

@gohlip: Please don't mangle everything together.

1. sudo has no relation to kdesu, so the alias "sudo -E" is only for sudo, but you mentioned it together, when trying to get kdesu to work.
2. please show the output of the following command:
Code: Select all
ls -al /usr/bin/*kdesu*

3. If you post error messages, always post them together with the command that produced them.
4. sudo alone is not enough, in a graphical desktop session one often may need kdesu/gksu.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 15:18

doktor5000, here goes...
Code: Select all
$ ls -al /usr/bin/*kdesu*
ls: cannot access /usr/bin/*kdesu*: No such file or directory


Cheers!
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 15:24

more...to make clear.

Code: Select all
[pop@localhost ~]$ sudo kate /boot/grub2/custom.cfg
[sudo] password for pop:
No protocol specified
kate: cannot connect to X server :0
[pop@localhost ~]$ sudo mount /dev/sda5 /media/Bolt
[pop@localhost ~]$ sudo umount /media/Bolt
[pop@localhost ~]$ kdesudo kate /boot/grub2/custom.cfg
bash: kdesudo: command not found
[pop@localhost ~]$ sudo urpmq polkit
polkit
[pop@localhost ~]$ sudo urpmi polkit
Package polkit-0.107-6.mga3.x86_64 is already installed
Marking polkit as manually installed, it won't be auto-orphaned
writing /var/lib/rpm/installed-through-deps.list
[pop@localhost ~]$ kdesudo kate /boot/grub2/custom.cfg
bash: kdesudo: command not found
[pop@localhost ~]$ ls -al /usr/bin/*kdesu*
ls: cannot access /usr/bin/*kdesu*: No such file or directory
[pop@localhost ~]$ su -
Password:
[root@localhost ~]# ls -al /usr/bin/*kdesu*
ls: cannot access /usr/bin/*kdesu*: No such file or directory
[root@localhost ~]#


[edit]oops...I should use kdesu not kdesudo
Code: Select all
[pop@localhost ~]$ kdesu kate /boot/grub2/custom.cfg
bash: kdesu: command not found
[pop@localhost ~]$




thanks again.
Cheers!
Last edited by gohlip on Apr 21st, '13, 15:46, edited 2 times in total.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby doktor5000 » Apr 21st, '13, 15:45

Well, your last post is totally mixed up.

1. for the first command, try again with
Code: Select all
sudo -E kate /boot/grub2/custom.cfg

2. There's no kdesudo, only kdesu - kdesu is normally used inside a KDE session to start graphical apps (like systemsettings) and it should already be working there - try Alt+F2 and enter kdesu systemsettings
3. ls only shows files/directories/links, it does not create them. Look for tom's post how to create the symlink to make kdesu available in a terminal for your user.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18066
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 15:53

Code: Select all
[pop@localhost ~]$ kdesu kate /boot/grub2/custom.cfg
bash: kdesu: command not found
[pop@localhost ~]$ sudo -E kate /boot/grub2/custom.cfg
[sudo] password for pop:
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
Error: "/var/tmp/kdecache-pop" is owned by uid 1000 instead of uid 0.
kate(2457)/kdeui (kdelibs): Session bus not found
To circumvent this problem try the following command (with Linux and bash)
export $(dbus-launch)
KCrash: Application 'kate' crashing...
KCrash: Attempting to start /usr/lib64/kde4/libexec/drkonqi from kdeinit
sock_file=/home/pop/.kde4/socket-localhost/kdeinit4__0
[pop@localhost ~]$


As above, kate crashed.
Using Alt+F2 and enter kdesu systemsettings, it works.
GUI system settingss appears.
And so did "kdesu kate /boot/grub2/custom.cfg" at Alt +F2


Now, how to make this work at user terminal?

ps: doktor5000, thanks for your persistence.
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50

Re: kdesu doesn't work

Postby gohlip » Apr 21st, '13, 16:16

Look for tom's post how to create the symlink to make kdesu available in a terminal for your user.

Missed his post in the "flurry" of quick successions of posts. Sorry Tom, missed your post altogether, and you're right spot on!
Code: Select all
$ sudo ln -s  /usr/lib64/kde4/libexec/kdesu /usr/bin/kdesu

works wonderfully!

Thanks to doktor5000, alf and Tom.
Great team! Cheers! Have a beer on me. Salute!
Why do we live? To prove not everything in nature has a purpose.
gohlip
 
Posts: 573
Joined: Jul 9th, '12, 10:50


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest