R. B. ha scritto:

It has to work on all DEs, not just Gnome or KDE. So it looks like the easiest way is to make 2 programs. The first checks the id and if it's not 0 then prompt for root password, write and run a small shell script that su and runs the second program, run the script and terminate. The 2nd program checks the id if not 0 it terminates. Otherwise it goes on working as gui pkg mgr. I think that's what I'll implement unless some one can come up with a better (easier) solution.

Rod.

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

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

Reply via email to