python-xapp/python-xapp-xdgsu.patch

15 lines
530 B
Diff
Raw Normal View History

--- a/xapp/os.py
+++ b/xapp/os.py
@@ -118,6 +118,11 @@ def run_with_admin_privs(command, messag
commands = commands + command
subprocess.Popen(commands)
return True
+ elif os.path.exists("/usr/bin/xdg-su"):
+ commands = ["xdg-su", "-c"]
+ commands = commands + command
+ subprocess.Popen(commands)
+ return True
# Finally use pkexec if we have nothing else - it will work, but the executed program
# may not be properly localized.
elif is_polkit_running():