This commit is contained in:
rustdesk 2023-08-09 21:28:12 +08:00
parent d3b305ced3
commit 723a1897b9

View File

@ -921,7 +921,7 @@ mod desktop {
fn get_display(&mut self) { fn get_display(&mut self) {
let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11]; let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11];
for diplay_env in display_envs { for diplay_env in display_envs {
self.display = get_env_tries("DISPLAY", &self.uid, diplay_env, 20); self.display = get_env_tries("DISPLAY", &self.uid, diplay_env, 10);
if !self.display.is_empty() { if !self.display.is_empty() {
break; break;
} }
@ -984,7 +984,7 @@ mod desktop {
// try by direct access to window manager process by name // try by direct access to window manager process by name
let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11]; let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11];
for diplay_env in display_envs { for diplay_env in display_envs {
self.xauth = get_env_tries("XAUTHORITY", &self.uid, diplay_env, 20); self.xauth = get_env_tries("XAUTHORITY", &self.uid, diplay_env, 10);
if !self.xauth.is_empty() { if !self.xauth.is_empty() {
break; break;
} }