openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Linux Installation (Arch, Debian, Tumbleweed)

Open lianbeast opened this issue 4 months ago • 1 comments

No luck installing/running "openhuman" on any of my linux distros.

On Arch: following errors/issue. this is the only package available on AUR

❯ yay openhuman

1 aur/openhuman-core-bin 0.61.8-1 (+0 0.00) [4h14m] (Installed)
    Core binary for OpenHuman
==> Packages to install (eg: 1 2 3, 1-3 or ^4)

❯ openhuman-core

openhuman-core: error while loading shared libraries: libxdo.so.3: cannot open shared object file: No such file or directory

Same/similar error when trying to run AppImage version.

❯ ./OpenHuman_0.61.2_amd64.AppImage

ERROR: ld.so: object 'anylinux.so' from --preload cannot be preloaded (cannot open shared object file): ignored.
/tmp/.mount_OpenHudnbejk/bin/OpenHuman: error while loading shared libraries: libxdo.so.3: cannot open shared object file: No such file or directory

Implementation Plan

Triage Assessment

This issue reports two related but distinct libxdo.so.3 failures on Arch Linux (and potentially Debian/Tumbleweed per the title). Both are real, reproducible, and affect live users (see also #5147, comments on #4020). Neither is subsumed by a single canonical issue: #5147 tracks only the AppImage dimension, while the AUR openhuman-core-bin package issue has no existing tracker. The problem is upstream (enigo dependency is non-optional in the core binary) and in packaging (AppImage sharun runtime resolution).

User impact: high -- a fresh Arch Linux install cannot run OpenHuman through either distribution channel. Workaround exists (extract AppImage + run direct, sudo pacman -S libxdo for the AUR package) but is undiscoverable.

Proposed Scope

In-scope:

  1. Fix the AppImage libxdo.so.3 load failure on rolling-release distros where the bundled library exists in shared/lib but sharun fails to resolve it.
  2. Make enigo (and its libxdo.so.3 linkage) a compile-time-optional dependency so that --no-default-features headless builds and community AUR packages can ship a binary that does not require libxdo at all.
  3. Document the enigo / libxdo.so.3 runtime dependency for downstream packagers (AUR, Nix, Homebrew Linux).

Out-of-scope: The separate sharun segfault / libssl.so.3 version problem tracked by #3716; the libcef.so not found variant tracked by #5147.

Implementation Steps

  1. Make enigo compile-time optional

    • File: Cargo.toml line 256 -- change enigo = "0.3" to enigo = { version = "0.3", optional = true }.
    • File: Cargo.toml features section -- add a lightweight feature flag (e.g., input-simulation = ["dep:enigo"] or fold into the existing desktop-automation feature). The existing comment at line 585-586 flags enigo as shared with voice; verify whether voice::text_input::insert_text (which uses enigo for clipboard-paste at src/openhuman/voice/text_input.rs:91) should fall back to a non-enigo paste method when the feature is off, or whether input-simulation is a subset of voice as an implicit dependency. See voice gate facade pattern in src/openhuman/voice/stub.rs for precedent.
    • File: src/openhuman/voice/text_input.rs -- gate the use enigo::... block and the insert_text_enigo path with #[cfg(feature = "input-simulation")]; provide a no-op or Err("text insertion requires input-simulation feature") fallback.
    • File: src/openhuman/tools/impl/computer/mouse.rs and keyboard.rs -- already gated by #[cfg(feature = "desktop-automation")] at the registration site (src/openhuman/tools/ops.rs lines 249-261), so enigo usage inside those files is already dormant when desktop-automation is off. Verify no use enigo::... statement survives at the module level when the feature is off (it may need a #[cfg] on the use statements too if Rust 2024 edition strictness applies).
    • File: src/openhuman/accessibility/vision_click.rs -- enigo usage here is inside a #[cfg(feature = "desktop-automation")] block (the function body gated by the module itself). Verify.
    • File: src/openhuman/accessibility/app_fastpaths/app_shortcuts.rs -- line 158 references enigo's Alt key in a comment only; no action needed.
  2. Verify and harden the AppImage sharun library resolution

    • The patch_apprun_sharun_cwd function in scripts/release/strip-appimage-graphics-libs.sh injects cd "$APPDIR" before exec "$@" in AppRun to fix sharun CWD-based preload resolution. This fix (from #2829) may not apply to all AppRun formats (the function warns "could not locate 'exec \"$@\"' in AppRun" at line 592). Investigate whether current releases' AppRuns actually trigger this path, and if not, extend the sed pattern to cover the actual AppRun content generated by the current bundler version.
    • Verify that validate_appimage_required_libs (from #4805) runs on the final packed squashfs-root and confirms libxdo.so* is present. A false pass would mean a library present during validation is missing after repack -- add a post-repack revalidation step.
  3. CI coverage for rolling-release Linux distros

    • Extend the existing e2e Linux test matrix (.github/workflows/e2e-reusable.yml etc.) to include at least one rolling distro container (Arch or Fedora Rawhide). The existing build happens on ubuntu-22.04 / ubuntu-24.04, and the AppImage is tested only on those same bases, which have stable glibc and wide soname compatibility. A rolling distro would catch libxdo.so.3 / sharun regressions before release.
    • The test should extract the AppImage via --appimage-extract, verify libxdo.so* exists in shared/lib, and verify the binary runs with --help without a error while loading shared libraries error.
  4. Document runtime dependency for packagers

    • File: INSTALL.md (or a new docs/linux-dependencies.md) -- document that the binary hard-links libxdo.so.3 (via the enigo crate for keyboard/mouse simulation). Downstream packagers (AUR, Nix, Homebrew Linux) should list libxdo as a runtime dependency. Once step 1 ships, document the new input-simulation feature flag for headless builds.

Verification

  • Unit: src/openhuman/voice/text_input_tests.rs -- add a test that enigo-dependent code compiles with and without the new feature flag.
  • Integration: Extend scripts/release/test-strip-appimage-rpaths.sh to verify libxdo.so* is present AND the patched AppRun's cd "$APPDIR" is actually applied in the test fixture.
  • Packaging smoke: After step 1, run GGML_NATIVE=OFF cargo check --manifest-path Cargo.toml --no-default-features --features tokenjuice-treesitter to confirm the core compiles without enigo linked.
  • Release gate: After step 2, manually reproduce the Arch failure (extract release AppImage in an Arch container, run the binary) and confirm it starts without libxdo.so.3 error.

Risks and Open Questions

  • enigo + voice coupling risk: voice/text_input.rs:insert_text uses enigo to simulate Ctrl+V for paste. If the new input-simulation feature is off but voice is on, this function must gracefully degrade (clipboard-only without paste, or an error). The voice facade stub pattern (src/openhuman/voice/stub.rs) is the precedent: use a stub function that returns Err("...") rather than panicking or silently doing nothing. Confirm that this degradation is acceptable product behavior.
  • sharun AppRun format variance: The bundler version in use (sharun_cef) may generate AppRuns differently from what patch_apprun_sharun_cwd expects. Inspect a real release AppRun from the latest CI artifact to confirm the sed pattern matches. If it does not, the fix from #2829 has never actually been applied to shipping artifacts.
  • Arch AUR package version skew: The AUR openhuman-core-bin package ships version 0.61.8-1 (as of the report date), which predates the AppRun CWD fix. The AUR maintainer would need to update. This is documented as an open question, not a blocker for the repo fix.

Acceptance Criteria

  • A build of openhuman-core with --no-default-features --features tokenjuice-treesitter (without any input-simulation feature) produces a binary that does not NEED libxdo.so.3 (verified via readelf -d / ldd).
  • A fresh Arch Linux container can run the latest -amd64.AppImage release artifact via --appimage-extract + direct binary invocation without encountering the libxdo.so.3 error from ld.so.
  • INSTALL.md or equivalent documentation lists libxdo as a runtime dependency for the default (full-feature) build, and documents the input-simulation feature flips for slim builds.
  • Rolling-release distro smoke test is added to the CI release gate and passes on the next tagged release.

lianbeast avatar Jul 18 '26 09:07 lianbeast

not sure if anyone else ran into this type of issue or has a better fix.

I asked AI to patch it. (not sure what it do) This is what it do.

OpenHuman 0.61.2 (OpenHuman_0.61.2_amd64.AppImage)

The bundled AppImage's sharun runtime is broken on CachyOS / hardened kernels (kernel 7.1.3-2-cachyos). It exposes an unexpanded ${SHARUN_EXTRA_LIBRARY_PATH} literal that prevents libcef.so from being found, and the anylinux.so preload hook triggers a SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=NULL} during gnutls/p11-kit init when reading /proc/filesystems.

Working launch method

cd /home/cachy/Applications/AppImagez

# One-time extract (already done)
./OpenHuman_0.61.2_amd64.AppImage --appimage-extract

# Run the real binary (147M) with bundled libs on LD_LIBRARY_PATH
LD_LIBRARY_PATH=./squashfs-root/shared/lib:./squashfs-root/lib \
WAYLAND_DISPLAY=$WAYLAND_DISPLAY DISPLAY=$DISPLAY \
./squashfs-root/shared/bin/OpenHuman
  • Real binary: squashfs-root/shared/bin/OpenHuman (147M, CEF app)
  • Stub binary: squashfs-root/bin/OpenHuman (228K, sharun loader — broken)
  • Window: appears as OpenHuman in Hyprland (hyprctl clients)
  • Logs: CEF subprocesses warn about libGLESv2.so: cannot open shared object file — non-fatal, app forces ANGLE/SwiftShader software GL.

lianbeast avatar Jul 18 '26 09:07 lianbeast