Skip to content

Commit

Permalink
machine: prevent systemd from adjusting terminal title
Browse files Browse the repository at this point in the history
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 ...
  • Loading branch information
Cyanoxygen committed Nov 5, 2024
1 parent 9110d8c commit c83a772
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ pub fn execute_container_command<S: AsRef<OsStr>>(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)
Expand Down Expand Up @@ -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()?
Expand Down

0 comments on commit c83a772

Please sign in to comment.