How can i prevent the super use privileges message from showing
Solution 1
The message is throwned by the flutter command itself upon detection of root and cannot be disabled by any means.
As stated in this question you have to install flutter in your user folder to get rid of the "annoying" message (but then, you won't be root).
Solution 2
Flutter just says running flutter as the root user is not a good idea. As, all its future plugin installations etc might be needing root privileges. So, give your current user the permission to r/w the flutter folder. The warning will disappear.
sudo chown -R $USER /the/exact/path/of/your/flutter/repo/
This worked for me.
Comments
-
Fethi 11 months
I'm running flutter on Linux as root and each time i run a flutter command it shows the super user warning message every time i know it shows for other commands as well not just flutter commands so i don't want to show only for flutter commands other it is ok, any help!
-
Muldec over 4 yearsAre your talking about the "To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details." message ?
-
Fethi over 4 yearsno this one Woah! You appear to be trying to run flutter as root. We strongly recommend running the flutter tool without superuser privileges.
-
Muldec over 4 yearsWhere did you install flutter ? (in which folder)
-
Fethi over 4 yearsin the Root folder
-
-
Fethi over 4 yearsthanks but i already know that, i'm just looking for a way to disable it for root, i don't want to switch to another user
-
Muldec over 4 yearsThe message is throwned by the flutter tool itself. There's no way to disable it
-
Fethi over 4 yearsoh really, are you sure ?
-
Muldec over 4 yearsYep. Line 154 of the flutter command