Pin browser password store to gnome-libsecret#6065
Conversation
Chromium and Brave auto-detect their os_crypt backend at launch. On Hyprland the xdg-desktop-portal Secret backend has no provider (gnome-keyring.portal is UseIn=gnome; portal preference is hyprland;gtk), so it fails (os_crypt.portal.prev_init_success=false in Local State) and the browser falls back per the Chromium docs to the 'basic' v10 store. When a launch lands on basic instead of gnome-libsecret (v11), previously encrypted cookies and saved passwords become undecryptable and are silently dropped, logging the user out of everything. Pin --password-store=gnome-libsecret so the backend is deterministic. Omarchy already pins this exact value for VSCode (omarchy-install-vscode), so this aligns the browser defaults with existing behavior. A migration adds the flag to existing chromium-flags.conf and brave-flags.conf, mirroring migration 1771188969.sh.
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a migration and default Chromium flags to pin the browser password store to gnome-libsecret, preventing loss of cookies/saved logins when the auto-detected backend changes (e.g., on Hyprland).
Changes:
- Introduce a migration that appends
--password-store=gnome-libsecretto existing user Chromium/Brave flags configs when not already set. - Add
--password-store=gnome-libsecretto the repository’s defaultconfig/chromium-flags.conf.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| migrations/1781079205.sh | Migration to enforce deterministic password-store backend for Chromium/Brave user configs. |
| config/chromium-flags.conf | Default Chromium flags now include --password-store=gnome-libsecret. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # undecryptable, so the browser silently drops them and the user is logged out of everything. | ||
| # Pin gnome-libsecret so the backend is deterministic across reboots and updates. | ||
| for conf in ~/.config/chromium-flags.conf ~/.config/brave-flags.conf; do | ||
| if [[ -f $conf ]] && ! grep -q -- '--password-store=' "$conf"; then |
| for conf in ~/.config/chromium-flags.conf ~/.config/brave-flags.conf; do | ||
| if [[ -f $conf ]] && ! grep -q -- '--password-store=' "$conf"; then | ||
| echo '--password-store=gnome-libsecret' >> "$conf" | ||
| fi | ||
| done |
| @@ -0,0 +1,12 @@ | |||
| echo "Pin browser password store to gnome-libsecret (prevents cookie/login loss on Hyprland)" | |||
Chromium-based browsers auto-detect their os_crypt backend at launch. On Hyprland the xdg-desktop-portal Secret backend has no provider, so the autodetect can fall back to the 'basic' (v10) store, making previously v11-encrypted cookies and saved passwords undecryptable — the user is silently logged out of everything. Pin gnome-libsecret (the stock omarchy keyring) so the backend is deterministic, matching what we already do for VSCode. Migration covers chromium, brave, chrome, and edge flags confs for existing installs. Co-authored-by: Niklas Tscheppe <ntscheppe@drgt.net> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks for the excellent diagnosis and fix! Merged into quattro as a1e0875 with credit (co-authored-by), plus a couple of tweaks from review: the migration now also covers chrome-flags.conf and microsoft-edge-stable-flags.conf, and guards against a missing trailing newline before appending. |
Chromium-based browsers auto-detect their os_crypt backend at launch. On Hyprland the xdg-desktop-portal Secret backend has no provider, so the autodetect can fall back to the 'basic' (v10) store, making previously v11-encrypted cookies and saved passwords undecryptable — the user is silently logged out of everything. Pin gnome-libsecret (the stock omarchy keyring) so the backend is deterministic, matching what we already do for VSCode. Migration covers chromium, brave, chrome, and edge flags confs for existing installs. Co-authored-by: Niklas Tscheppe <ntscheppe@drgt.net> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chromium and Brave auto-detect their
os_cryptbackend at launch. On Hyprland the xdg-desktop-portal Secret backend has no provider (gnome-keyring.portalisUseIn=gnome; the portal preference ishyprland;gtk), so it fails — observable in~/.config/chromium/Local Stateasos_crypt: {"portal":{"prev_desktop":"Hyprland","prev_init_success":false}}. Per the official Chromium docs, it then "will fall back tobasicif a requested or autodetected store is not available."basicuses a hardcoded key (v10). When a launch lands onbasicinstead ofgnome-libsecret(v11), previously encrypted cookies and saved passwords become undecryptable and are silently dropped — the user is logged out of everything, sometimes with a "create new keyring" prompt. This recurs across reboots/updates whenever the fallback target changes.Fix
Pin
--password-store=gnome-libsecretso the backend is deterministic and the flaky portal autodetect is skipped. Omarchy already pins this exact value for VSCode (bin/omarchy-install-vscodewrites"password-store":"gnome-libsecret"to argv.json), so this just aligns the browser defaults with existing intent. The Archchromium/bravelauncher reads*-flags.conf, so it also covers web-apps launched viaomarchy-launch-webapp.Changes
config/chromium-flags.conf.migrations/1781079205.sh: idempotently add the flag to existingchromium-flags.confandbrave-flags.conf, mirroring the precedent inmigrations/1771188969.sh.Notes
*-flags.confand can still hit a backend swap; out of scope here.Refs