Problem with PolicyKit and Python
Alberto Milone
albertomilone at gmail.com
Fri Jun 20 03:49:51 PDT 2008
Hi all,
I'm experimenting a bit with PolicyKit in Python but I'm facing
a problem:
I see the dialog which lets me enter the password, and when I do, I get
this error:
File "policyui.py", line 102, in on_button_clicked
print get_grub_conf_service()
File "policyui.py", line 44, in get_grub_conf_service
service_object = dbus.SystemBus().get_object(SERVICE_NAME,
OBJECT_PATH)
File "/var/lib/python-support/python2.5/dbus/bus.py", line 244, in
get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/var/lib/python-support/python2.5/dbus/proxies.py", line 241, in
__init__
self._named_service = conn.activate_name_owner(bus_name)
File "/var/lib/python-support/python2.5/dbus/bus.py", line 183, in
activate_name_owner
self.start_service_by_name(bus_name)
File "/var/lib/python-support/python2.5/dbus/bus.py", line 281, in
start_service_by_name
'su', (bus_name, flags)))
File "/var/lib/python-support/python2.5/dbus/connection.py", line 607,
in call_blocking
message, timeout)
dbus.exceptions.DBusException:
org.freedesktop.DBus.Error.Spawn.ChildExited: Launch helper exited with
unknown return code 1
I have taken as a model both gnome-lirc-properties and grubconf. What
I'm trying to do is show a gtk dialog with a button, and when this
button is clicked, the authorisation dialog shows up and (in theory) a
new file (xorgpol.txt) is created in /etc/X11 . See the attached tarball
for further details.
I'm using Ubuntu Hardy 32bit and I put the .conf, .service and .policy
files (respectively) in:
/usr/share/PolicyKit/policy/xkit-mechanism.policy /etc/dbus-1/system.d/org.gnome.XKit.Mechanism.conf
/usr/share/dbus-1/system-services/org.gnome.XKit.Mechanism.service
I hope you can help me with this problem.
Thanks in advance.
Regards,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xkit-policy.tar.gz
Type: application/x-compressed-tar
Size: 5773 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20080620/dba320d1/attachment.bin
More information about the hal
mailing list