zaycev / bevy-magic-light-2d

Experiment with computing 2D shading, lighting and shadows with Bevy Engine
Apache License 2.0
427 stars 37 forks source link

Cannot run `krypta` example on Linux #15

Closed BrettWitty closed 1 year ago

BrettWitty commented 1 year ago

In running cargo run --example krypta, I get

thread 'main' panicked at 'Failed to initialize any backend! Wayland status: NoCompositorListening X11 status: "backend disabled"', /home/brettw/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.27.5/src/platform_impl/linux/mod.rs:719:9
dbenson24 commented 1 year ago

That would not be related to this crate. It looks like you are running this over ssh. Run it locally

BrettWitty commented 1 year ago

I did the following in a local terminal:

I got the above error. My distro:

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:    20.04
Codename:   focal

I assume the Cargo.toml disabling all bevy default features and requiring wayland might not work if I'm on X11 (as double-checked by XDG_SESSION_TYPE.

dbenson24 commented 1 year ago

Can you run other examples from the Bevy repo?

BrettWitty commented 1 year ago

No, unfortunately, as per #14.

dbenson24 commented 1 year ago

No I meant the actual Bevy repo, not bevy magic light. Have you successfully run any Bevy app before

BrettWitty commented 1 year ago

Yes, I have. I just pulled the latest bevy main, and ran examples from that.

On bevy-magic-light-2d I did cargo add bevy --features x11 which adds the x11 feature back in and the krypta example compiles and runs. Disabling all default features and defaulting just to wayland is the issue for some Linux setups.