From 050febc94fe7d84bea51a462e9cae1433837c8d6 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 20 Jul 2024 16:45:41 +0200 Subject: [PATCH] Don't set the DISPLAY env var This is the only case where init sets an env var without the user instructing it to do so, making it hard to trace back where the env var originated from. It also only sets it for processes spawned after the first run.d command for whatever reason. And finally not setting DISPLAY avoids hard coding knowledge about unrelated system components. --- src/main.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 489bb9200a..49c559b6ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,7 +127,6 @@ pub fn run(file: &Path) -> Result<()> { if missing_arg { println!("init: failed to run.d: no argument or all dirs are non-existent"); } else { - std::env::set_var("DISPLAY", "3"); // This takes advantage of BTreeMap iterating in sorted order. for (_, entry_path) in entries { if let Err(err) = run(&entry_path) {