I am developing an application with GTK+-2.0. I need to access /dev/mmcblk0 device but it needs super user priviliges. It is not user friendly to login as su in terminal and run the program.
I want to create a prompt window and ask for super user password and run the program with super user priviliges. GParted is a program which runs in that way and I want a smilar opening procedure.
How can I achive that? How can I get super user privilidges in program?
Regards
You could check the gksu page on live gnome, or if you want to use the policy kit framework you can google for sample programs (e.g. like this one).
Another way, more straightforward, would require the creation of a group (which would allow users to access /dev/mmcblk0) and ask root to add specific allowed users to this group.