mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
use autostart for --tray in linux because pkexec not work well when start it with --server
This commit is contained in:
@@ -41,6 +41,14 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
}
|
||||
i += 1;
|
||||
}
|
||||
#[cfg(any(target_os = "linux", target_os = "windows"))]
|
||||
if args.is_empty() {
|
||||
#[cfg(target_os = "linux")]
|
||||
hbb_common::allow_err!(crate::platform::check_autostart_config());
|
||||
if crate::check_process("--server", false) && !crate::check_process("--tray", true) {
|
||||
hbb_common::allow_err!(crate::run_me(vec!["--tray"]));
|
||||
}
|
||||
}
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[cfg(not(any(target_os = "android", target_os = "ios")))]
|
||||
register_breakdown_handler(breakdown_callback);
|
||||
|
||||
Reference in New Issue
Block a user