[Gambas-user] No Graphical sudo program found

Brian G brian at westwoodsvcs.com
Mon Jan 3 03:53:55 CET 2022


here is the part of the man page from sudo which specifically mentions using a graphic interface for ask_pass 
man sudo ... 

-A, --askpass 
Normally, if sudo requires a password, it will read it from the user's terminal. If the -A (askpass) option is specified, 
a (possibly graphical) helper program is executed to read the user's password and output 
the password to the standard output. If the SUDO_ASKPASS environment variable is set, it specifies the path to the helper program. 
Otherwise, if sudo.conf(5) contains a line specifying the askpass program, that 
value will be used. For example: 

# Path to askpass helper program 
Path askpass /usr/X11R6/bin/ssh-askpass 

If no askpass program is available, sudo will exit with an error. 

I am not sure why this would be wrong? 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 

----- On Dec 31, 2021, at 11:52 PM, Brian G <brian at westwoodsvcs.com> wrote: 

> Sorry Bruce I use it very often with a graphical front end...

> Almost every management app uses sudo -A

> --
> Thanks
> Brian G
> Thursday, 30 December 2021, 09:32AM -08:00 from Bruce Steers [
> mailto:bsteers4 at gmail.com | bsteers4 at gmail.com ] :

>> 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 < [ mailto:bagonergi at gmail.com |
>> 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

>>> What can we say to him?

>>> Here the system information: (*)

>>> Regards
>>> Gianluigi
>>> (*)
>>> [System]
>>> Gambas=3.15.2
>>> OperatingSystem=Linux
>>> Kernel=5.10.0-10-amd64
>>> Architecture=x86_64
>>> Distribution=Debian
>>> Desktop=MATE
>>> Theme=fusion
>>> Language=it_IT.UTF-8
>>> Memory=3801M

>>> [Libraries]
>>> Cairo=libcairo.so.2.11600.0
>>> Curl=libcurl.so.4.7.0
>>> DBus=libdbus-1.so.3.19.13
>>> GDK2=libgdk-x11-2.0.so.0.2400.33
>>> GDK3=libgdk-3.so.0.2404.20
>>> GStreamer=libgstreamer-1.0.so.0.1804.0
>>> GTK+2=libgtk-x11-2.0.so.0.2400.33
>>> GTK+3=libgtk-3.so.0.2404.20
>>> OpenGL=libGL.so.1.7.0
>>> Poppler=libpoppler.so.102.0.0
>>> QT5=libQt5Core.so.5.15.2
>>> SDL=libSDL-1.2.so.0.11.4
>>> SQLite=libsqlite3.so.0.8.6

>>> [Environment]
>>> CLUTTER_IM_MODULE=ibus
>>> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
>>> DESKTOP_SESSION=lightdm-xsession
>>> DISPLAY=:0
>>> GB_GUI=gb.qt5
>>> GDMSESSION=lightdm-xsession
>>> GIO_LAUNCHED_DESKTOP_FILE=/usr/share/applications/gambas3.desktop
>>> GIO_LAUNCHED_DESKTOP_FILE_PID=154545
>>> GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1
>>> GTK3_MODULES=xapp-gtk3-module
>>> GTK_IM_MODULE=ibus
>>> GTK_MODULES=gail:atk-bridge
>>> GTK_OVERLAY_SCROLLING=0
>>> HOME=/home/
>>> LANG=it_IT.UTF-8
>>> LC_ALL=it_IT.UTF-8
>>> LOGNAME=
>>> MATE_DESKTOP_SESSION_ID=this-is-deprecated
>>> PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>>> PWD=/home/
>>> QT_ACCESSIBILITY=1
>>> QT_AUTO_SCREEN_SCALE_FACTOR=0
>>> QT_IM_MODULE=ibus
>>> QT_LOGGING_RULES=*.debug=false
>>> QT_SCALE_FACTOR=1
>>> SESSION_MANAGER=local/:@/tmp/.ICE-unix/3866,unix/:/tmp/.ICE-unix/3866
>>> SHELL=/bin/bash
>>> SSH_AGENT_PID=4034
>>> SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
>>> TZ=:/etc/localtime
>>> USER=
>>> XAUTHORITY=/home//.Xauthority
>>> XDG_CURRENT_DESKTOP=MATE
>>> XDG_DATA_DIRS=/usr/share/mate:/home//.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
>>> XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/
>>> XDG_RUNTIME_DIR=/run/user/1000
>>> XDG_SEAT=seat0
>>> XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
>>> XDG_SESSION_CLASS=user
>>> XDG_SESSION_DESKTOP=lightdm-xsession
>>> XDG_SESSION_ID=1
>>> XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
>>> XDG_SESSION_TYPE=x11
>>> XDG_VTNR=7
>>> XMODIFIERS=@im=ibus

>>> ----[ [ http://gambaswiki.org/wiki/doc/netiquette |
>>> http://gambaswiki.org/wiki/doc/netiquette ] ]----

>> ----[ [ http://gambaswiki.org/wiki/doc/netiquette |
>> http://gambaswiki.org/wiki/doc/netiquette ] ]----

> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220102/a9725434/attachment-0001.htm>


More information about the User mailing list