fix session type when starting wayland via tty

This commit is contained in:
ston 2023-01-10 18:14:41 +08:00
parent c7fd38ed23
commit aafccf423d

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;