Run the OpenAI Codex desktop app on Linux using the official macOS installer.
No official Linux build exists — this project extracts the macOS Electron app, rebuilds native modules for Linux, and launches it. No binaries are shipped; you supply your own Codex installer.
- Linux (x86_64)
- Bun (for installing the Codex CLI)
- 7z (
p7zip-fullon Debian/Ubuntu,p7zipon Arch) - Electron 40 (installed automatically by setup)
- OpenAI Codex CLI:
bun install -g @openai/codex
# 1. Clone the repo
git clone https://github.com/satvikxs/Linux-codex.git
cd Linux-codex
# 2. Download the latest Codex macOS DMG from https://openai.com/codex
# and place it in the repo root as Codex.dmg
# 3. Run setup (extracts DMG, installs Electron, rebuilds native modules)
chmod +x setup.sh
./setup.sh
# 4. Launch Codex
chmod +x run.sh
./run.shsetup.shextracts the macOS DMG using 7z, installs Electron 40 locally, and rebuilds native modules (better-sqlite3,node-pty) for Linuxrun.shsets the required environment variables and launches the Electron app with a Linux-compatible shim- The shimmed
main.js(already inside the extracted app) patches paths so the macOS-targeted renderer runs on Linux
Lin-codex/
├── setup.sh # One-time setup: extract DMG + rebuild natives
├── run.sh # Launch the Codex app
├── Codex.dmg # You supply this (not included)
├── LICENSE
├── README.md
└── work/ # Generated by setup.sh (gitignored)
├── extracted/ # Raw DMG contents
├── app/ # Electron app with Linux shim
└── native/ # Electron + rebuilt native modules
This repo ships zero binaries. You need to:
- Download the Codex macOS DMG yourself from openai.com/codex
- Install the Codex CLI separately (
bun install -g @openai/codex)
Do not redistribute the Codex DMG or OpenAI binaries.
Issues and PRs are welcome and appreciated! If you run into problems or have improvements, please open an issue or submit a pull request.
This is a community project — I'll actively review and fix issues.
Looking for Windows support? Check out Win-Codex by @JDhruv14.
This is not an official OpenAI project. It is an unofficial community effort to run the Codex desktop app on Linux.