OtterBrowser / otter-browser

Otter Browser aims to recreate the best aspects of the classic Opera (12.x) UI using Qt5
https://otter-browser.org
GNU General Public License v3.0
1.8k stars 277 forks source link

[Commandline use] --no-sandbox option does not seem to work #1632

Open rubyFeedback opened 4 years ago

rubyFeedback commented 4 years ago

I just compiled the latest otter-browser from git clone checkout.

Now trying to run it as superuser:

/usr/bin/./otter-browser

[32449:32449:1214/193006.784320:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

Ok so it shows on the commandline to use --no-sandbox.

I then do this:

/usr/bin/./otter-browser  --no-sandbox

The result is:

Otter: Unknown option 'no-sandbox'.

I am confused twice.

1) The --no-sandbox was suggested in the prior result, so why does it not work even though it was suggested?

2) Otter displayed 'no-sandbox' but this was not the ARGV I was using here; I had two leading '-' aka the --no-sandbox option. So otter somehow seems to slurp up commandline arguments perhaps.

Anyway. Via vivaldi that works fine. Vivaldi is not my main browser, I am actually using palemoon but I like experimenting with other browsers.

My suggestion to fix this is, primarily, to allow for --no-sandbox to work fine. IF this is not wanted, then I suggest getting rid of the message above since it will not work (but I think it is better to support a --no-sandbox option anyway). It is of course easy to work around with, just use a regular user account, but I am also lazy and try to minimize my work load. Plus the above works in vivaldi. :P

At any rate, though, I also suggest to output the original input rather than the shortened variant 'no-sandbox' simply because it is confusing otherwise to me as a user and I am not sure where an error happened, if there was one that is.

In pure ruby I typically use a regex like this:

when /^-?-?no-?sandbox$/i

This would anchor towards a leading --no, but makes the two - optional. Within the when-clause I would then handle that particular case. I guess something similar can be done in C++ too even though I have always found C++ and C to be more annoying to work with (and much harder) - but I digress.

Frenzie commented 4 years ago

The --no-sandbox was suggested in the prior result, so why does it not work even though it was suggested?

It looks like it was suggested for Chromium by some underlying library, not by Otter. Unlike Vivaldi, Otter isn't using Chromium. I would suspect this message comes from trying to use the secondary QtWebEngine backend instead of the primary Qt WebKit one, which would probably make it a Qt bug of sorts.

Otter displayed 'no-sandbox' but this was not the ARGV I was using here; I had two leading '-' aka the --no-sandbox option. So otter somehow seems to slurp up commandline arguments perhaps.

I'm pretty sure it just doesn't display the -- there, unless that's what you mean by slurp. Multiple arguments work fine afaict.

Frenzie commented 4 years ago

Incidentally, does it work if you use QTWEBENGINE_DISABLE_SANDBOX=1 instead?

ttssttssttss commented 4 years ago

I use otter with qtwebengine as backend, it still has exactly the same problem

ROBERT-MCDOWELL commented 1 year ago

same problem here, I need to run otter-browser with root