On 2013-05-30 00:56, wolfi323 wrote:
>
> robin_listas;2561176 Wrote:
>> It is a gnome program.
> I knew that. But I don’t have it installed and thus don’t know which
> command line options it accepts (and couldn’t check).
Ok.
>>> Maybe baobab has a similar option with a different name? (run “baobab
>>> --help” to see a list of options)>
>>
>> Well, actually, it has. But what we need is a combination to give for
>> sudo, not for the programs it calls. Some programs might not have it.
> But the program opens the window, so the program must know where to
> open it, not sudo.
Sudo can tell it, via display variable - and you see it is passed.
>> And, it does not work:
>>
>> …
>>
>> xhost doesn’t work, either. The man page says:
>> …
> It did work here. I just ran “xhost +” (yes, I know that’s insecure
> blah blah blah…, it was just for testing purposes).
> Then “sudo -i kwrite” still gave an error message but “sudo -i kwrite
> -display :0” worked. And any other KDE program should as well.
Notice that my sudo is configured to use my user password, not root’s,
same as the OP. Ok, I’ll try kwrite.
cer@Telcontar:~> xhost
access control enabled, only authorized clients can connect
NIS:root@localhost
cer@Telcontar:~> xhost +root
xhost: bad hostname "root"
cer@Telcontar:~> xhost +root@localhost
root@localhost being added to access control list
cer@Telcontar:~> xhost
access control enabled, only authorized clients can connect
NIS:root@localhost
cer@Telcontar:~> sudo /usr/bin/kwrite
No protocol specified
kwrite: cannot connect to X server :0
cer@Telcontar:~>
cer@Telcontar:~> sudo -i /usr/bin/kwrite
Sorry, user cer is not allowed to execute '/bin/bash -c /usr/bin/kwrite'
as root on Telcontar.
cer@Telcontar:~> sudo -i /usr/bin/kwrite
No protocol specified
kwrite: cannot connect to X server :0
cer@Telcontar:~> sudo -i /usr/bin/kwrite -display :0
Sorry, user cer is not allowed to execute '/bin/bash -c /usr/bin/kwrite
-display :0' as root on Telcontar.
cer@Telcontar:~>
edit sudoers to allow.
cer@Telcontar:~> sudo -i /usr/bin/kwrite -display :0
No protocol specified
kwrite: cannot connect to X server :0
cer@Telcontar:~>
cer@Telcontar:~> sudo /usr/bin/kwrite -display :0
No protocol specified
kwrite: cannot connect to X server :0
cer@Telcontar:~>
In the end I have to say: Just use kdesu, that one works!
There’s also gksu, but that’s obsolete it seems; it’s being rewritten
at the moment with PolicyKit in mind.
It does not work here (im running xfce). It asks for root password. If I
do the change you suggested:
> cer@Telcontar:~> kwriteconfig --file kdesurc --group super-user-command --key super-user-command sudo
> cer@Telcontar:~> kdesu /usr/bin/kwrite
> kbuildsycoca4 running...
then it asks for my user password, but denies me access. The message is:
Permission denied
Possibly incorrect password, please try again
On some systems, you need to be in special group (often: wheel) to use
this progam.
Yes, I’m in that group.
–
Cheers / Saludos,
Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)