Skip to content

fix(linux): use Secret Service keyring on non-GNOME/KDE desktops - #4190

Open
binaricat wants to merge 1 commit into
mainfrom
fix/4189-linux-secret-service-store
Open

binaricat wants to merge 1 commit into
mainfrom
fix/4189-linux-secret-service-store

Conversation

@binaricat

Copy link
Copy Markdown
Owner

Fixes #4189

On Linux, Chromium picks the safeStorage password backend from XDG_CURRENT_DESKTOP. Non-GNOME/KDE compositors such as niri, sway, and Hyprland fall through to BASIC_TEXT even when Secret Service (org.freedesktop.secrets) is available. Electron then reports safeStorage.isEncryptionAvailable() === false, so local vault backups are refused and credential fields are stored as plaintext.

This sets --password-store=gnome-libsecret before app.whenReady() when:

  • the process is Linux
  • the user did not already pass --password-store
  • the desktop is not KDE/Plasma (Chromium's native kwallet default is left alone)
  • the session bus owns org.freedesktop.secrets

GNOME and other Secret Service environments keep the same backend. Systems with no keyring keep today's fail-closed backup path and plaintext-credential fallback.

Focused tests: node --test electron/linuxPasswordStore.test.cjs electron/startupMemoryGuards.test.cjs (17 pass).

Chromium only enables gnome-libsecret or kwallet when it recognizes a
GNOME/KDE desktop name, so niri/sway/Hyprland fall through to BASIC_TEXT
even when org.freedesktop.secrets is available. Set --password-store
before app ready when Secret Service is present, without overriding an
explicit switch or KDE's kwallet default.
@binaricat

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-08T17:00:31.701136Z 3438570 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 3438570c53

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 在非 GNOME/KDE 的 Wayland 合成器上启动,备份时面板显示「当前平台未提供受支持的安全密钥库」

1 participant