cage-kiosk / cage

A Wayland kiosk
https://www.hjdskes.nl/projects/cage
MIT License
1.2k stars 78 forks source link

Unable to create wlroots backend #331

Open J-Cake opened 6 months ago

J-Cake commented 6 months ago

Hi, I'm so keen to get cage working but am stuck at this error:

[jcake@jcake-edu cage]$ XDG_RUNTIME_DIR=/run/user/0 sudo -E ./build/cage obsidian 
[sudo] password for jcake: 
00:00:00.000 [backend/wayland/backend.c:592] Could not connect to remote display: No such file or directory
00:00:00.000 [../cage.c:299] Unable to create the wlroots backend

I'm trying to run obsidian on Cage. I've tried various combinations of search queries but haven't had much luck, but here's the gist of what I've tried:

The error is referring to /run/user/1000/wayland-0 since that's what WAYLAND_DISPLAY is set to.

I'm hoping for a some insight into how I could debug this further.

Thanks

emersion commented 6 months ago

If WAYLAND_DISPLAY is set, wlroots will select the Wayland backend instead of DRM (so it will try to connect to a parent Wayland compositor and run cage in a nested window).

Note that it's not possible to start cage with the DRM backend when another compositor is running. You need to start from a TTY.

J-Cake commented 6 months ago

Thanks for the speedy reply! I'm indeed running from a TTY, but even without the WAYLAND_DISPLAY environment variable I'm still getting an error, although a different one:

[jcake@jcake-edu cage]$ WLR_RENDERER_ALLOW_SOFTWARE=1 ./build/cage obsidian -- --enable-features=UseOzonePlatform --ozone-platform=wayland
00:00:00.001 [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
00:00:00.001 [EGL] command: eglQueryDeviceStringEXT, error: EGL_BAD_PARAMETER (0x300c), message: "eglQueryDeviceStringEXT"
pci id for fd 14: 1234:1111, driver (null)
MESA-LOADER: failed to open bochs-drm: /usr/lib/dri/bochs-drm_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
pci id for fd 17: 1234:1111, driver (null)
MESA-LOADER: failed to open bochs-drm: /usr/lib/dri/bochs-drm_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
00:00:00.044 [xwayland/server.c:454] Cannot find Xwayland binary "/usr/bin/Xwayland"
00:00:00.045 [../cage.c:515] Cannot create XWayland server
00:00:00.045 [../cage.c:548] Unable to open Wayland socket: Invalid argument

If it's at all possible to avoid Xwayland, that would be even better

emersion commented 6 months ago

"Unable to open Wayland socket: Invalid argument": this message is triggered by a misconfigured XDG_RUNTIME_DIR (probably cage cannot create a file in that dir).

J-Cake commented 6 months ago

I did run it previously with XDG_RUNTIME_DIR=/run/user/1000 but recall getting a similar error. I'll let you know when I'm back at my computer

J-Cake commented 4 months ago

Hi sorry for the non-response. I can confirm I get the same error

cammelspit commented 4 months ago

I am getting the same error and haven't quite figured it out yet. I have used cage on other systems just not my current pure Arch build so frankly, I assume I'm missing something somewhere.