You are not logged in.

karye

Beginner

  • "karye" started this thread

Posts: 9

Location: Stockholm

  • Send private message

1

Tuesday, August 31st 2004, 10:16pm

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!

e8johan

Beginner

Posts: 27

Location: Sweden

  • Send private message

2

Wednesday, September 1st 2004, 6:15am

RE: How do I start kdesu so the app runs as root?

Use a kdesu call to start your application (though a shell script).

http://www.stack.nl/~geertj/kde/kdesu-doc/index-3.html

karye

Beginner

  • "karye" started this thread

Posts: 9

Location: Stockholm

  • Send private message

3

Friday, September 3rd 2004, 5:47am

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?

e8johan

Beginner

Posts: 27

Location: Sweden

  • Send private message

4

Friday, September 3rd 2004, 6:25am

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.

Thomas

Beginner

Posts: 4

Location: Socorro, New Mexico, USA

Occupation: Software Engineer

  • Send private message

5

Friday, September 3rd 2004, 10:31am

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.