Replaced sudo with pkexec in custom scripts

This commit is contained in:
jeffser
2024-10-07 13:01:12 -06:00
parent 15bd4335e8
commit b952fa07b5
3 changed files with 7 additions and 5 deletions

View File

@@ -20,13 +20,14 @@ class terminal(Vte.Terminal):
self.set_pty(pty)
env = {
"TERM": "xterm-256color"
'TERM': "xterm-256color",
'SUDO_ASKPASS': "sh -c 'pkexec echo'"
}
pty.spawn_async(
GLib.get_current_dir(),
script,
[f"{key}={value}" for key, value in env.items()],
[],
GLib.SpawnFlags.DEFAULT,
None,
None,