[Gambas-user] Gambas app run as root

Stefano Palmeri rospolosco at ...152...
Sat Oct 2 14:22:11 CEST 2010


Il venerdì 1 ottobre 2010 21:27:39 IMP Technologies - Tajinder Singh ha 
scritto:
> Hi all,
>
> I am new to Gambas but have done some projects in Visual Basic at college
> time.
>
> It is a good feeling to know about Gambas which I can use to create helpful
> applications on Linux platforms.
>
> I have created a small basic interface for Fedora to change Plymouth theme.
> But as changing theme requires to run some commands as root, I would like
> to ask for root password before starting the application.
> Similarly whenever we run 'system-config-boot' or other software that
> requires root privileges.
>
> Please help me with detailed guidance as how I can achieve the result.
>
>
> Thanks & Regards,

Hi. 

I've attached a little example. It's just an interface to su. You don't
need kdesu or gksu. The code is real simple. It asks for root password 
to execute 'su -c ls /root'. Take a look.

Bye,

Stefano





>
> Tajinder Singh
> MD & CEO
> IMP Technologies
> [Affordable :: Quality :: Satisfaction]
> Mb. : +91-9814943801
> Tel. : +91-161-2541944
> E-mail : imp.tsingh at ...626...
> Web : http://www.imptechs.com
> V-Card : http://www.imptechs.com/misc/IMPTechnologies_V-Card.jpg
> ---------------------------------------------------------------------------
>--- Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> 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: su-0.0.2.tar.gz
Type: application/x-tgz
Size: 7993 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20101002/c61d5ffe/attachment.bin>


More information about the User mailing list