[Gambas-user] No Graphical sudo program found

Bruce Steers bsteers4 at gmail.com
Thu Dec 30 18:52:27 CET 2021


On Thu, 30 Dec 2021 at 17:31, Bruce Steers <bsteers4 at gmail.com> wrote:

> RunAsRoot is a "Graphical" launcher.
> same as using pkexec or gksudo or kdesudo
>
> not for using the sudo command for a terminal application.
>
> sudo is a terminal command not a graphical application
>
> sudo apt-get
> must be run through a terminal not a graphical launcher.
>
> possibly this would work...
> Desktop.RunAsRoot("mate-terminal --command 'sudo apt-get autoclean'")
>
> BruceS
>
>
> On Thu, 30 Dec 2021 at 15:13, Gianluigi <bagonergi at gmail.com> wrote:
>
>> Hi Benoit and All,
>>
>> one of our friend of the Italian Forum, using this code:
>>
>> Desktop.RunAsRoot("sudo apt-get autoclean")
>>
>> Gets this answer:
>>
>> No Graphical sudo program found
>>
>

I apologise.
It seems you can use sudo with RunAsRoot, i just tried RunAsRoot("sudo ls
/etc/") and the output was sent to stdout.

So the problem was no pkexec , gksudo, kdesudo or lxde-sudo was found.

debian mate "should" have pkexec installed with mate-polkit

try..
sudo apt-get install mate-polkit

BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211230/a65f6d96/attachment.htm>


More information about the User mailing list