The first weird thing is that pkexec messes with the paths, so it needs an absolute path to work. Easiest way to get it is by setting CHECKBOX_SHARE to something absolute:
The second thing is that it doesn't work :/ try the super key test, which requires root, and it doesn't pop up the test window, so again, I think pkexec may be eating some environment settings that are needed for this to work.
OK, I tried this simplistic patch:
diff --git a/plugins/ backend_ info.py b/plugins/ backend_ info.py backend_ info.py backend_ info.py Plugin) :
call( ["pgrep" , "-x", "-u", str(uid), "gnome- panel|gconfd- 2"],
stdout= PIPE, stderr=PIPE) == 0: "DISPLAY" ) and \ which", "pkexec" ],
index 7bc7611..ea17f8d 100644
--- a/plugins/
+++ b/plugins/
@@ -108,6 +108,10 @@ class BackendInfo(
prefix = ["gksu", "--message", password_text, "--"]
+ elif os.getenv(
+ call(["
+ stdout=PIPE, stderr=PIPE) == 0:
+ prefix = ["pkexec"]
else:
prefix = ["sudo", "-p", password_text + " " + password_prompt]
The first weird thing is that pkexec messes with the paths, so it needs an absolute path to work. Easiest way to get it is by setting CHECKBOX_SHARE to something absolute:
CHECKBOX_SHARE=$PWD PYTHON_PATH=. bin/checkbox-qt -w data/whitelists /default. whitelist
The second thing is that it doesn't work :/ try the super key test, which requires root, and it doesn't pop up the test window, so again, I think pkexec may be eating some environment settings that are needed for this to work.