Skip to content

Commit c83a772

Browse files
committed
machine: prevent systemd from adjusting terminal title
systemd tries to be annoying by setting a fAnCy terminal title with a emoji ✨ 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 ...
1 parent 9110d8c commit c83a772

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/machine.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ pub fn execute_container_command<S: AsRef<OsStr>>(ns_name: &str, args: &[S]) ->
189189
}
190190
// TODO: maybe replace with systemd API cross-namespace call?
191191
let exit_code = Command::new("systemd-run")
192+
.env("SYSTEMD_ADJUST_TERMINAL_TITLE", "0")
192193
.args(extra_options)
193194
.args(["-M", ns_name, "-qt", "--"])
194195
.args(args)
@@ -216,6 +217,7 @@ fn kill_container(proxy: &MachineProxyBlocking) -> Result<()> {
216217
fn execute_poweroff(ns_name: &str) -> Result<()> {
217218
// TODO: maybe replace with systemd API cross-namespace call?
218219
let exit_code = Command::new("systemd-run")
220+
.env("SYSTEMD_ADJUST_TERMINAL_TITLE", "0")
219221
.args(["-M", ns_name, "-q", "--no-block", "--", "poweroff"])
220222
.spawn()?
221223
.wait()?

0 commit comments

Comments
 (0)