Giuliano Colla <[EMAIL PROTECTED]> wrote:Did you give a look to consolehelper?

http://www.linuxcommand.org/man_pages/consolehelper8.html

It may be what you need. Works both from command line and from Gui, and 
it doesn't appear to depend on any particular desktop features.

In a nutshell, you create in a place in the user execution path (such as 
/usr/bin) a symlink named as the executable and pointing to 
consolehelper. Then you place you executable (or a symlink to it) in 
/sbin or /usr/sbin. The trick is made. If you're root, /sbin is in your 
path, so the real application is called. If you're not, consolehelper is 
launched, which prompts you for the root password, validates it and then 
launches the application.

Give it a try.

Giuliano


I see. Then probably it's better to leave it to the distro developers to choose 
the way to deal with it. I'll just make the program checks the id and if it's 
not 0, it will terminate. Thanks to you Giuliano and to all the repliers for 
their thoughts.

Rod.

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

Reply via email to