Recent

Author Topic: How do I run another program as root?  (Read 3849 times)

xircon

  • New Member
  • *
  • Posts: 25
How do I run another program as root?
« on: March 13, 2010, 09:37:05 pm »
Running Mandriva cooker, trying to write some little utility programs to add to my cairo dock.

Tried (based on one of the examples in the wiki):

Code: [Select]
Program RootKonsole;
uses classes, unix;
var S: longint;
begin
  S := fpsystem ('kdesu konsole');
end.   

But it doesn't run anything.  Any ideas?

xircon

  • New Member
  • *
  • Posts: 25
Re: How do I run another program as root?
« Reply #1 on: March 13, 2010, 09:47:36 pm »
Got it!! Needs the path to kdesu.

Code: [Select]
Program RootKonsole;
uses classes, unix;
var S: longint;
begin
  S := fpsystem ('/usr/lib/kde4/libexec/kdesu konsole');
end.   

 

TinyPortal © 2005-2018