mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-11-03 16:32:22 +00:00
use autostart for --tray in linux because pkexec not work well when start it with --server
This commit is contained in:
1 parent
b14ae250b7
commit
87b32ad8c4
5 files changed
+37
-8
No files matched your search
@@ -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