Linux Support#264
Conversation
npm 11 detects missing entries (encoding@0.1.13) that older npm didn't catch, blocking npm ci. Regenerated with npm install. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Fix prepare-python.js to skip macOS-only pyobjc packages on Linux - Add install-linux-desktop.sh script for XDG desktop entry setup - Update readme.md with Linux installation instructions and platform badge
There was a problem hiding this comment.
Review mode: initial
Findings
-
[Major] Manual desktop entry in readme uses literal
$USERinstead of expanded value (readme.md:130-139)- The heredoc uses single-quoted
<< 'EOF', so$USERis not expanded. The resulting.desktopfile will contain/home/$USER/.local/bin/open-coworkliterally, which will not work. - Suggested fix: Use double-quoted heredoc or expand the variable outside, e.g.:
cat > ~/.local/share/applications/open-cowork.desktop << EOF [Desktop Entry] ... Exec=$HOME/.local/bin/open-cowork %U ... EOF
- The heredoc uses single-quoted
-
[Major] AppImage glob pattern in
install-linux-desktop.shlikely does not match standard electron-builder output (scripts/install-linux-desktop.sh:25)- The pattern
Open Cowork-*-linux-*.AppImageexpects "linux" in the filename, but electron-builder typically producesOpen Cowork-<version>.AppImage(e.g.,Open Cowork-3.3.1.AppImage). The script will fail to locate the AppImage in most cases. - Suggested fix: Change the pattern to
Open Cowork-*.AppImage(more permissive) or use a more specific pattern based on actual build output.
- The pattern
-
[Minor] Icon extraction fallback may fail to find the icon (
scripts/install-linux-desktop.sh:78-83)- The fallback attempts to extract a specific icon name (
open-cowork.png) from the AppImage, but the actual icon inside may have a different name or path. If extraction fails silently and the sourceresources/icon.pngis missing, the desktop entry will have no icon. - Suggested fix: After extracting, use
findto locate any.pngfile and copy it, or bundle the icon in the repo and ensure it is present before release.
- The fallback attempts to extract a specific icon name (
-
[Nit] Large package-lock.json changes with many
peer: trueflags added/removed (package-lock.json)- These changes appear to be generated by npm and may be unintentional. They introduce noise and could affect dependency resolution. Ensure they are necessary and consistent with the project's lockfile policy.
Summary
Review mode: initial
The PR introduces Linux AppImage support with helpful build fixes and a desktop integration script. The core logic in prepare-python.js is correct. However, two blocking issues in the user-facing documentation and installer script will prevent a smooth experience: the manual .desktop entry in readme.md has unexpanded $USER, and the AppImage file find pattern does not match the actual build output. These should be fixed before merging.
Testing
Not run (automation). No tests added for the new install script or the modified build script; consider adding smoke tests for prepare-python.js filter logic.
Open Cowork Bot
Summary
Adds Linux AppImage build support and desktop launcher integration, making Open Cowork a fully usable desktop application on Linux.
Three changes:
Fix
scripts/prepare-python.js— Theprepare:python:allbuild step unconditionally installspyobjc-framework-Quartz, a macOS-only package that has no Linux wheel. This brokenpm run buildon Linux. The fix filters outpyobjcpackages when building for non-darwin platforms.New
scripts/install-linux-desktop.sh— Automates the XDG desktop entry setup: copies the AppImage to~/.local/bin/, installs the icon, creates a.desktopfile in~/.local/share/applications/, and refreshes the desktop database. After running, the app appears in the Linux application launcher (Super key).Update
readme.md— Adds Linux to the platform badge and intro, documents the.AppImagedownload option in the installation table, adds a Linux Desktop Integration section with both the automated script and manual steps, and updates the FAQ to reflect Linux support.Fixes
electron-builderproducing a valid Linux AppImage that was previously blocked during build.Type of change
fix)feat)docs)Checklist
feat:,fix:, etc.)npm run testpasses locally (N/A — no runtime logic changed)npm run lintpasses locally (prettier ran automatically via lint-staged on commit)Testing
OPEN_COWORK_PYTHON_STANDALONE_URL_LINUX_X64set to a python-build-standalone release URL → build completed successfully.scripts/install-linux-desktop.sh→ AppImage copied, icon installed,.desktopfile created,update-desktop-databaseexecuted without errors.~/.local/bin/open-cowork→ App started, detected running instance, exited cleanly.pyobjcstill installed on darwin only.Screenshots / recordings (if applicable)
N/A — no UI changes.