[Gambas-user] Shell sudo

Joshua Higgins joshiggins at ...1601...
Wed Dec 23 22:00:46 CET 2009


I've been writing the command I want to execute as root ("apt-get
install package") to a temporary file (e.g. /tmp/install.package),
making it executable (chmod +x) then using

SHELL "gksu sh /tmp/install.package"

which prompts the user for the password. Its probably not the best
way, but its quite nice because you can set the message gksu displays
and it integrates nicely with gnome. Of course you can replace gksu
with kdesu.

Hope this helps.

2009/12/23 M. Cs. <mohareve at ...626...>:
> I'd like to make my app able to download and install packages via apt-get
> (or any other command-line package manager). How can I do that? I know it
> will need the user's password but how can I pass the command?
> The simple SHELL "sudo apt-get install ..." won't do the thing!
> Thanks!
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
joshua higgins
>>>>>>------




More information about the User mailing list