Merge pull request #2793 from st0nie/master

fix session type when starting wayland via tty
This commit is contained in:
RustDesk 2023-01-10 20:52:58 +08:00 committed by GitHub
commit a3f9d477ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ fn get_display_server_of_session(session: &str) -> String {
} else {
"".to_owned()
};
if display_server.is_empty() {
if display_server.is_empty() || display_server == "tty" {
// loginctl has not given the expected output. try something else.
if let Ok(sestype) = std::env::var("XDG_SESSION_TYPE") {
display_server = sestype;