mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 12:50:54 +00:00
guest: init: default to xterm if TERM is not set (#52)
Most terminal emulators support the xterm control codes more faithfully than the vt100 ones. Fixes #51. Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
f41a1e2168
commit
73fd95dbe2
@ -420,7 +420,12 @@ impl GuestInit {
|
||||
}
|
||||
env.extend(launch.env.clone());
|
||||
env.insert("KRATA_CONTAINER".to_string(), "1".to_string());
|
||||
env.insert("TERM".to_string(), "vt100".to_string());
|
||||
|
||||
// If we were not provided a terminal definition in our launch manifest, we
|
||||
// default to xterm as most terminal emulators support the xterm control codes.
|
||||
if !env.contains_key("TERM") {
|
||||
env.insert("TERM".to_string(), "xterm".to_string());
|
||||
}
|
||||
|
||||
let path = GuestInit::resolve_executable(&env, path.into())?;
|
||||
let Some(file_name) = path.file_name() else {
|
||||
|
Loading…
Reference in New Issue
Block a user