Run OpenAI Codex Desktop on Linux.
The official Codex Desktop app is macOS-only. This project provides an automated installer that converts the macOS .dmg into a working Linux application.
The installer:
- Extracts the macOS
.dmg(using7z) - Extracts
app.asar(the Electron app bundle) - Rebuilds native Node.js modules (
node-pty,better-sqlite3) for Linux - Removes macOS-only modules (
sparkleauto-updater) - Downloads Linux Electron (same version as the app — v40)
- Repacks everything and creates a launch script
Node.js 20+, npm, Rust/Cargo, 7z, curl, and build tools (gcc/g++/make).
sudo apt install nodejs npm cargo rustc p7zip-full curl build-essentialsudo dnf install nodejs npm cargo rust p7zip curl
sudo dnf groupinstall 'Development Tools'sudo pacman -S nodejs npm cargo rust p7zip curl base-develYou also need the Codex CLI:
npm i -g @openai/codexgit clone https://github.com/ilysenko/codex-desktop-linux.git
cd codex-desktop-linux
chmod +x install.sh
./install.shDownload Codex.dmg from openai.com/codex, then:
./install.sh /path/to/Codex.dmgThe app is installed into codex-app/ next to the install script:
codex-desktop-linux/codex-app/start.shOr add an alias to your shell:
echo 'alias codex-desktop="~/codex-desktop-linux/codex-app/start.sh"' >> ~/.bashrcCODEX_INSTALL_DIR=/opt/codex ./install.shThe macOS Codex app is an Electron application. The core code (app.asar) is platform-independent JavaScript, but it bundles:
- Native modules compiled for macOS (
node-ptyfor terminal emulation,better-sqlite3for local storage,sparklefor auto-updates) - Electron binary for macOS
The installer replaces the macOS Electron with a Linux build and recompiles the native modules using @electron/rebuild. The sparkle module (macOS-only auto-updater) is removed since it has no Linux equivalent.
The Riff fork replaces the upstream Python http.server workaround with a small Rust launcher that:
- serves extracted webview assets from an embedded local HTTP server
- binds
127.0.0.1:5175for compatibility with the current extracted app - resolves the Codex CLI path before launch
- supervises Electron process startup from a single runtime entrypoint
| Problem | Solution |
|---|---|
Error: write EPIPE |
Update to the launcher that logs Electron output to codex-desktop-linux.log instead of inheriting a broken stdio pipe |
| Blank window | Check that the Rust launcher started cleanly and that content/webview/ was extracted |
CODEX_CLI_PATH error |
Install CLI: npm i -g @openai/codex |
| GPU/rendering issues | Try: ./codex-app/start.sh --disable-gpu |
| Sandbox errors | Check whether your Linux environment supports Electron sandboxing cleanly |
This is an unofficial community project. Codex Desktop is a product of OpenAI. This tool does not redistribute any OpenAI software — it automates the conversion process that users perform on their own copies.
MIT