[BUG] Fail to reauthenticate my account, Claude Desktop on Ubuntu Linux
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Related to #94884 (same symptom, different root cause — that report predates the Linux beta and assumes no desktop app exists; here the app is installed and the failure is in the package's desktop-database registration).
Different root cause from the original report, same dead-end symptom. This one is a packaging bug and has a one-line fix.
Environment
- Ubuntu 24.04.5 LTS (noble), GNOME Shell 46.0, Wayland
claude-desktop2.2553.1, installed from Anthropic's apt repository- Google Chrome 153.0.8010.52, native
/usr/bin/google-chrome(not Snap/Flatpak)
Unlike the original report, the desktop app is installed, so there is an app for the deep link to open. Sign-in still dead-ends at GNOME's "Open With… / No Apps Available" chooser.
Root cause
postinst never runs update-desktop-database, so x-scheme-handler/claude is never indexed in /usr/share/applications/mimeinfo.cache:
$ grep -l 'update-desktop-database' /var/lib/dpkg/info/claude-desktop.*
(no match — not called in postinst or postrm)
The result is a default that points at an unindexed application. Chrome delegates to GIO, GIO reads the cache, finds nothing registered, falls through to the chooser:
$ gio mime x-scheme-handler/claude
Default application for "x-scheme-handler/claude": com.anthropic.Claude.desktop
No registered applications
No recommended applications
Why this is easy to misdiagnose
Two things report success while the handoff is broken:
$ xdg-mime query default x-scheme-handler/claude
com.anthropic.Claude.desktop # reads mimeapps.list — the preference, not the index
$ xdg-open 'claude://claude.ai/new'
(launches the app fine)
Chrome also shows its "Open Claude?" confirmation dialog before failing. That dialog is derived from the scheme string and is not evidence that a handler resolved — clicking through it produces the GNOME "No Apps Available" chooser.
gio mime is the only one of the three that reflects what Chrome actually uses.
Fix
sudo update-desktop-database /usr/share/applications
Then fully restart Chrome (it caches the handler lookup at startup). Browser sign-in completes normally afterward.
Ruled out
- Shadowing user entry. The app writes
~/.local/share/applications/com.anthropic.Claude.desktop(X-Claude-Generated=true), which shadows the packaged copy. I removed it during debugging, then restored it after rebuilding the cache —gio mimelists it as registered and recommended and the launch works. Not a factor. TryExec. The generated user entry addsTryExec=claude-desktop, absent from the packaged copy. Resolves fine (/usr/bin/claude-desktop), so GIO does not discard the entry.- Chrome policy (
chrome://policyempty),protocol_handler.excluded_schemes(key absent), Snap/Flatpak sandboxing (neither), desktop portal.
Suggested fix
Add to postinst:
if command -v update-desktop-database >/dev/null 2>&1; then
update-desktop-database -q /usr/share/applications || true
fi
This affects every fresh install of the Linux beta on GNOME — the deep link cannot work until a user happens to run update-desktop-database for an unrelated reason.
Temporary workaround
A dpkg trigger hook:
sudo tee /etc/apt/apt.conf.d/99-claude-desktop-mime >/dev/null <<'EOF'
DPkg::Post-Invoke { "if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q /usr/share/applications || true; fi"; };
EOF
That runs after every apt transaction, not just Claude's, and is harmless — update-desktop-database is cheap and idempotent. It also covers any other package with the same omission. Remove the file if Anthropic fixes the postinst.
Diagnostic for anyone else hitting this
xdg-mime query is not sufficient. Check with:
gio mime x-scheme-handler/claude
A named default alongside "No registered applications" is the signature.
What Should Happen?
Claude desktop should allow registration to work
Error Messages/Logs
Nothing is obvious. Just Chrome can't open Claude after logging in.
Steps to Reproduce
- Open Claude desktop.
- Attempt to login.
- Redirect to Chrome.
- Login successfully.
- Attempt to use xdg-open to launch Claude with the URL that has the nonce.
- Failed to launch Claude.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unsure
Claude Code Version
command not found - claude desktop
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗