Mailing List Archive

spyder does not work under root! [linux]
Hi!

I need to debug a python3 script under root. I tried spyder but it does
not work.

Running as root without --no-sandbox is not supported. See
https://crbug.com/638180.

Thanks for any comments including alternative solutions to debug as root.

Paulo
--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
Às 22:56 de 08/10/21, Paulo da Silva escreveu:
> Hi!
>
> I need to debug a python3 script under root. I tried spyder but it does
> not work.
>
> Running as root without --no-sandbox is not supported. See
> https://crbug.com/638180.
>
> Thanks for any comments including alternative solutions to debug as root.
>
I also tried with eric and curiously it gave the same message!!

This seems crazy.
--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
On Tue, Oct 12, 2021 at 8:52 AM Paulo da Silva
<p_d_a_s_i_l_v_a_ns@nonetnoaddress.pt> wrote:
>
> Hi!
>
> I need to debug a python3 script under root. I tried spyder but it does
> not work.
>
> Running as root without --no-sandbox is not supported. See
> https://crbug.com/638180.
>
> Thanks for any comments including alternative solutions to debug as root.
>

Did you try reading the linked bug report? Or running it with --no-sandbox?

ChrisA
--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
On 10/8/21 4:32 PM, Paulo da Silva wrote:
> Às 22:56 de 08/10/21, Paulo da Silva escreveu:
>> Hi!
>>
>> I need to debug a python3 script under root. I tried spyder but it does
>> not work.
>>
>> Running as root without --no-sandbox is not supported. See
>> https://crbug.com/638180.
>>
>> Thanks for any comments including alternative solutions to debug as root.
>>
> I also tried with eric and curiously it gave the same message!!
>
> This seems crazy.

Not so crazy. It's incredibly dangerous to run a web browser as root.
There's no reason I can think of for running a python script driving a
web browser as root. Python scripts can easily be run as an arbitrary
user, perhaps from a bash wrapper script using su, or being started from
systemd.

--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
Às 22:54 de 11/10/21, Chris Angelico escreveu:
> On Tue, Oct 12, 2021 at 8:52 AM Paulo da Silva
> <p_d_a_s_i_l_v_a_ns@nonetnoaddress.pt> wrote:
>>
>> Hi!
>>
>> I need to debug a python3 script under root. I tried spyder but it does
>> not work.
>>
>> Running as root without --no-sandbox is not supported. See
>> https://crbug.com/638180.
>>
>> Thanks for any comments including alternative solutions to debug as root.
>>
>
> Did you try reading the linked bug report? Or running it with --no-sandbox?
>
Yes. It is about a web browser! Why are 2 python debuggers related with
a web browser?!
As per spyder, there is no such switch --no-sandbox!

Thanks.

--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
Às 02:08 de 12/10/21, Michael Torrie escreveu:
> On 10/8/21 4:32 PM, Paulo da Silva wrote:
>> Às 22:56 de 08/10/21, Paulo da Silva escreveu:
>>> Hi!
>>>
>>> I need to debug a python3 script under root. I tried spyder but it does
>>> not work.
>>>
>>> Running as root without --no-sandbox is not supported. See
>>> https://crbug.com/638180.
>>>
>>> Thanks for any comments including alternative solutions to debug as root.
>>>
>> I also tried with eric and curiously it gave the same message!!
>>
>> This seems crazy.
>
> Not so crazy. It's incredibly dangerous to run a web browser as root.
> There's no reason I can think of for running a python script driving a
> web browser as root.
spyder and eric are both python editors/debuggers! Why are they related
with web browsers?!

Thanks

--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
On 2021-10-13 19:09:43 +0100, Paulo da Silva wrote:
> ?s 02:08 de 12/10/21, Michael Torrie escreveu:
> > On 10/8/21 4:32 PM, Paulo da Silva wrote:
> >> ?s 22:56 de 08/10/21, Paulo da Silva escreveu:
> >>> I need to debug a python3 script under root. I tried spyder but it does
> >>> not work.
> >>>
> >>> Running as root without --no-sandbox is not supported. See
> >>> https://crbug.com/638180.
> >>>
> >>> Thanks for any comments including alternative solutions to debug as root.
> >>>
> >> I also tried with eric and curiously it gave the same message!!
> >>
> >> This seems crazy.
> >
> > Not so crazy. It's incredibly dangerous to run a web browser as root.

Mostly because a web browser is usually used to interpret untrusted
content from other sites ...

> > There's no reason I can think of for running a python script driving
> > a web browser as root.

... but this doesn't apply if the browser is just a display for a
locally running script. The script is already running as root. It can do
all the evil stuff without the help of a browser.

> spyder and eric are both python editors/debuggers! Why are they
> related with web browsers?!

They probably use a browser engine to implement the GUI. This isn't
uncommon. See Electron (https://www.electronjs.org/) for example.

I didn't see anything on the Spyder website about how it is implemented
(I didn't look very hard) but the error message hints that there's a
Chromium hidden somewhere. And Eric uses Qt5, and Chromium is derived
from WebKit which is Qt's browser engine. It's a bit weird that this
also refers to Chromium's bug tracker and not Qt's, but there's
certainly a common ancestry here.

hp

--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp@hjp.at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
Re: spyder does not work under root! [linux] [ In reply to ]
On 10/13/21 12:09 PM, Paulo da Silva wrote:
> spyder and eric are both python editors/debuggers! Why are they related
> with web browsers?!

Good point. I was going off of the chromium bug report. My bad. I
mistook Spyder for Selenium, which is a web scraping scripting engine
that does use a real browser. Oops.

However, for better or worse, browser engines power all kinds of apps
these days, including IDEs. I do not know if Spyder is powered by
Chromium or not. VS Code, for example, is powered by a web browser engine.

As to Eric and Qt, I can't speak to that.


--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
Às 23:55 de 13/10/21, Michael Torrie escreveu:
> On 10/13/21 12:09 PM, Paulo da Silva wrote:
>> spyder and eric are both python editors/debuggers! Why are they related
>> with web browsers?!
>
> Good point. I was going off of the chromium bug report. My bad. I
> mistook Spyder for Selenium, which is a web scraping scripting engine
> that does use a real browser. Oops.
>
> However, for better or worse, browser engines power all kinds of apps
> these days, including IDEs. I do not know if Spyder is powered by
> Chromium or not. VS Code, for example, is powered by a web browser engine.
>
> As to Eric and Qt, I can't speak to that.

Software starts to get sickly complicated these days :-(

Thanks Michael and Peter.
--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
On 10/13/21 16:55, Michael Torrie wrote:
> On 10/13/21 12:09 PM, Paulo da Silva wrote:
>> spyder and eric are both python editors/debuggers! Why are they related
>> with web browsers?!
>
> Good point. I was going off of the chromium bug report. My bad. I
> mistook Spyder for Selenium, which is a web scraping scripting engine
> that does use a real browser. Oops.
>
> However, for better or worse, browser engines power all kinds of apps
> these days, including IDEs. I do not know if Spyder is powered by
> Chromium or not. VS Code, for example, is powered by a web browser engine.
>
> As to Eric and Qt, I can't speak to that.

(sorry sent this wrong place first time)


The configuration dialog in eric uses its WebBrowser module, which uses
qtwebengine, which uses Chromium, which gives you the error. It's not a
Python error, fwiw.

It seems there's an environment variable you can try in the Qt world
(I've never had occasion to check this out):

https://forum.qt.io/topic/94721/running-as-root-without-no-sandbox-is-not-supported

--
https://mail.python.org/mailman/listinfo/python-list
Re: spyder does not work under root! [linux] [ In reply to ]
Às 16:16 de 14/10/21, Mats Wichmann escreveu:
> On 10/13/21 16:55, Michael Torrie wrote:
>> On 10/13/21 12:09 PM, Paulo da Silva wrote:
>>> spyder and eric are both python editors/debuggers! Why are they related
>>> with web browsers?!
>>
>> Good point. I was going off of the chromium bug report. My bad.  I
>> mistook Spyder for Selenium, which is a web scraping scripting engine
>> that does use a real browser.  Oops.
>>
>> However, for better or worse, browser engines power all kinds of apps
>> these days, including IDEs. I do not know if Spyder is powered by
>> Chromium or not.  VS Code, for example,  is powered by a web browser
>> engine.
>>
>> As to Eric and Qt, I can't speak to that.
>
> (sorry sent this wrong place first time)
>
>
> The configuration dialog in eric uses its WebBrowser module, which uses
> qtwebengine, which uses Chromium, which gives you the error.  It's not a
> Python error, fwiw.
>
> It seems there's an environment variable you can try in the Qt world
> (I've never had occasion to check this out):
>
> https://forum.qt.io/topic/94721/running-as-root-without-no-sandbox-is-not-supported
>
Ok, thank you.


--
https://mail.python.org/mailman/listinfo/python-list