diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index f20d665b..07853b28 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -103,7 +103,6 @@ pub async fn reinstall_service() -> Result<()> { }; log::info!(target:"app", "status code:{}", status.code().unwrap()); - let elevator = crate::utils::help::linux_elevator(); let status = match get_effective_uid() { 0 => StdCommand::new(install_shell).status()?, _ => StdCommand::new(elevator) diff --git a/src-tauri/src/utils/help.rs b/src-tauri/src/utils/help.rs index b6fda2a9..35279187 100644 --- a/src-tauri/src/utils/help.rs +++ b/src-tauri/src/utils/help.rs @@ -108,7 +108,7 @@ pub fn open_file(app: tauri::AppHandle, path: PathBuf) -> Result<()> { #[cfg(target_os = "linux")] pub fn linux_elevator() -> String { use std::process::Command; - match Command::new("which").arg("sudo").output() { + match Command::new("which").arg("pkexec").output() { Ok(output) => { if !output.stdout.is_empty() { // Convert the output to a string slice