From c83a7725d605373204f1c62db0bfe79bf6e3d27e Mon Sep 17 00:00:00 2001 From: Cyan Date: Tue, 5 Nov 2024 18:02:56 +0800 Subject: [PATCH] machine: prevent systemd from adjusting terminal title systemd tries to be annoying by setting a fAnCy terminal title with a emoji :sparkles: status indicator in it when running command inside a nspawn container, and adding a tint to the terminal background (which we suppressed earlier). Stop, just stop please. Such thing does not help at all. All these bold moves ... --- src/machine.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/machine.rs b/src/machine.rs index 60de6a2..7d86823 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -189,6 +189,7 @@ pub fn execute_container_command>(ns_name: &str, args: &[S]) -> } // TODO: maybe replace with systemd API cross-namespace call? let exit_code = Command::new("systemd-run") + .env("SYSTEMD_ADJUST_TERMINAL_TITLE", "0") .args(extra_options) .args(["-M", ns_name, "-qt", "--"]) .args(args) @@ -216,6 +217,7 @@ fn kill_container(proxy: &MachineProxyBlocking) -> Result<()> { fn execute_poweroff(ns_name: &str) -> Result<()> { // TODO: maybe replace with systemd API cross-namespace call? let exit_code = Command::new("systemd-run") + .env("SYSTEMD_ADJUST_TERMINAL_TITLE", "0") .args(["-M", ns_name, "-q", "--no-block", "--", "poweroff"]) .spawn()? .wait()?