rustdesk 2022-12-11 00:16:02 +08:00
parent dcdcf62140
commit a6135068a9

View File

@ -179,7 +179,8 @@ fn set_x11_env(uid: &str) {
log::info!("uid of seat0: {}", uid); log::info!("uid of seat0: {}", uid);
let gdm = format!("/run/user/{}/gdm/Xauthority", uid); let gdm = format!("/run/user/{}/gdm/Xauthority", uid);
let mut auth = get_env_tries("XAUTHORITY", uid, 10); let mut auth = get_env_tries("XAUTHORITY", uid, 10);
if auth.is_empty() { // auth is another user's when uid = 0, https://github.com/rustdesk/rustdesk/issues/2468
if auth.is_empty() || uid == "0" {
auth = if std::path::Path::new(&gdm).exists() { auth = if std::path::Path::new(&gdm).exists() {
gdm gdm
} else { } else {