From 330bc0376897b3802b88fba3e0140af9c409951c Mon Sep 17 00:00:00 2001 From: rustdesk Date: Fri, 9 Jun 2023 23:16:21 +0800 Subject: [PATCH] remove linux tray, since pkexec can not work under run_as env --- src/core_main.rs | 9 --------- src/ui_interface.rs | 1 - 2 files changed, 10 deletions(-) diff --git a/src/core_main.rs b/src/core_main.rs index a86a3db6d..725cf92fc 100644 --- a/src/core_main.rs +++ b/src/core_main.rs @@ -172,15 +172,6 @@ pub fn core_main() -> Option> { log::info!("start --server with user {}", crate::username()); #[cfg(any(target_os = "linux", target_os = "windows"))] { - #[cfg(target_os = "linux")] - std::thread::spawn(move || { - std::thread::sleep(std::time::Duration::from_secs(3)); - if crate::platform::is_root() { - hbb_common::allow_err!(crate::platform::run_as_user(vec!["--tray"], None)); - } else { - hbb_common::allow_err!(crate::run_me(vec!["--tray"])); - } - }); crate::start_server(true); return None; } diff --git a/src/ui_interface.rs b/src/ui_interface.rs index ec2c23bd9..8e68dd812 100644 --- a/src/ui_interface.rs +++ b/src/ui_interface.rs @@ -284,7 +284,6 @@ pub fn set_option(key: String, value: String) { if value == "Y" { if crate::platform::uninstall_service(true) { std::process::exit(0); - return; } } else { if crate::platform::install_service() {