Skip to content

Commit 8f3003f

Browse files
committed
fix(desktop): address AppImage review feedback
Signed-off-by: Daniel Cadenas <[email protected]>
1 parent 480b5ee commit 8f3003f

3 files changed

Lines changed: 18 additions & 4 deletions

File tree

‎desktop/scripts/fix-appimage.sh‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ echo "==> Installing GStreamer launcher shim on the app binary"
122122
# silently ship — so fail loudly (mirrors the libwayland guard above).
123123
APPRUN_WRAPPED="$WORKDIR/squashfs-root/AppRun.wrapped"
124124
if ! grep -aq "GST_PLUGIN_SYSTEM_PATH_1_0" "$APPRUN_WRAPPED"; then
125-
echo "Error: AppRun.wrapped no longer references GST_PLUGIN_SYSTEM_PATH_1_0 — GStreamer path injection changed; re-verify fix-appimage.sh" >&2
125+
echo "Error: AppRun.wrapped is missing or no longer references GST_PLUGIN_SYSTEM_PATH_1_0 — GStreamer path injection changed; re-verify fix-appimage.sh" >&2
126126
exit 1
127127
fi
128128

@@ -155,11 +155,11 @@ for var in GST_PLUGIN_SYSTEM_PATH_1_0 GST_PLUGIN_SYSTEM_PATH \
155155
GST_PLUGIN_PATH_1_0 GST_PLUGIN_PATH \
156156
GST_PLUGIN_SCANNER GST_PLUGIN_SCANNER_1_0; do
157157
val="${!var-}"
158-
if [[ -n "$val" && "$val" == *"$appdir"* ]]; then
158+
if [[ -n "$val" && "$val" == *"$appdir/"* ]]; then
159159
unset "$var"
160160
fi
161161
done
162-
exec "$here/buzz-desktop.bin" "$@"
162+
exec -a "buzz-desktop" "$here/buzz-desktop.bin" "$@"
163163
SHIM
164164
chmod +x "$APP_BIN"
165165

‎desktop/src-tauri/src/managed_agents/runtime.rs‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,14 @@ pub(crate) fn collect_same_instance_orphans(
758758

759759
/// Binary names for the Buzz desktop/Tauri process. Used by dead-instance
760760
/// detection to confirm the owning desktop is still alive.
761-
const DESKTOP_BINARY_NAMES: &[&str] = &["Buzz", "buzz-desktop", "buzz_desktop"];
761+
const DESKTOP_BINARY_NAMES: &[&str] = &[
762+
"Buzz",
763+
"buzz-desktop",
764+
"buzz_desktop",
765+
// Linux limits /proc/<pid>/comm to 15 visible bytes, truncating the
766+
// AppImage shim's real executable name, `buzz-desktop.bin`.
767+
"buzz-desktop.bi",
768+
];
762769

763770
/// Check if a process name matches a known Buzz desktop binary.
764771
fn is_desktop_binary(name: &str) -> bool {

‎desktop/src-tauri/src/managed_agents/runtime/tests.rs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
use crate::managed_agents::known_acp_runtime;
22

3+
// ── desktop binary name tests ───────────────────────────────────────────
4+
5+
#[test]
6+
fn appimage_binary_matches_truncated_linux_comm_name() {
7+
assert!(super::is_desktop_binary("buzz-desktop.bi"));
8+
}
9+
310
// ── buffer_contains_identifier tests ────────────────────────────────────
411

512
#[test]

0 commit comments

Comments
 (0)