From e5a311fe3ac1fa51dc5f52f725b41715636c1044 Mon Sep 17 00:00:00 2001 From: pulsareonbot Date: Tue, 7 Jul 2026 14:11:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(Live2D):=20pkill=20=E7=94=A8=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E8=B7=AF=E5=BE=84=20+=20service=20=E5=8A=A0=20PATH=20?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/showen_v2.service | 1 + src/plugins/video/mod.rs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/showen_v2.service b/scripts/showen_v2.service index 1a7d60c..76c847c 100644 --- a/scripts/showen_v2.service +++ b/scripts/showen_v2.service @@ -8,6 +8,7 @@ Type=simple User=showen Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/showen/.Xauthority +Environment=PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin WorkingDirectory=/home/showen/Showen/ShowenV2 ExecStart=/home/showen/Showen/ShowenV2/target/release/showen_v2 --config /home/showen/Showen/ShowenV2/configs/dog_state_machine.json Restart=on-failure diff --git a/src/plugins/video/mod.rs b/src/plugins/video/mod.rs index 2385eb9..cd8b01b 100644 --- a/src/plugins/video/mod.rs +++ b/src/plugins/video/mod.rs @@ -215,7 +215,7 @@ impl Plugin for VideoPlugin { let _ = child.wait(); } // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill -9 兜底 - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr") @@ -250,7 +250,7 @@ impl Plugin for VideoPlugin { let _ = child.wait(); } // Firefox 会 fork 多个子进程,child.kill() 只杀父进程,用 pkill -9 兜底 - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr") @@ -307,7 +307,7 @@ impl Plugin for VideoPlugin { let _ = child.kill(); let _ = child.wait(); } - let _ = std::process::Command::new("pkill") + let _ = std::process::Command::new("/usr/bin/pkill") .arg("-9") .arg("-f") .arg("firefox-esr")