[Gambas-user] Shell sudo

Les Hardy les at ...2337...
Thu Dec 24 20:24:00 CET 2009


sudo allows you to pass a password to the shell with -S
The following should do it.

sudo -S apt-get install PACKAGENAME << EOF
PASSWORD
EOF


Regards
Les Hardy


M. Cs. wrote:
> 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
> 





More information about the User mailing list