You are not logged in.
Hello folks,
On my machine, I'm running a Wayland window manager - Hyprland
However, my system is reporting both variables
$ printenv | grep -iE 'DISPLAY'
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1
WAYLAND_DISPLAY=wayland-1
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
DISPLAY=:1
As seen above, both variables
DISPLAY
and
WAYLAND_DISPLAY
which should ideally be mutually exclusive
Also, this is causing problems with launching applications
For example, when launching rog-control-center
$ rog-control-center
WARN: Zero len read of Config file
Authorization required, but no authorization protocol specified
ERROR: ROGTray: gtk init Failed to initialize GTK
Authorization required, but no authorization protocol specified
thread 'main' panicked at 'Failed to initialize any backend! Wayland status: XdgRuntimeDirNotSet X11 status: XOpenDisplayFailed', /var/cache/private/pikaur/build/asusctl/src/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:757:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
Requesting any ideas on this issue.
Offline
Have you tried unsetting DISPLAY before running your program?
Offline
It's supposed to show both variables (... how else would x11 clients know which xwayland server they should connect to?) and that's absolutely not something out of the ordinary. However have you read the README of the project you're attempting to run? https://gitlab.com/asus-linux/asusctl/- … md#running
Last edited by V1del (2023-09-21 13:43:50)
Offline
It's supposed to show both variables (... how else would x11 clients know which xwayland server they should connect to?) and that's absolutely not something out of the ordinary. However have you read the README of the project you're attempting to run? https://gitlab.com/asus-linux/asusctl/- … md#running
Hello,
Thank you for the response. I missed reading the instructions actually, but I get the same error even after doing that
$ WINIT_UNIX_BACKEND=x11 rog-control-center
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
ERROR: ROGTray: gtk init Failed to initialize GTK
thread 'main' panicked at 'Failed to initialize X11 backend: XOpenDisplayFailed', /var/cache/private/pikaur/build/asusctl/src/cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.28.6/src/platform_impl/linux/mod.rs:723:26
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
The above command is running under root by the way.
This might be an issue with the program itself, which is fine.
More general question for you -
You're saying this is expected behaviour?
So when a program is run using XWayland, it will need DISPLAY set? Doesn't Wayland handle that internally? Since XWayland is essentially running under Wayland?
Because I can swear I've seen the DISPLAY variable being empty ( -z under bash, essentially) when running under Wayland. Only from the past few days I'm seeing it being set under Hyprland
Offline
The above command is running under root by the way.
What?! Why? Don't do that. That is the problem.
You're saying this is expected behaviour?
Yes, for any compositor which provides xwayland. DISPLAY must be set so clients know what to connect to. X11 clients know nothing of wayland - they just look for DISPLAY and connect to that. It is optional though - not all compositors provide xwayland, and many of those that do have it as an optional feature that can be enabled / disabled.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline