Skip to content

fix(app): make linux CEF deb package runnable#3

Open
VectorJet wants to merge 3 commits intoswitch-to-pnpmfrom
fix/linux-cef-deb-runtime
Open

fix(app): make linux CEF deb package runnable#3
VectorJet wants to merge 3 commits intoswitch-to-pnpmfrom
fix/linux-cef-deb-runtime

Conversation

@VectorJet
Copy link
Copy Markdown
Owner

@VectorJet VectorJet commented Apr 24, 2026

Summary

  • update Debian package dependencies for trixie so the generated .deb installs without hand-editing DEBIAN/control
  • teach the packaged app to find openhuman-core from Linux install locations like /usr/bin/openhuman-core
  • skip tray setup on linux + cef builds to avoid the packaged GTK panic during tray/menu creation
  • add grep-friendly core binary resolution logs to make packaged startup failures easier to diagnose

Problem

  • the Linux CEF .deb was not runnable after install on Debian 13 / trixie
  • the package depended on obsolete Debian package names (libwebkit2gtk-4.0-37, libgdk-pixbuf2.0-0)
  • the GUI runtime looked for openhuman-core next to the app binary/resources, but the .deb installs it in /usr/bin
  • packaged startup also panicked when tray setup hit GTK too early on Linux CEF

Solution

  • update tauri.conf.json Linux deb dependencies to trixie package names
  • extend default_core_bin() to probe packaged Linux locations before falling back to sibling/resource lookup
  • split setup_tray() by cfg and short-circuit tray creation on linux + cef with an explicit warning log
  • keep the existing RunEvent::Ready tray deferral for other targets/runtime combinations

Submission Checklist

  • Unit tests — Vitest (app/) and/or cargo test (core) for logic you add or change
  • E2E / integration — Where behavior is user-visible or crosses UI → Tauri → sidecar → JSON-RPC; use existing harnesses (app/test/e2e, mock backend, tests/json_rpc_e2e.rs as appropriate)
  • N/A — Not practical here: this change fixes Linux packaging/runtime integration and was validated with cargo check --manifest-path src-tauri/Cargo.toml --target aarch64-unknown-linux-gnu plus a local packaged install repro
  • Doc comments — Existing comments were kept and expanded only where the runtime behavior was non-obvious
  • Inline comments — Existing tray/core resolution comments remain in place; added logging for the non-obvious packaged lookup path

Impact

  • impacts packaged Linux desktop builds using the CEF runtime
  • improves Debian 13 / trixie compatibility for generated .deb artifacts
  • avoids a Linux startup panic by disabling tray creation for the currently broken linux + cef path; tray behavior on other targets is unchanged
  • no core JSON-RPC contract or frontend API changes

Related

  • Closes:
  • Follow-up PR(s)/TODOs:
    • investigate restoring Linux CEF tray support once GTK/tray initialization is safe in packaged runs
    • optionally teach the installer/package to preserve chrome-sandbox permissions automatically

Add comprehensive unit tests for PR #3 changes:

- default_core_bin() tests:
  * Env override takes precedence when file exists
  * Graceful handling when env override points to nonexistent file
  * Symlink resolution for same_executable_path
  * Nonexistent file handling
  * Core process handle creation and RPC URL formatting

- setup_tray() tests:
  * Conditional compilation validation
  * Dictation shortcut expansion (CmdOrCtrl handling)
  * Platform-specific behavior (macOS vs non-macOS)

- Additional helper tests:
  * is_daemon_mode detection
  * core_rpc_url() with env var and fallback
  * overlay_parent_rpc_url() edge cases (empty, whitespace)

These tests verify the grep-friendly logging patterns and
packaged Linux binary path probing introduced in the PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant