Re: (no subject)
- From: Daniel Flemming <danflemming mac com>
- To: Dirk van der Walt <vrygesel highveldmail co za>
- Cc: gtk-perl-list gnome org
- Subject: Re: (no subject)
- Date: Thu, 22 Jul 2004 16:55:25 -0400 (EDT)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 22 Jul 2004, Dirk van der Walt wrote:
I've got this program that needs to run as root, but want
to have a pop-up window that prompts for the root password
and if correct, it should launch the program.
Hmm.
Do you mind using a shell script as a frontend for your program?
If not, you should be able to use GKsu, a GTK frontend to su. You can get it
from http://nongnu.org/gksu/
It's based on a custom library, libgksu. You can get that from the same
site, but I don't think there are any Perl bindings for it yet (but you
never know :)
But the shell script approach is pretty easy.
#!/bin/sh
gksu
exec yourprogram
GKsu takes some command-line options to let you do stuff like specify
messages to display in its window, but I forget what they are. (I used to
use a gksu-based shell script to shutdown my laptop, but I've since gone
over to just using sudo and Xdialog.)
The GKsu developer is a Debian guy, but I think the code's portable to
pretty much everything, at least in the PAM world.
- --
GnuPG public key available from
http://homepage.mac.com/danflemming/gnupg_key.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Made with pgp4pine 1.76
iD8DBQFBACnLER493M5r4PIRAl4NAJ0Vi0MrYgC6fOfs95O4WFnqWjJebQCgiOeN
F4KMkAtq09x/5mN48y5OU+o=
=SJRu
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]