On Friday 01 October 2010 15:27, IMP Technologies - Tajinder Singh wrote: > 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.
On any other desktop Linux distribution, either "gksu" or "kdesu" would be installed by default, and if you checked the current user (User.id) and it weren't zero, you could run one of those programs with the path to your program as an argument. It would prompt the user for his password, and if the user had sudo privileges, your program would then be run as root. As I understand it, Red Hat considers programs like gksu to be a security risk, and so it's not available in Fedora. You could build it yourself and include it in the package for your program, I guess. If sudoers is not set up on your users' systems, gksu has a "--su-mode" command line option that should allow you to do the same, but asking for a root password. But most modern distributions don't even set a root password anymore, requiring users to do everything with sudo and graphical wrappers for it such as gksu. I don't know what the case is with Fedora. Rob ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
