[BUG] Desktop Linux: with "Match system", app starts light (and blank until timeout) when the settings portal doesn't answer color-scheme; no fallback to the GTK theme, no recovery
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?
Claude Desktop for Linux 5.11492.5 (official .deb) on Debian 13, MATE desktop on Wayland (Wayfire compositor), Appearance = "Match system". The system is dark: org.gnome.desktop.interface color-scheme is 'prefer-dark', the GTK theme is gnome-professional-solid-40.1-dark (same for org.mate.interface gtk-theme), and the settings portal answers ReadOne org.freedesktop.appearance color-scheme with 1 when it is working.
At launch the app's theme depends entirely on the portal's answer:
- Portal answers
1: dark, which is correct. - Portal unresponsive (simulated with
systemctl --user kill -s STOP xdg-desktop-portal.service): the window stays blank white until the D-Bus call times out, then the UI renders light. If the portal is resumed withSIGCONTwhile the window is still blank, the app finishes loading at once, in dark. - Portal running but its backend gone (happened naturally): after a logout and quick re-login, the user's
xdg-desktop-portal.servicesurvived, whilexdg-desktop-portal-gtkhad died with the old compositor and failed to restart with the staleDISPLAY. The app started light with no hang.
After the light start, the app stays light even once the portal recovers, until Appearance is toggled to Light and back to "Match system", or the app is restarted.
What Should Happen?
If the portal call fails or times out, the app should fall back to the GTK theme (dark here) or to the GNOME color-scheme setting, not to light. It should not block its first paint on the portal call, and it should re-check the colour scheme when the portal becomes available or sends SettingChanged.
Error Messages/Logs
journalctl --user, natural occurrence (logout at 22:33:11, Claude started right after re-login):
xdg-desktop-por[551430]: Lost connection to Wayland compositor.
systemd[43404]: xdg-desktop-portal-gtk.service: Main process exited, code=exited, status=1/FAILURE
systemd[43404]: Starting xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation)...
xdg-desktop-por[580348]: cannot open display: :1
systemd[43404]: Failed to start xdg-desktop-portal-gtk.service - Portal service (GTK/GNOME implementation).
xdg-desktop-por[551395]: Failed to close session implementation: Timeout was reached
Steps to Reproduce
- Set the system to dark (
gsettings set org.gnome.desktop.interface color-scheme prefer-dark, dark GTK theme), set Appearance = "Match system", and quit Claude Desktop. - Run
systemctl --user kill -s STOP xdg-desktop-portal.service. - Start Claude Desktop. The window stays blank white, then the UI appears light after the D-Bus timeout.
- Run
systemctl --user kill -s CONT xdg-desktop-portal.service.
Variant: run step 4 while the window is still blank. The app then finishes loading at once, in dark, so the dark result depends only on getting the portal's answer in time.
Claude Model
None
Is this a regression?
I don't know
Last Working Version
No response
Claude Code Version
N/A (Claude Desktop 5.11492.5, not the CLI)
Platform
Other
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Desktop app UI only, not the CLI.
Related but not duplicates: #100295 (theme follows runtime switches one step behind) and #79995 (closed by the inactivity bot). Those are about the runtime-update path; this one is about the startup path and its fallback when the portal doesn't answer.