Codex not working on vscode on ubuntu 24.04

Codex vscode extension not working on ubuntu 24.04
On both my laptop and main working computer, the same issue is happening; it’s simply not loading,
There were issues also before, but I was usually able to fix this by reloading the window or removing the ~/.codex But now it simply never loads for a few days already.
It came to the point that I had to cancel my subscription since I was not able to use it at all.

Welcome to the forum!

You are welcome to discuss Codex issues on the forum, however the official place to report and track them is the GitHub issue tracker for OpenAI Codex.

I had ChatGPT look for the closest related issue and it identified this closed issue:

One benefit of this issue is that it links to several related issues, including some where Linux-specific behavior is discussed in the comments.

If this issue is not the same as yours, please search the issues and if you find a match give the topic a thumbs up to show that this is important to you. If you do not find a match then open a new issue.

Codex and ChatGPT have merged. The linked issue was incorrectly marked as closed even while issues are still reported. New install of codex on vscode or command line does not work and does not authenticate. @EricGT

I have same issues. VS Code Codex extension crashes on Ubuntu 24.04
Ubuntu 24.04, VS Code 1.129.0
codex extension version : 26.707.71524

there are many similar issues on review comments marketpkace vscode

For those reporting this issue here, please help direct attention to the relevant open Codex issue by linking to it in this topic.

Keep in mind that Codex developers do not regularly monitor this forum.

Also consider adding a :+1: reaction to the GitHub issue itself. Reactions on the issue page help developers gauge how many users are affected and may assist with prioritization.

For anyone having issues with the Codex extension getting stuck on the loading screen in Ubuntu, the problem may be related to the VS Code desktop shortcut.

In my case, opening VS Code from the terminal worked normally.

Step-by-step

  1. Close all VS Code windows.

  2. Open the terminal and run:

code .

If Codex opens normally, the issue is probably with the VS Code shortcut used by Ubuntu.

  1. Create a local copy of the VS Code shortcut:
mkdir -p ~/.local/share/applications

cp /usr/share/applications/code.desktop \
  ~/.local/share/applications/code.desktop

  1. Update the executable used by the shortcut:
sed -i \
  's|Exec=/usr/share/code/code|Exec=/usr/bin/code|g' \
  ~/.local/share/applications/code.desktop

  1. Refresh the desktop application database:
update-desktop-database ~/.local/share/applications

  1. Confirm that the change was applied:
grep '^Exec=' ~/.local/share/applications/code.desktop

The output should look similar to this:

Exec=/usr/bin/code %F
Exec=/usr/bin/code --new-window %F

  1. Remove the current VS Code icon from your favorites or dock.

  2. Search for “Visual Studio Code” again in the Ubuntu applications menu, open it, and pin the new icon to your favorites.

If Ubuntu still uses the old shortcut, log out and log back in, or restart the computer.

As a temporary workaround, you can continue opening VS Code from the terminal with:

code .