From c46bb03e3f13dc50f4f7da770bb87249a47550cb Mon Sep 17 00:00:00 2001 From: shenmo Date: Sun, 12 Apr 2026 21:01:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86host-spawn=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAsystemd-run=20--user=E4=BB=A5=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- electron/main/index.ts | 2 +- extras/app-launcher | 2 +- tool/store-helper/ss-launcher | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/electron/main/index.ts b/electron/main/index.ts index f327bdde..c52c712e 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -220,7 +220,7 @@ ipcMain.handle("open-install-settings", async () => { const { spawn } = await import("node:child_process"); const scriptPath = "/opt/durapps/spark-store/bin/update-upgrade/ss-update-controler.sh"; - const child = spawn("/opt/spark-store/extras/host-spawn", [scriptPath], { + const child = spawn("systemd-run", ["--user", scriptPath], { detached: true, stdio: "ignore", }); diff --git a/extras/app-launcher b/extras/app-launcher index 0460eaef..eac50655 100755 --- a/extras/app-launcher +++ b/extras/app-launcher @@ -61,7 +61,7 @@ function launch_app() { # 提取并净化Exec命令 exec_command=$(grep -m1 '^Exec=' "$DESKTOP_FILE_PATH" | cut -d= -f2- | sed 's/%.//g') [ -z "$exec_command" ] && return 1 - [ ! -z "$IS_ACE_ENV" ] && HOST_PREFIX="host-spawn" + [ ! -z "$IS_ACE_ENV" ] && HOST_PREFIX="systemd-run --user" exec_command="${HOST_PREFIX} $exec_command" log.info "Launching: $exec_command" ${SHELL:-bash} -c " $exec_command" & diff --git a/tool/store-helper/ss-launcher b/tool/store-helper/ss-launcher index 0460eaef..eac50655 100755 --- a/tool/store-helper/ss-launcher +++ b/tool/store-helper/ss-launcher @@ -61,7 +61,7 @@ function launch_app() { # 提取并净化Exec命令 exec_command=$(grep -m1 '^Exec=' "$DESKTOP_FILE_PATH" | cut -d= -f2- | sed 's/%.//g') [ -z "$exec_command" ] && return 1 - [ ! -z "$IS_ACE_ENV" ] && HOST_PREFIX="host-spawn" + [ ! -z "$IS_ACE_ENV" ] && HOST_PREFIX="systemd-run --user" exec_command="${HOST_PREFIX} $exec_command" log.info "Launching: $exec_command" ${SHELL:-bash} -c " $exec_command" &