🌐
Reddit
reddit.com › r/codex › i got the macos codex desktop app (.dmg) running on ubuntu linux — here’s the full technical breakdown
r/codex on Reddit: I got the macOS Codex desktop app (.dmg) running on Ubuntu Linux — here’s the full technical breakdown
February 6, 2026 -

I got the macOS Codex desktop app (.dmg) running on Ubuntu Linux — here’s the full technical breakdown

I recently experimented with running the macOS-only Codex desktop app on Ubuntu.
Since .dmg isn’t a native Linux package, there’s no direct install path — so I approached this as a cross-platform packaging, runtime, and deep debugging problem.

The core idea

Instead of trying to “install” the DMG, I built a bridge layer:

  • Extract the macOS Electron payload

  • Rebuild Linux-compatible native modules

  • Launch the UI on Linux

  • Correctly wire it to the modern Codex CLI backend

So the final architecture became:

  • UI runtime: Electron app from extracted asar-unpacked

  • Backend agent: codex app-server (CLI)

  • Bridge launcher: Linux script that sets env + connects UI → CLI

  • Config state: ~/.codex/config.toml controlling default model + migrations

Step 1 — Preparing a runnable Linux payload

From the DMG:

  • Extracted the application bundle

  • Unpacked app.asarasar-unpacked

  • Rebuilt required native Node modules for Linux ABI, notably:

    • better-sqlite3

    • node-pty

Without this rebuild, Electron crashed immediately on Ubuntu.

Step 2 — Creating a real Linux launcher

I created:

  • ~/.local/bin/codex-dmg-linux → launcher script

  • Desktop entry under ~/.local/share/applications/

The launcher:

  • Reads payload location via CODEX_DMG_WORKDIR

  • Optionally overrides CLI via CODEX_CLI_PATH

  • Sets required env:

    • BUILD_FLAVOR=prod

    • NODE_ENV=production

    • renderer URL → local webview

  • Starts Electron with Linux-safe flags.

At this point, the UI launched successfully on Ubuntu.

Step 3 — The real failure: messages silently didn’t send

No UI errors.
But backend turns failed with:

model_not_found

So this became a runtime / backend investigation, not a UI issue.

Root cause — hidden CLI version skew

I discovered two Codex CLI installations:

  • New CLI → 0.98.0 (supports gpt-5.3-codex)

  • Old CLI → 0.94.0 (pulled in via extension / launcher path)

The desktop app was invoking the old CLI,
so the requested model didn’t exist → model_not_found.

Classic path-resolution / version-skew bug that looks like an account or server issue.

Final fix

  • Patched launcher to use the modern Linuxbrew CLI explicitly

    • /home/linuxbrew/.linuxbrew/bin/codex

  • Restored default model:

    • model = "gpt-5.3-codex"

  • Removed a migration rule that downgraded 5.3 → 5.2

Verification (end-to-end)

Confirmed correctness at multiple layers:

  • model/list shows gpt-5.3-codex

  • Direct inference:codex exec --model gpt-5.3-codex "Reply with one word: ok" → returns ok

  • thread/start via app-server reports:

    • model = gpt-5.3-codex

    • cliVersion = 0.98.0

  • Running process confirmed from Linuxbrew path.

Warnings observed but non-blocking:

  • DBus UnitExists

  • Node url.parse deprecation

  • MCP context provider failure

None affected chat functionality.

Open-source bridge (no proprietary binaries)

Repo:
https://github.com/Mina-Sayed/codex-dmg-linux-bridge

Includes:

  • Launcher script

  • Setup + troubleshooting docs

  • No DMG or proprietary binaries (downloaded separately from official source for licensing reasons).

Engineering time

Total time: ~1 hour 10 minutes.

What used to take days of low-level debugging
can now be compressed into minutes —
if you know how to properly drive AI agents and verify the system end-to-end.

Happy to answer questions or discuss Electron cross-platform quirks,
native module rebuilding, or Codex CLI runtime behavior.

🌐
Openai
developers.openai.com › codex › app
App – Codex | OpenAI Developers
February 12, 2026 - The Codex app is a focused desktop experience for working on Codex threads in parallel, with built-in worktree support, automations, and Git functionality.
People also ask

Does Codex CLI work without internet access?
No. Codex CLI requires an active internet connection for all operations because the AI models run on OpenAI servers. The tool sends your prompts and relevant code context to OpenAI and receives responses over the network.
🌐
linuxcapable.com
linuxcapable.com › home › ubuntu › how to install codex cli on ubuntu (26.04, 24.04, 22.04)
How to Install Codex CLI on Ubuntu (26.04, 24.04, 22.04) - ...
Can Codex CLI modify files automatically without asking?
It depends on the sandbox mode. In read-only mode, Codex cannot modify files. In workspace-write mode, it can write files but must ask before running commands. Only danger-full-access mode allows unrestricted modifications. You control the level of autonomy through the --sandbox flag.
🌐
linuxcapable.com
linuxcapable.com › home › ubuntu › how to install codex cli on ubuntu (26.04, 24.04, 22.04)
How to Install Codex CLI on Ubuntu (26.04, 24.04, 22.04) - ...
Do I need a paid OpenAI subscription to use Codex CLI?
Yes. Codex CLI requires either a ChatGPT Plus, Pro, Team, Edu, or Enterprise subscription, or an OpenAI API key with active billing. The free ChatGPT tier does not include Codex CLI access.
🌐
linuxcapable.com
linuxcapable.com › home › ubuntu › how to install codex cli on ubuntu (26.04, 24.04, 22.04)
How to Install Codex CLI on Ubuntu (26.04, 24.04, 22.04) - ...
🌐
GitHub
github.com › ilysenko › codex-desktop-linux
GitHub - ilysenko/codex-desktop-linux: Run OpenAI Codex Desktop on Linux - automated installer · GitHub
2 days ago - Run OpenAI Codex Desktop on Linux. The official Codex Desktop app is macOS-only.
Starred by 201 users
Forked by 44 users
Languages   Rust 58.2% | Shell 34.0% | Makefile 3.1% | JavaScript 2.6% | Nix 2.1%
🌐
Reddit
reddit.com › r/codex › i got the codex app running on linux in ~20 minutes (no source code)
r/codex on Reddit: I got the Codex App running on Linux in ~20 minutes (no source code)
February 5, 2026 -

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.

🌐
iTechs Online
itecsonline.com › home › blog › install openai codex cli on ubuntu linux
How To Install OpenAI Codex CLI on Ubuntu Linux: 2026 Guide
February 13, 2026 - OpenAI's Codex CLI has evolved from a basic terminal agent into a full coding platform spanning CLI, IDE extension, cloud, and desktop app — all powered by models up to GPT-5.3-Codex-Spark.
🌐
OpenAI
openai.com › form › codex-app
Codex app sign up | OpenAI | OpenAI
February 2, 2026 - Submit your email to be notified when the Codex app becomes available for Windows and Linux users.
🌐
Pi-Apps
pi-apps.io › install-app › install-codex-on-linux-arm-device
Install Codex on Linux ARM Device | Pi-Apps
Codex will run on either an Ubuntu/Debian ARM32 OS or ARM64 OS. Pi-Apps is a free tool that makes it incredibly easy to install the most useful programs on your Linux ARM Device with just a few clicks.
Find elsewhere
🌐
LinuxCapable
linuxcapable.com › home › ubuntu › how to install codex cli on ubuntu (26.04, 24.04, 22.04)
How to Install Codex CLI on Ubuntu (26.04, 24.04, 22.04) - LinuxCapable
January 24, 2026 - This approach works without Node.js or Homebrew, making it ideal for minimal server environments or systems where you prefer manual control over updates. Download the latest Linux binary for your architecture. For x86_64 systems (most desktop and server installations): curl -fsSL https://github.com/openai/codex/releases/latest/download/codex-x86_64-unknown-linux-musl.tar.gz -o codex.tar.gz
🌐
Reddit
reddit.com › r/codex › introducing the codex app
r/codex on Reddit: Introducing the Codex app
February 2, 2026 - I'd have resubscribed today if this new Codex app was available for Windows, but sadly it's limited to MacOS. Even Linux would've been another option, but not available either. Holding off until I see what people say about it and if there's a Windows version one day, assuming it's good.
🌐
GitHub
github.com › areu01or00 › Codex-App-Linux
GitHub - areu01or00/Codex-App-Linux · GitHub
February 5, 2026 - cd codex-linux ./codex-linux.sh · Linux (tested on Ubuntu 22.04+, should work on most distros) Node.js 18+ and npm · ~500MB disk space · The installer: Extracts the DMG using 7zip · Unpacks the Electron app's app.asar archive · Installs Linux-compatible Electron runtime (v40) Rebuilds native modules (better-sqlite3, node-pty) for Linux ·
Starred by 21 users
Forked by 2 users
Languages   Shell
🌐
Reddit
reddit.com › r/codex › you can just tell codex to port the codex app to linux
r/codex on Reddit: you can just tell codex to port the codex app to linux
February 5, 2026 -

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).

🌐
GitHub
github.com › openai › codex
GitHub - openai/codex: Lightweight coding agent that runs in your terminal · GitHub
2 days ago - Lightweight coding agent that runs in your terminal - openai/codex
Starred by 74.7K users
Forked by 10.6K users
Languages   Rust 94.9% | Python 2.8% | TypeScript 1.4% | JavaScript 0.3% | Starlark 0.3% | Shell 0.1%
🌐
CometAPI
cometapi.com › how-to-make-the-codex-app-work-on-windowslinux
How to make the Codex app work on Windows/Linux - CometAPI - All AI Models in One API
March 5, 2026 - If you develop in Linux toolchains ... rather than native Windows: ... Inside the Codex app Settings → Runtime, choose WSL as the execution backend and point Codex to the default WSL distro (e.g., Ubuntu)....
🌐
GitHub
github.com › tirtha4 › codex-linux-desktop
GitHub - tirtha4/codex-linux-desktop: Run Codex App on Your Local Linux System · GitHub
This repository contains a single setup script (setup.sh) plus a launcher (run-codex-linux.sh) that bakes in the working environment defaults we used. Not official. Prefer an official Linux build when available. Do not redistribute the DMG or proprietary app assets unless you’re allowed to. Understand the code before running on your local system. ... sudo apt-get install -y software-properties-common sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -y gcc-11 g++-11 CC=gcc-11 CXX=g++-11 ./setup.sh ./dmg/Codex.dmg
Author   tirtha4
🌐
Command Linux
commandlinux.com › home › q&a › codex download app for programmers
Codex Download App For Programmers
2 weeks ago - The application currently targets Windows platforms exclusively. Similar functionality exists through text editors available on Linux distributions. Version 2.0.5 represents the latest stable release. Users can access it through the official distribution channels. The download includes the complete installation package. No additional dependencies are required. Download Codex 2.0.5
🌐
Platform Uno
platform.uno › docs › articles › get-started-ai-codex.html
Get Started with Codex CLI
In any case, you may refer to the ... your Ubuntu version. Then, setup uno.check by installing or updating the tool with: ... You can optionally add the --target desktop --target web (or ios, android, windows) parameters based on your intended development platforms. ... You can find additional information about uno-check here. Install Codex CLI using ...
🌐
Openai
developers.openai.com › codex › quickstart
Quickstart – Codex | OpenAI Developers
February 3, 2026 - The Codex CLI is supported on macOS, Windows, and Linux.
🌐
Arch Linux
aur.archlinux.org › packages › codex-app-bin
AUR (en) - codex-app-bin - Arch Linux
February 5, 2026 - cd ~/apps/codex-port rm -rf app_asar pnpm dlx @electron/asar extract "./dmg_extracted/Codex Installer/Codex.app/Contents/Resources/app.asar" ./app_asar