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@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user