Skip to content

gb.desktop, add pkexec to RunAsRoot, add a more advnced Desktop.ExecAsRoot() command using polkit

Bruce Steers requested to merge (removed):desktop-pkexec into master

[GB.DESKTOP]

  • NEW: add pkexec to list of searched gui sudo commands for Desktop.RunAsRoot()
  • NEW: Advanced Desktop.ExecAsRoot() command, uses pkexec with it's available options

This is better.

It fixes (and retains) RunAsRoot() like the last merge request plus adds Desktop.ExecAsRoot() for more advanced usage

 Desktop.ExecAsRoot(Command As String[],
 	Optional (Wait) As Boolean,
 	Optional UserName As String,
 	Optional NoInternalAgent As Boolean) As Integer

Use of pkexec has been mostly obscured from the user, (help now just mentions it's a more advanced polkit function)

Merge request reports