INNER CODE UNIT · Rust
gdk_backend_for
slothflowlabs/duckle · apps/desktop/src/lib.rs:71
fn gdk_backend_for(
display: Option<&str>,
wayland: Option<&str>,
chosen: Option<&str>,
) -> Result<Option<&'static str>, String> {
let set = |v: Option<&str>| v.is_some_and(|s| !s.is_empty());
if set(chosen) {
return Ok(None);
}
if set(wayland) {
return Ok(Some("x11,wayland"));
}
if set(display) {
return Ok(None);
}
Err("Duckle cannot open its window: this session has no display (neither DISPLAY nor \
WAYLAND_DISPLAY is set), which is what a login over SSH or a server without a \
desktop looks like. Start it from a desktop session, or run it without a window: \