[Gambas-user] sudo or gksudo in SHELL?

Stefano Palmeri rospolosco at ...152...
Fri Feb 22 18:26:08 CET 2008


Alle 17:55, venerdì 22 febbraio 2008, Maximillian Von Kloisterheim ha scritto:
> José Luis Redrejo wrote:
> > do you need a graphic interface? in that case you'll have to use shell
> > "gksu \"chown... \" .. "
> > but if you don't need the graphic interface you can use sudo directly.
> > Take a look at "man sudo" and you'll know a lot of different options to
> > do it. Regards.
> >
> > José L:
>
> Thanks José, the command works just fine when I type the password into
> the debug pane, but this is one of the reasons I was trying to use
> gksudo: To get a graphical password request for me to type into.
>
> When the program is compiled there will be no debug pane to type into so
> I need something else.
>
> For example, is there some way I can type my password into my own
> program or is there another way to use sudo from SHELL?
>

I've attached an example.  It shows how to send the password to sudo.
You have to change the "your_commad_here" in the code.

Stefano

> Regards
>
> Max
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sudo-0.0.1.tar.gz
Type: application/x-tgz
Size: 7882 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20080222/9f9e6ad1/attachment.bin>


More information about the User mailing list