Build a working Linux .deb for Codex from the official Windows MSIX.
This project does not try to force the Windows desktop app to run unchanged on Linux. Instead, it uses the official Codex assets and packages them with a native Linux Electron runtime and a small wrapper app. The result is a stable desktop launcher that opens Codex in its own window and behaves like a normal Linux app.
- Builds a native
.debnamedcodex-desktop-native - Uses local pinned build dependencies from this repo
- Preserves official Codex branding and bundled assets from the MSIX
- Launches with Linux-safe runtime flags for sandbox and GPU issues
- Includes a one-command rebuild and reinstall helper
The Windows MSIX contains useful resources, but the original desktop bundle is not a clean drop-in for Linux. In practice, the direct-port approach ran into native module and Electron runtime issues.
This repo takes the more reliable route:
- extract the official Codex MSIX
- reuse its assets and bundled resources
- package them with Linux Electron
- ship a minimal wrapper that opens
https://chatgpt.com/codex
That keeps the desktop experience simple and dependable.
- build-codex-native-deb.sh: main build script
- rebuild-install.sh: rebuild and reinstall helper
- OpenAI.Codex_26.313.5234.0_x64__2p2nqsd0c76g0.Msix: source payload
System tools:
filedpkg-debpython3nodenpm
Project dependencies:
cd /home/johnohhh1/Codex-ubuntu
npm installThis installs the local build dependencies used by the project, including Electron and asar.
cd /home/johnohhh1/Codex-ubuntu
npm install
./rebuild-install.sh
codex-desktop-nativecd /home/johnohhh1/Codex-ubuntu
./build-codex-native-deb.sh --clean noThe generated package is written to dist/.
cd /home/johnohhh1/Codex-ubuntu
./rebuild-install.shThis helper:
- rebuilds the package
- installs the newest generated
.deb - leaves the build tree in place for inspection
- The launcher uses
--no-sandbox --disable-setuid-sandbox. - GPU is disabled by default because Electron GPU startup was crashing in this environment.
- The package
preinstscript removes staleapp.asar.unpackedleftovers during upgrades. - You can override the wrapper URL with
CODEX_WEB_URL.
Expected package path:
/home/johnohhh1/Codex-ubuntu/dist/codex-desktop-native_26.313.5234.0_amd64.deb
- add a version bump helper for newer MSIX drops
- add optional Wayland/X11 launch toggles