( This question has an identical title, but the question asks it in a script, for example su -c , do not fool it before)
I have a Qt GUI application that needs to perform some file operations in / etc based on user input. One option is likely to use system() with sudo , but even so, you need to mess around with the sudoers file. I would also like not to do system() plus script hacks for modifying files, but the correct file operations.
What is the best way to programmatically elevate my apps for this?
Edit: as a bonus, it would be nice if it worked on Maemo / Meego / other handheld computers (afaik PolicyKit is not available there ..)
source share