Running as root without --no-sandbox is not supported
-
Hey
I'm trying to run my QT UI app as root (which uses the webengineview stuff in qml), but I get the following error:
ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180
I've done a little research and the solution seems to be adding --no-sandbox as argument when executing my app:
sudo ./MyApp --no-sandbox
but somehow i still get the same issue.
Can anyone help?
BTW: I'm using cmake for my project, and the issue only occurs on Ubuntu/Linux, running with root on OSX works fine
-
To explicitly disable sandboxing, the QTWEBENGINE_DISABLE_SANDBOX environment variable can be set to 1 or alternatively the --no-sandbox command line argument can be passed to the user application executable.
Does the environment variable work for you instead? (I assume that would be
sudo env QTWEBENGINE_DISABLE_SANDBOX=1 ./MyApp
.) -
-
You could show me whatever you tried in a script (and how you invoked it) to see if I can spot why you say does not work compared against my
env ...
command-line. -
I don't know a lot about "system tray icons" (they don't exist in my Ubuntu with Unity desktop)! Why is this any different whether you invoke it with environment variable vs command-line argument?
-
-
-
@Slei
I would never want to run a UI app undersudo
!But this has nothing to do with whether you run yours with command-line argument versus environment variable, which is what I thought you were saying was the issue with the latter. But it appears not. If you still want me to look at your script attempt then post it.