diff --git a/privileges_scripts/install.scpt b/privileges_scripts/install.scpt
index 84937050f..e1dd2464d 100644
--- a/privileges_scripts/install.scpt
+++ b/privileges_scripts/install.scpt
@@ -4,6 +4,13 @@ set sh1 to "cp " & current_dir & "com.carriez.rustdesk.daemon.plist /Library/Lau
set sh2 to "cp " & current_dir & "com.carriez.rustdesk.agent.root.plist /Library/LaunchAgents/com.carriez.rustdesk.agent.root.plist && chown root:wheel /Library/LaunchAgents/com.carriez.rustdesk.agent.root.plist"
set sh3 to "cp " & current_dir & "com.carriez.rustdesk.agent.user.plist /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist && chown root:wheel /Library/LaunchAgents/com.carriez.rustdesk.agent.user.plist"
-set sh to sh1 & ";" & sh2 & ";" & sh3
+set sh to sh1 & ";" & sh2 & ";" & sh3 & "
+launchctl enable system/com.carriez.rustdesk.daemon;
+launchctl start system/com.carriez.rustdesk.daemon;
+launchctl enable system/com.carriez.rustdesk.agent.root;
+launchctl start system/com.carriez.rustdesk.agent.root;
+launchctl enable system/com.carriez.rustdesk.agent.user
+launchctl start system/com.carriez.rustdesk.agent.user
+"
-do shell script sh with prompt "RustDesk需要安装服务plist" with administrator privileges
\ No newline at end of file
+do shell script sh with prompt "RustDesk需要安装服务" with administrator privileges
\ No newline at end of file
diff --git a/src/lang/cn.rs b/src/lang/cn.rs
index 23dd4348c..98d645063 100644
--- a/src/lang/cn.rs
+++ b/src/lang/cn.rs
@@ -195,5 +195,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
("Socks5 Proxy", "Socks5 代理"),
("Hostname", "主机名"),
("Discovered", "已发现"),
+ ("install_daemon", "为了支持在登录系统时可以访问你的桌面,RustDesk需要\"安装系统服务\"")
].iter().cloned().collect();
}
diff --git a/src/platform/macos.rs b/src/platform/macos.rs
index 85b3e8ea1..7b9720c6e 100644
--- a/src/platform/macos.rs
+++ b/src/platform/macos.rs
@@ -19,7 +19,6 @@ use core_graphics::{
use hbb_common::{allow_err, bail, log};
use objc::{class, msg_send, sel, sel_impl};
use scrap::{libc::c_void, quartz::ffi::*};
-use std::io::Read;
static mut LATEST_SEED: i32 = 0;
@@ -139,14 +138,6 @@ pub fn is_installed_daemon(prompt: bool) -> bool {
return false;
}
- if !std::process::Command::new("osascript")
- .arg("./privileges_scripts/launch_service.scpt")
- .status()
- .unwrap()
- .success() {
- return false;
- }
-
return true;
}
diff --git a/src/ui/index.tis b/src/ui/index.tis
index 850a35e62..d58497b3d 100644
--- a/src/ui/index.tis
+++ b/src/ui/index.tis
@@ -307,7 +307,7 @@ class App: Reactor.Component
{handler.is_installed() && !software_update_url && handler.is_installed_lower_version() ? : ""}
{is_can_screen_recording ? "": }
{is_can_screen_recording && !handler.is_process_trusted(false) ? : ""}
- {is_can_screen_recording && handler.is_process_trusted(false) && handler.is_installed_daemon(false) ? : ""}
+ {is_can_screen_recording && handler.is_process_trusted(false) && !handler.is_installed_daemon(false) ? : ""}
{system_error ? : ""}
{!system_error && handler.is_login_wayland() && !handler.current_is_wayland() ? : ""}
{!system_error && handler.current_is_wayland() ? : ""}