apport-hackers team mailing list archive
-
apport-hackers team
-
Mailing list archive
-
Message #00125
[Merge] lp:~brian-murray/apport/pkexec-policy into lp:apport
Brian Murray has proposed merging lp:~brian-murray/apport/pkexec-policy into lp:apport.
Requested reviews:
Apport upstream developers (apport-hackers)
For more details, see:
https://code.launchpad.net/~brian-murray/apport/pkexec-policy/+merge/145477
I want to change update-notifier from using gksu to using pkexec. (LP: #1098235) However, for apport-gtk to work via pkexec it seems we need to update the policy provided by apport to allow it. Without this policy I was receiving the following Traceback:
$ pkexec /usr/share/apport/apport-gtk
Traceback (most recent call last):
File "/usr/share/apport/apport-gtk", line 16, in <module>
from gi.repository import GObject, GLib, Wnck, GdkX11, Gdk
File "<frozen importlib._bootstrap>", line 1564, in _find_and_load
File "<frozen importlib._bootstrap>", line 1531, in _find_and_load_unlocked
File "/usr/lib/python3/dist-packages/gi/importer.py", line 68, in load_module
dynamic_module._load()
File "/usr/lib/python3/dist-packages/gi/module.py", line 291, in _load
overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
File "/usr/lib/python3/dist-packages/gi/overrides/Gdk.py", line 425, in <module>
raise RuntimeError("Gdk couldn't be initialized")
RuntimeError: Gdk couldn't be initialized
--
https://code.launchpad.net/~brian-murray/apport/pkexec-policy/+merge/145477
Your team Apport upstream developers is requested to review the proposed merge of lp:~brian-murray/apport/pkexec-policy into lp:apport.
=== modified file 'apport/com.ubuntu.apport.policy.in'
--- apport/com.ubuntu.apport.policy.in 2012-08-22 05:19:27 +0000
+++ apport/com.ubuntu.apport.policy.in 2013-01-29 20:03:24 +0000
@@ -19,4 +19,16 @@
</defaults>
</action>
+ <action id="com.ubuntu.pkexec.apport-gtk">
+ <_description>Collect system information</_description>
+ <_message>Please enter your password to access problem reports of system programs</_message>
+ <annotate key="org.freedesktop.policykit.exec.path">/usr/share/apport/apport-gtk</annotate>
+ <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+ <defaults>
+ <allow_any>auth_admin</allow_any>
+ <allow_inactive>auth_admin</allow_inactive>
+ <allow_active>auth_admin</allow_active>
+ </defaults>
+ </action>
+
</policyconfig>