Skip to content

fix(linux): resolve default model and Electron sandbox crash on Ubuntu#50

Merged
antmikinka merged 1 commit intomainfrom
fix/linux-ubuntu-compatibility
Apr 2, 2026
Merged

fix(linux): resolve default model and Electron sandbox crash on Ubuntu#50
antmikinka merged 1 commit intomainfrom
fix/linux-ubuntu-compatibility

Conversation

@antmikinka
Copy link
Copy Markdown
Contributor

Summary

  • Wrong default model: On Ubuntu, Lemonade Server marks gpt-oss-mxfp4 as suggested: true, causing it to be auto-selected. Fixed by adding PREFERRED_MODEL_IDS priority in Preparing.tsx so Qwen3-Coder-30B-A3B-Instruct-GGUF is always selected first. Also updated the persisted defaults in SettingsRepository and StorageManager and bumped maxTokens from 2000 → 8192 to match Qwen3's capabilities.
  • Electron sandbox SIGTRAP crash: On Linux, chrome-sandbox requires SUID root permissions that aren't present in typical dev environments. Fixed by disabling the sandbox via app.commandLine.appendSwitch('no-sandbox') in main.ts, gated to process.platform === 'linux' only. Windows/macOS are unaffected.
  • Added npm run dev:linux script for Ubuntu development workflow.

Files Changed

File Change
src/database/repositories/SettingsRepository.ts Default model → Qwen3-Coder, maxTokens → 8192
src/database/storage/StorageManager.ts Same
src/services/LemonadeClient.ts Qwen3-Coder prepended to fallback model list
src/ui/pages/Preparing.tsx PREFERRED_MODEL_IDS overrides server suggested flag
src/electron_app/main.ts Linux sandbox disabled at process level
package.json Added dev:linux scripts, structured build.linux target

Test Plan

  • On Ubuntu: npm run dev:linux starts without SIGTRAP/sandbox crash
  • On Ubuntu: Preparing page auto-selects Qwen3-Coder-30B-A3B-Instruct-GGUF instead of gpt-oss-mxfp4
  • On Windows: npm run dev still works normally (sandbox unchanged)
  • Fresh install (no existing settings.json): default model is Qwen3-Coder
  • AppImage build succeeds: npm run build && npm run build:electron

Notes

  • Existing Linux users with a persisted settings.json will not get the new default automatically (defaults only apply on first run), but the Preparing.tsx auto-selection fix will still pick Qwen3-Coder from the live Lemonade catalog regardless.
  • The sandbox is disabled on Linux only. contextIsolation: true and nodeIntegration: false remain in place as the primary security boundary.

Closes #48

🤖 Generated with Claude Code

- Set default model to Qwen3-Coder-30B-A3B-Instruct-GGUF in
  SettingsRepository and StorageManager (was Llama-3.2-1B-Instruct-Hybrid)
- Bump default maxTokens from 2000 to 8192 to match Qwen3 capabilities
- Add PREFERRED_MODEL_IDS priority in Preparing.tsx so Qwen3-Coder is
  auto-selected even when Lemonade Server marks gpt-oss-mxfp4 as suggested
- Prepend Qwen3-Coder entry to LemonadeClient fallback model list
- Fix Electron SIGTRAP crash on Linux by disabling SUID sandbox via
  app.commandLine.appendSwitch in main.ts (platform-gated to linux only)
- Add dev:linux and dev:electron:linux npm scripts for Ubuntu dev workflow
- Structured build.linux target with arch x64 and category Utility

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@antmikinka antmikinka force-pushed the fix/linux-ubuntu-compatibility branch from 6d8c972 to 14141cc Compare April 2, 2026 22:27
@antmikinka antmikinka merged commit 3c7f676 into main Apr 2, 2026
1 of 2 checks passed
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.

linux compile issue electron

1 participant