3

I've seen some solution on MacOS on showing a GUI prompt for running scripts in sudo

dart / flutter run process with sudo

But for Linux and Windows, I dont see any solution.

I havent tested yet, but is running a flutter app on windows on elevated user/admin will allow a powershell script be run that requires an Administrative rights?

On linux , as far as i have research , there is gsudo , but i havent tested it as well but that requires a sudo command prior installation.

I hope there is a better way of doing stuff in elevated rights.

Hope someone could share their own thoughts on this stuff

goldcoders
  • 31
  • 2
  • 1
    I worked with an application that required `sudo` privileges, on `Linux` I found `polkit` for GUI authentication e.g. `await Process.run('pkexec', ['reboot'])`. Also, there is `dart dbus` you can check out this package. I don't know if there is any better way to do this. – Utpal Sarkar May 23 '22 at 07:52

0 Answers0