xwayland: Expose DISPLAY variable to clients

This commit is contained in:
Victoria Brekenfeld 2023-01-24 18:08:52 +01:00
parent 51f53aa899
commit e5f4911bb6
3 changed files with 23 additions and 2 deletions

View file

@ -900,6 +900,15 @@ impl State {
.arg("-c")
.arg(command)
.env("WAYLAND_DISPLAY", &self.common.socket)
.env(
"DISPLAY",
&self
.common
.xwayland_state
.values()
.find_map(|s| s.display.map(|v| format!(":{}", v)))
.unwrap_or(String::new()),
)
.env_remove("COSMIC_SESSION_SOCK")
.spawn()
{