Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix macos stop service on gui not restart

rustdesk1f25a8af86f9
diff --git a/src/platform/macos.rs b/src/platform/macos.rs
index 53327b048..58678b007 100644
--- a/src/platform/macos.rs
+++ b/src/platform/macos.rs
@@ -258,12 +258,9 @@ pub fn uninstall_service(show_new_window: bool, sync: bool) -> bool {
.status()
.ok();
if show_new_window {
- std::process::Command::new("sh")
- .arg("-c")
- .arg(&format!(
- "sleep 0.5; open /Applications/{}.app",
- crate::get_app_name(),
- ))
+ std::process::Command::new("open")
+ .arg("-n")
+ .arg(&format!("/Applications/{}.app", crate::get_app_name()))
.spawn()
.ok();
}