fix: linux, login wayland, server (#8111)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-05-21 23:35:47 +08:00
committed by GitHub
parent e192f10c56
commit 534fc9c40c
3 changed files with 25 additions and 11 deletions

View File

@@ -1241,7 +1241,7 @@ mod desktop {
return;
}
let seat0_values = get_values_of_seat0(&[0, 1, 2]);
let seat0_values = get_values_of_seat0_with_gdm_wayland(&[0, 1, 2]);
if seat0_values[0].is_empty() {
*self = Self::default();
self.is_rustdesk_subprocess = false;

View File

@@ -1168,18 +1168,21 @@ impl Connection {
}
#[cfg(target_os = "linux")]
if !self.file_transfer.is_some() && !self.port_forward_socket.is_some() {
let dtype = crate::platform::linux::get_display_server();
if dtype != crate::platform::linux::DISPLAY_SERVER_X11
&& dtype != crate::platform::linux::DISPLAY_SERVER_WAYLAND
{
let msg = if crate::platform::linux::is_login_screen_wayland() {
crate::client::LOGIN_SCREEN_WAYLAND.to_owned()
} else {
format!(
let mut msg = "".to_string();
if crate::platform::linux::is_login_screen_wayland() {
msg = crate::client::LOGIN_SCREEN_WAYLAND.to_owned()
} else {
let dtype = crate::platform::linux::get_display_server();
if dtype != crate::platform::linux::DISPLAY_SERVER_X11
&& dtype != crate::platform::linux::DISPLAY_SERVER_WAYLAND
{
msg = format!(
"Unsupported display server type \"{}\", x11 or wayland expected",
dtype
)
};
);
}
}
if !msg.is_empty() {
res.set_error(msg);
let mut msg_out = Message::new();
msg_out.set_login_response(res);