Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jan 2006 09:56:32 -0500
From:      "Michael P. Soulier" <msoulier@digitaltorque.ca>
To:        JD Arnold <jdarnold@buddydog.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Prompt for root password
Message-ID:  <fb6605670601060656p4b1ba1c7u38ce5071d1e59448@mail.gmail.com>
In-Reply-To: <dplv84$pnt$1@sea.gmane.org>
References:  <dplv84$pnt$1@sea.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 1/6/06, JD Arnold <jdarnold@buddydog.org> wrote:
> I'm writing a program that needs to write a file and I'd like to have it
> ask for the root password and run as root, like many of the system config
> applications do.  Do I have to write something special, or is there some
> way to tell KDE (or GNOME) to prompt for the root password? Is this what
> a "setuid" program is?

If it's a graphical program, you can call the gksudo command from
gnome. Or, if you look in its sourcecode, you can find out how it
works and integrate the same into your program.

Mike
--
Michael P. Soulier <msoulier@digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It takes a
touch of genius - and a lot of courage to move in the opposite direction."
--Albert Einstein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fb6605670601060656p4b1ba1c7u38ce5071d1e59448>