Error: cannot open display: :0
When I start torbrowser, I see
Error: cannot open display: :0
I'm on sway with Xwayland. Other X applications work fine.
I neither use wayland, nor sway. So I can't reproduce the issue.
/usr/bin/torbrowser is actually a script, setting some environment variables. Maybe one of those is messing with your system?
$ /usr/lib64/torbrowser/torbrowser
Error: cannot open display: :0
If you don't require running torbrowser under X you can have it running under wayland natively instead. For testing you could run the following from the commandline:
$ MOZ_ENABLE_WAYLAND=1 torbrowser
I don't know if this will work for the compiled version as I am currently using the torbrowser-launcher.
I don't know if this will work for the compiled version
You'd have to unmask the useflag to compile www-client/torbrowser with wayland support.
I haven't unmasked wayland use flag, but equery u torbrowser says wayland use flag is enabled.
Please post emerge --info www-client/torbrowser
I haven't unmasked wayland use flag, but
equery u torbrowsersays wayland use flag is enabled.
It isn't. See:
USE="X dbus jumbo-build pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -clang -hardened -system-png (-wayland)"
[ Legend : U - final flag setting for installation]
[ : I - package is installed with flag ]
The I column shows how the package is installed.
U I
+ - wayland : Enable dev-libs/wayland backend
So torbrowser is installed with -wayland because the useflag is masked as mentioned in https://github.com/MeisterP/torbrowser-overlay/issues/83#issuecomment-2516443895
This isn't fixed from my end, yet.