[pygtk] PolicyKit from Python
Murray Cumming
murrayc at murrayc.com
Fri Feb 8 00:19:54 WST 2008
On Thu, 2008-02-07 at 22:55 +0800, David Zeuthen wrote:
> On Wed, 2008-02-06 at 13:32 +0100, Murray Cumming wrote:
> > On Tue, 2008-02-05 at 15:58 +0100, Murray Cumming wrote:
> > > Does anyone know if there are already PolicyKit (and
> > > policykit-gnome) python bindings?
> >
> > I discovered that I can probably do this with just the D-Bus API. I made
> > the attached test case after some googling, but the call to PolicyKit's
> > ObtainAuthorization() doesn't seem to have any effect. I'd welcome any
> > advice.
> >
> > I'm on Ubuntu Hardy Heron, where PolicyKit is definitely working, as
> > seen when I try to use the Services control panel, for instance, which
> > has an Unlock button.
> >
> > I believe that I need to call ShowDialog() if ObtainAuthorization()
> > denies authorization, but I want to understand this first part.
>
> The names of interfaces and objects changed a bit since 0.6 to 0.7 to
> make it desktop agnostic (so in some future if the user is running
> non-GNOME he will get a native authentication agent etc.); this is what
> you should use
>
> http://hal.freedesktop.org/docs/PolicyKit/model-authentication-agent.html
> http://hal.freedesktop.org/docs/PolicyKit-gnome/ref-auth-daemon.html
>
> There is no ShowDialog() any more. Does that clear it up?
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/
--
murrayc at murrayc.com
www.murrayc.com
www.openismus.com
>
More information about the pygtk
mailing list