I am trying to run the bevy breakout example on a Windows PC with Ubuntu inside a WSL shell. I followed the bevy quick start guide. But I get this error:
Command:
cargo run --example breakout
Message:
Finished dev [unoptimized + debuginfo] target(s) in 0.09s Running `/home/JohnDoe/bevy_example/bevy/target/debug/examples/breakout`thread 'main' panicked at crates/bevy_winit/src/lib.rs:136:14:Failed to build event loop: Os(OsError { line: 786, file: "/home/JohnDoe/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.14/src/platform_impl/linux/mod.rs", error: Misc("neither WAYLAND_DISPLAY nor WAYLAND_SOCKET nor DISPLAY is set.") })note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
It looks like the display is not configured right. How do I do that?
The output of
wsl -l -v
is
NAME STATE VERSION* Ubuntu-22.04 Stopped 2