From 723a1897b9f44a55664140477e938d41b4ef4a60 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 9 Aug 2023 21:28:12 +0800 Subject: [PATCH] revert get_env_tries tries back to 10, https://github.com/rustdesk/rustdesk/pull/5276#issuecomment-1671288661 --- src/platform/linux.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/linux.rs b/src/platform/linux.rs index ab8d53732..c09d26008 100644 --- a/src/platform/linux.rs +++ b/src/platform/linux.rs @@ -921,7 +921,7 @@ mod desktop { fn get_display(&mut self) { let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11]; 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() { break; } @@ -984,7 +984,7 @@ mod desktop { // try by direct access to window manager process by name let display_envs = vec![GNOME_SESSION_BINARY, XFCE4_PANEL, SDDM_GREETER, PLASMA_X11]; 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() { break; }