Repository navigation
feat(desktop): add Linux port of the Omi desktop app (desktop/linux) - #9963
palontologist wants to merge 1 commit into
Conversation
Adds a Linux/Electron build of the Omi desktop app, ported from desktop/windows. Highlights: - Same Electron + React + Vite architecture, packaged as an AppImage for Linux. - Sign-language avatar: text-to-sign pose pipeline (sign-mt) rendered with a WebGL skeletal avatar, served locally via the renderer-server (/__poses). - Monologur: always-listening background agent that taps the shared memory store and speaks proactive insights via TTS. - Enrolled voiceprint (Deepgram diarization) so Omi labels your speech as 'You' and others as 'Other N'. - Linux OCR helper, Omi BLE device support, and a SwiftShader WebGL fallback for Wayland. Build: npm install && npm run build:linux (produces an AppImage).
Git-on-my-level
left a comment
There was a problem hiding this comment.
Thanks for putting this together — a Linux desktop port would be a valuable direction for Omi. I’m going to request changes on this head because this PR introduces a new desktop app with broad security/privacy-sensitive surfaces, and I found a few blockers that should be resolved before maintainer product/architecture review.
Blocking concerns:
-
The Electron windows disable web security and globally grant/check permissions.
desktop/linux/src/main/index.tssetswebSecurity: false, auto-grants media/display-capture, andsetPermissionCheckHandler(() => true). Combined with the screen/audio capture handlers, any renderer compromise or unexpected navigation would have a much easier path to microphone/screen access without normal origin-bound permission checks. Please keep web security enabled where possible and scope permission grants/checks to the app’s trusted origin and the specific permission/resource being requested. -
The Deepgram Voice Agent exposes high-risk tools without sufficient boundaries. In
desktop/linux/src/main/ipc/deepgramAgent.ts, model-driven function calls can write arbitrary absolute file paths (write_file) and callshell.openExternalon arbitrary URLs/local paths (open_url). Those need user consent and strict allow-lists/path sandboxing/scheme checks before this can be safe in a desktop app. -
The submitted “Linux” app still appears to carry Windows identity and behavior throughout the package:
package.jsonusesomi-windows,electron-builder.ymlusescom.omiwindows.app/ “Omi for Windows”, helper build scripts target Windows executables, and docs mention AppImage outputs namedomi-windows-1.0.0.AppImage. Please align the product/package/build metadata with the actual Linux port and clarify which Windows-only automation/OCR features are intentionally included, disabled, or out of scope on Linux.
Agent-behavior / docs note: this PR adds desktop/linux/AGENTS.md plus README/changelog/setup docs that coding/review agents may treat as project guidance for this subtree. Because that can change how AI coding agents behave in future work, maintainers should verify that these docs are accurate, non-aspirational, and safe before merging. In particular, the docs currently read more like a snapshot of debugging notes and a standalone fork than maintainer-approved guidance for the Omi repo.
Given the size and scope, I’m not asking for this to be split solely because it is large, but this should get explicit human maintainer review after the security/permission/tooling boundaries and Linux-vs-Windows product scope are tightened.
Reviewed by Omi maintainer automation.
by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.
|
Superseded by the consolidated Linux PR: #10096 Closing the forked |
|
Hey @palontologist 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
…10110) ## Summary Adds a scoped `// eslint-disable-next-line @typescript-eslint/no-require-imports` above the two lazy `require('koffi')` calls (nativeForeground.ts:45, userAssistRegistry.ts:46) so the **Desktop Windows CI / Typecheck · Lint · Test** check goes green on #10096. The lazy require is the right idea (keeps `nativeForeground` importable off-Windows); it just trips the `no-require-imports` rule. This is the exact fix the maintainer requested in the #10096 review. ## Test plan - `cd desktop/windows && npx eslint src/main/usage/nativeForeground.ts src/main/usage/userAssistRegistry.ts` → no `no-require-imports` errors. - Part of the consolidated Linux PR #10096 (supersedes #9503/#9963/#8415). ## Notes Pushed from the `consolidation/linux-electron` HEAD. Intended to be merged into that branch (or squashed into its feat commit) so #10096 can land. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10110?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
Consolidate Linux desktop work as platform seams on desktop/windows (not a forked desktop/linux tree). From #9503 (primary): - X11 active-window via xprop + /proc - Tesseract OCR helper speaking win-ocr-helper protocol - XWayland default + PipeWire capturer - Wayland continuous Rewind default off - AppImage+deb targets (no snap) From #8415: - PulseaudioLoopbackForScreenShare for system-audio loopback - deb runtime depends (tesseract, libnotify, libxss) From #9963: - architecture validation only (forked tree rejected as drift) Also: lazy-require koffi so Linux import of nativeForeground never loads the Win32 native module (fixes linux unit tests off-Windows). Verification: vitest 21/21 on linuxForeground, nativeForeground linux/degrade, rewindSettings wayland. Failure-Class: none Co-authored-by: velinxs <[email protected]> Co-authored-by: ZachL111 <[email protected]> Co-authored-by: palontologist <[email protected]>
#8415) (#10096) ## Summary Consolidates the three open Linux desktop PRs into one landable path: | PR | Approach | Verdict | |---|---|---| | #9503 | Platform seams on `desktop/windows` (+473) | **Primary** — keep | | #8415 | Forked `desktop/Linux` tree (+24k) | Port **Pulse loopback + deb depends** only | | #9963 | Forked `desktop/linux` tree (+58k, ~75% Windows copy) | Reject fork; product extras (sign avatar / monologur) stay follow-ups | Architecture: **one Electron tree** (`desktop/windows`) with `process.platform` branches. No `desktop/linux` / `desktop/Linux` fork — those drift from Windows immediately and double maintenance. ### What lands **From #9503** - X11 active-window (`linuxForeground.ts` via `xprop` + `/proc`) - Tesseract OCR helper speaking `win-ocr-helper` stdio protocol (`resources/linux-ocr-helper/omi-ocr-helper`) - XWayland default (`OMI_OZONE=wayland` override) + PipeWire capturer - Wayland: continuous Rewind capture defaults **off** - Linux targets: AppImage + deb (snap dropped — confinement blocks xprop/tesseract) **From #8415** - `PulseaudioLoopbackForScreenShare` for system-audio loopback - `.deb` depends: `tesseract-ocr`, `tesseract-ocr-eng`, `libnotify4`, `libxss1` **Fix on top of #9503** - Lazy-`require('koffi')` so Linux import of `nativeForeground` never loads Win32 native module (unit tests were broken off-Windows) ## Tests ``` cd desktop/windows npx vitest run \ src/main/usage/linuxForeground.test.ts \ src/main/usage/nativeForeground.linux.test.ts \ src/main/usage/nativeForeground.degrade.test.ts \ src/main/rewind/rewindSettings.wayland.test.ts # → 22/21+ focused Linux tests (includes foregroundMonitor.linux) ``` ## Product invariants None. Path globs under `desktop/windows` for Linux seams only. ## Credits Consolidated from community PRs (code selected into `desktop/windows` seams; forked trees not re-merged): | PR | Author | Role | |---|---|---| | #9503 | @velinxs | Primary Linux platform seams (X11, OCR helper, XWayland, Wayland Rewind default) | | #8415 | @ZachL111 | Pulse loopback flag + deb depends (from Linux packaging work) | | #9963 | @palontologist | Architecture reference; full `desktop/linux` fork not adopted | Git trailers on the feat commit: `Co-authored-by` for all three. Failure-Class: none Closes #9503 Closes #9963 Closes #8415 <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/10096?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. -->
Summary
Adds a Linux/Electron build of the Omi desktop app, ported from
desktop/windows, living atdesktop/linux/. Packaged as an AppImage.This brings Omi's desktop experience to Linux while keeping the same Electron + React + Vite architecture used by the Windows app.
Highlights
pose-viewer) skeletal avatar, served from a writable temp dir over the local renderer-server (/__poses/...) with a SwiftShader WebGL fallback for Wayland.nova-2diarization; the first voice heard is enrolled as "You" and other speakers are labeled "Other N", so the app knows who is talking.Build
Notes
package-lock.json); the Windows app uses pnpm. Both lockfiles are included indesktop/linuxfor clarity.fileIndexskip-dirs, Rewind primary-display selection); this PR adds the Linux tree so the port is visible upstream.desktop/windows.🤖 Generated with opencode