How do I run an app with X11 in Xwayland?

I have an app that I would like to run, but when I try to run it, it spits out this error:

Unhandled exception. System.Exception: GLFW error: Wayland: The platform does not support setting the window position
   at Glib.Window.OnLoad() in /home/runner/work/rained/rained/src/Glib/Window.cs:line 269
   at Silk.NET.Windowing.Internals.ViewImplementationBase.Initialize()
   at Glib.Window.Initialize() in /home/runner/work/rained/rained/src/Glib/Window.cs:line 434
   at Rained.Boot.LaunchEditor() in /home/runner/work/rained/rained/src/Rained/Boot.cs:line 192
   at Rained.Boot.Main(String[] args) in /home/runner/work/rained/rained/src/Rained/Boot.cs:line 54

I know that Wayland doesn’t support window positioning, so I want to run it with X11 through Xwayland. (I really don’t want to switch DE just to run it) But, I don’t know how to? I can’t figure it out. I’ve tried these commands:

DISPLAY=:0 ./Rained
DISPLAY=:eDP-1 ./Rained
env -u WAYLAND_DISPLAY ./Rained
GDK_BACKEND=X11 ./Rained
QT_QPA_PLATFORM=xcb ./Rained

All of them gave the same error. I’m pretty certain I’m on Xwayland because I can run xterm just fine, but I might be wrong. Does anyone know how to do this?

Also, I’m on NVIDIA, KDE Plasma Fedora 42.

I’m not too sure for pre-built, but it sounds like disabling GLFW_BUILD_WAYLAND might force it to auto-use X11 GLFW Wayland Support · Issue #2558 · glfw/glfw · GitHub

I’m not exactly sure with specifics, but I think higher-level APIs might determine Wayland’s use; like I’ve seen GLFW with Minecraft and it’s Wayland usage can be adjusted through Java, and stuff in SDL has SDL_VIDEO_DRIVER=x11; I’m not sure what Rained is but it looks like a .NET app?

It is a .NET app.

Nevermind! The nightly build has this fixed, so I don’t need to do that anymore.

1 Like