New ebook-viewer in Linux - problem running as root
#1  cikasole 10-21-2019, 07:12 AM

After updating Calibre to version 4.20, I can not start ebook-viewer any more.

The problem is related to running the program with root privilege. I use Linux as root. I know it's not recommended, but there are reasons for that. Long story.
I can not use sudo or gksu to another users, it's too complicated, all my files are owned by root, don't ask me to explain.

When started directly from CLI, ebook-viewer gives the following:
# ebook-viewer
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[11856:11856:1021/] Running as root without --no-sandbox is not supported. See
Also, when try --no-sandbox switch:
ebook-viewer: error: no such option: --no-sandbox

What can be done regarding this problem?


#2  kovidgoyal 10-21-2019, 07:35 AM
Do not run as root, and if you really insist on it then you need to provide that argument to qt webengine not calibre which you can do via an env var

#3  cikasole 10-21-2019, 08:17 AM
Thank you on your very quick answer.

I can agree on that it's qt related problem, but wander why it surfaced only after Calibre upgrade? Qt didn't change on my system. And it is GTK based, BTW. Also, as far as I can see, new ebook-viewer is the only program on my system having this sort of problem. Was the old viewer also qt based?

Thank you for the link. I checked it, but I'm afraid I don't understand it well. It mentions --no-sandbox switch, but I don't get how to use it - with what command? Command ebook-viewer does not accept it. Also, the only environment variable mentioned in that text seems to be Chromium (and debugging) related. Doesn't seem very similar to my case.

I'd appreciate if you could be more specific with what you suggested.

TIA agin and best regards,

#4  kovidgoyal 10-21-2019, 08:22 AM
QTWEBENGINE_CHROMIUM_FLAGS="--no-sandbox" ebook-viewer

#5  cikasole 10-21-2019, 09:32 AM
Thank you, I'll try this.

Today's Posts | Search this Thread | Login | Register