Replaced sudo with pkexec in custom scripts
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user