[pygtk] PolicyKit from Python
David Zeuthen
david at fubar.dk
Fri Feb 8 01:13:18 WST 2008
(Dunno if you got my other reply, I think Evolution ate it)
On Thu, 2008-02-07 at 16:19 +0100, Murray Cumming wrote:
> Thanks. I figured out a bit more since I sent the email, but I'm still
> having no luck. I blogged about it:
> http://www.murrayc.com/blog/permalink/2008/02/07/gnome-lirc-properties-using-policykit-to-get-sudo-access/
Does this work
$ dbus-send --session --print-reply \
--dest=org.freedesktop.PolicyKit.AuthenticationAgent / \
org.freedesktop.PolicyKit.AuthenticationAgent.ObtainAuthorization \
string:org.freedesktop.hal.storage.crypto-setup-fixed \
uint32:0 \
uint32:$PPID
replacing org.freedesktop.hal.storage.crypto-setup-fixed of course with
what you need. If so it should work from python too. Assuming of course
the application is running unprivileged.
David
More information about the pygtk
mailing list