mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 13:11:31 +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:
@ -420,7 +420,12 @@ impl GuestInit {
|
|||||||
}
|
}
|
||||||
env.extend(launch.env.clone());
|
env.extend(launch.env.clone());
|
||||||
env.insert("KRATA_CONTAINER".to_string(), "1".to_string());
|
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 path = GuestInit::resolve_executable(&env, path.into())?;
|
||||||
let Some(file_name) = path.file_name() else {
|
let Some(file_name) = path.file_name() else {
|
||||||
|
Reference in New Issue
Block a user