It should try to use gksudu or similar to re-invoke itself as root. Failing 
that, sudo or su, check the "see also" section of the man pages of those tools.

Possibly the package containing your program should depend on gksudo or similar 
and the menu item created should invke gksudo directly on the application.

It will then always run as root and use a familiar and tested method and UI to 
do this.

Sam

-----Original Message-----
From: "R. B." <[EMAIL PROTECTED]>
To: [email protected]
Sent: 07/01/07 16:00
Subject: [lazarus] root's password...

Hello,

I almost finished my first application that I build using fpc/lazarus. It is an 
IDE for an AI language and I have to greatly admire all those who made fpc (big 
thumb up despite I haven't got enough time to check out the source specially 
the three-pass part) and lazarus possible. I couldn't believe how easy it was 
to make a binary for linux and the other for win using the same source). Now 
it's easier for me to say that it's quite possible that I will not go back to 
C/C++ again. Many many thanks to you all and hopefully I will give a hand when 
I get enough experience.
My second project that I plan to build with fpc/lazarus is a Package Manager. I 
have'nt started yet but already have a question in mind: how to make the 
program itself sure that the user is root? OK, if the uid is not zero then it 
prompts for the root's password, then what? How to see that the passwd is the 
root's? Any ideas?
Thanks, Rod.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to