diff --git a/src/uucore/src/lib/features/systemd_logind.rs b/src/uucore/src/lib/features/systemd_logind.rs index 537cb1e3f51..5c038ce37dc 100644 --- a/src/uucore/src/lib/features/systemd_logind.rs +++ b/src/uucore/src/lib/features/systemd_logind.rs @@ -444,8 +444,9 @@ pub fn read_login_records() -> UResult> { .unwrap_or_default(); // Determine host (use remote_host if available) + // If host is local (non-remote) we use display, let host = if remote_host.is_empty() { - String::new() + display.clone() } else { remote_host };