[Gambas-user] No Graphical sudo program found

Brian G brian at westwoodsvcs.com
Fri Jan 14 22:12:07 CET 2022


Sorry forgot to check for errors

exec ["sudo", "-A", "apt", "update"] with ["SUDO_ASKPASS=/home/brian/bin/getpassword"] wait
if Process.lastvalue = 1 then
   error.raise("Sudo Failed")
endif

f it is not 1 then the value returned is from the called app

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

----- On Jan 14, 2022, at 12:55 PM, Brian G brian at westwoodsvcs.com wrote:


More information about the User mailing list