I managed to run the Codex App on Linux without having access to the source code.
High-level steps:
- Extracted the DMG and unpacked `app.asar`
- Installed the matching Electron version for Linux
- Rebuilt native modules (`node-pty`, `better-sqlite3`)
- Removed macOS-only stuff (like Sparkle)
- Repacked everything and dropped it into Electron
- Added a small workaround because the app thinks it’s in dev mode and tries to hit a Vite server
- Launched it with `--no-sandbox`
Important detail: the app itself is basically just a GUI wrapper. You still need the Codex CLI installed on Linux for it to work.
https://github.com/ilysenko/codex-desktop-linux
I did this on Ubuntu 25.10. I have no idea how well this works on other Linux distros or versions.
If you want to improve it, feel free to make fixes and open pull requests.
The Codex App
Introducing the Codex app
you can just tell codex to port the codex app to linux
Videos
took 15 min yesterday and it's been working flawlessly on my arch/niri system
tldr from codex explaining what it did:
Extracted the macOS Codex.dmg, then extracted app.asar into app_asar/ (Electron app payload) via linux/scripts/extract-dmg.sh (uses 7z + asar).
Fixed the Linux launcher to point at the right extracted directory (linux/run-codex.sh uses APP_DIR="$ROOT_DIR/app_asar"), and set ELECTRON_FORCE_IS_PACKAGED=1 + NODE_ENV=production so it behaves like a packaged app.
Rebuilt the two native Node modules that ship as macOS Mach-O binaries (better-sqlite3 + node-pty) into Linux .node ELF binaries and copied them into app_asar/node_modules/... via linux/scripts/build-native.sh.
Hit an Electron ABI mismatch (built against the wrong Electron/Node ABI), fixed by rebuilding with an Electron version that matches the runtime (on Arch I used system electron39): ELECTRON_VERSION=$(electron --version | tr -d v) linux/scripts/build-native.sh
Launched the app pointing it at the Linux Codex CLI binary: CODEX_CLI_PATH=/usr/bin/codex linux/run-codex.sh
Optional polish: added a .desktop launcher (linux/codex.desktop), and patched the main process bundle to auto-hide the menu bar on Linux (app_asar/.vite/build/main.js:552).