Dear visitor, welcome to KDE-Forum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
How do I start kdesu so the app runs as root?
My app needs root privileges for some actions.
How is it possible to open upp kdesu when the app start and afterwards the app should continue running as root?
Thanks for any answer!
RE: How do I start kdesu so the app runs as root?
So if I start myApp, then call upp kdesu and prompt user with it. Will the started myApp switch from being by user to being run by root?
RE: How do I start kdesu so the app runs as root?
No, lets say that your app is known as myapp. Then create your application and name the binary myapp.real, then use a shell (bash) script called myapp to start myapp.real using kdesu.
If you want to circumvent the shell script, here is another way:
Create two applications. The first one being a wrapper application which will start a QPorcess. The QProcess is passed kdesu and the name of your real application as parameters.
There are 10 types of people in the world. Those that understand binary numbers and those that don't.