From d1e0ae7815870c34f04cff5b8e896d38d91e9437 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 8 Mar 2023 11:28:00 +0800 Subject: [PATCH] never show empty display server, use x11 instead, #3541 --- libs/hbb_common/src/platform/linux.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/hbb_common/src/platform/linux.rs b/libs/hbb_common/src/platform/linux.rs index 191ea2e6f..f6133415a 100644 --- a/libs/hbb_common/src/platform/linux.rs +++ b/libs/hbb_common/src/platform/linux.rs @@ -81,8 +81,10 @@ fn get_display_server_of_session(session: &str) -> String { display_server = sestype; } } - // If the session is not a tty, then just return the type as usual - display_server + if display_server == "" { + display_server = "x11".to_owned(); + } + display_server.to_lowercase() } pub fn get_values_of_seat0(indices: Vec) -> Vec {