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. <mohar...@gmail.com>: > 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 > -- joshua higgins >>>>>>------ ------------------------------------------------------------------------------ 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