Solved I want to develop a application that as long as it launch it asks root privilige.
-
just like this.anyone can help me?or just give me a demo?
 -
Hi
There is no platform independent way for that.
So on what platform ? -
@mrjj
it is on ubuntu platform. -
@_hunter
Ok. the normal way is via a .desktop file
https://askubuntu.com/questions/118822/how-to-launch-application-as-root-from-unity-launcher
or you can simply launch the app via
/usr/bin/gksudo /usr/bin/yourapplication -
@_hunter I answered you in the thread you necro'd... https://forum.qt.io/topic/60141/how-to-create-a-gui-that-can-enter-root-mode-as-well-as-gparted-applications/19
The way gparted does it is using
pkexec
.. However linux users are used to things likesudo -E app
, gksu, kdesudo, etc. -
@mrjj thank you ,this solved my problem
-
@ambershark thank you.