logo       

Re: (no subject): msg#00168

Subject: Re: (no subject)
-----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-----


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe