claude-code - 💡(How to fix) Fix Claude Desktop on Linux opens PC/SC smartcard socket, destabilizes GnuPG signing [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46336Fetched 2026-04-11 06:22:58
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Claude Desktop on Fedora (and likely other Linux distros) launches as an unsandboxed Electron app with --no-sandbox. Chromium eagerly loads libpcsclite.so.1 and opens a persistent connection to /run/pcscd/pcscd.comm for WebAuthn/FIDO reader enumeration, even though Claude Desktop has no smartcard functionality. This destabilizes GnuPG's scdaemon, causing gpg: signing failed: Not supported errors during git commit -S and other signing operations.

Root Cause

GnuPG's scdaemon has a known upstream bug where it caches the PC/SC card handle (hCard) without revalidation and doesn't use SCardBeginTransaction/SCardEndTransaction. When another PC/SC client (in this case, Claude Desktop's Chromium process) touches the reader, scdaemon's cached handle goes stale. The next signing attempt fails with Not supported until gpgconf --kill scdaemon is run.

While this is ultimately a GnuPG bug, Claude Desktop is the trigger on affected machines. The failure is reproducible: signing works reliably without Claude Desktop running, and breaks within hours of launching it.

Fix Action

Workaround

Launching Claude Desktop via systemd-run with InaccessiblePaths=/run/pcscd blocks access to the PC/SC socket without affecting any Claude functionality.

Code Example

#!/usr/bin/env bash
set -euo pipefail
exec systemd-run \
  --user \
  --collect \
  --same-dir \
  --quiet \
  -E DISPLAY \
  -E WAYLAND_DISPLAY \
  -E XDG_RUNTIME_DIR \
  -E DBUS_SESSION_BUS_ADDRESS \
  -E XAUTHORITY \
  -p InaccessiblePaths=/run/pcscd \
  /usr/bin/claude-desktop "$@"

---

[Desktop Entry]
Name=Claude
Exec=/home/YOUR_USER/bin/claude-desktop-no-pcsc %u
Icon=claude-desktop
Type=Application
Terminal=false
Categories=Office;Utility;
MimeType=x-scheme-handler/claude;
StartupWMClass=Claude
RAW_BUFFERClick to expand / collapse

Summary

Claude Desktop on Fedora (and likely other Linux distros) launches as an unsandboxed Electron app with --no-sandbox. Chromium eagerly loads libpcsclite.so.1 and opens a persistent connection to /run/pcscd/pcscd.comm for WebAuthn/FIDO reader enumeration, even though Claude Desktop has no smartcard functionality. This destabilizes GnuPG's scdaemon, causing gpg: signing failed: Not supported errors during git commit -S and other signing operations.

Root cause

GnuPG's scdaemon has a known upstream bug where it caches the PC/SC card handle (hCard) without revalidation and doesn't use SCardBeginTransaction/SCardEndTransaction. When another PC/SC client (in this case, Claude Desktop's Chromium process) touches the reader, scdaemon's cached handle goes stale. The next signing attempt fails with Not supported until gpgconf --kill scdaemon is run.

While this is ultimately a GnuPG bug, Claude Desktop is the trigger on affected machines. The failure is reproducible: signing works reliably without Claude Desktop running, and breaks within hours of launching it.

Evidence

  • Confirmed Claude Desktop (Electron/Chromium) holds an ESTABLISHED Unix socket connection to /run/pcscd/pcscd.comm via ss -x
  • lsof//proc/PID/maps confirms libpcsclite.so.1 is mapped into the Claude Desktop process
  • Failures stop completely when Claude Desktop is not running
  • Failures return when Claude Desktop is relaunched without mitigation

Environment

  • Fedora 44, kernel 6.19.10
  • Claude Desktop 1.569.0 (claude-desktop-1.569.0-1.3.26.fc42)
  • GnuPG 2.4.9-5, pcsc-lite 2.4.1-2
  • Nitrokey 3A Mini (also affects YubiKey users per upstream reports)

Workaround

Launching Claude Desktop via systemd-run with InaccessiblePaths=/run/pcscd blocks access to the PC/SC socket without affecting any Claude functionality.

1. Create a wrapper script

Save to ~/bin/claude-desktop-no-pcsc and chmod +x:

#!/usr/bin/env bash
set -euo pipefail
exec systemd-run \
  --user \
  --collect \
  --same-dir \
  --quiet \
  -E DISPLAY \
  -E WAYLAND_DISPLAY \
  -E XDG_RUNTIME_DIR \
  -E DBUS_SESSION_BUS_ADDRESS \
  -E XAUTHORITY \
  -p InaccessiblePaths=/run/pcscd \
  /usr/bin/claude-desktop "$@"

2. Create a user-level .desktop override

Save to ~/.local/share/applications/claude-desktop.desktop — this overrides the system-wide .desktop file shipped by the RPM so that GNOME (and any other desktop environment) launches Claude through the wrapper:

[Desktop Entry]
Name=Claude
Exec=/home/YOUR_USER/bin/claude-desktop-no-pcsc %u
Icon=claude-desktop
Type=Application
Terminal=false
Categories=Office;Utility;
MimeType=x-scheme-handler/claude;
StartupWMClass=Claude

Replace YOUR_USER with your username, or use the full path to wherever you saved the wrapper script.

After saving, run update-desktop-database ~/.local/share/applications/ to refresh the desktop cache.

Suggested fix

Any of these would prevent Claude Desktop from being a PC/SC trigger:

  1. Ship the systemd unit / .desktop file with InaccessiblePaths=/run/pcscd — simplest, no code change
  2. Pass --disable-features=SmartCardWebAuthn or equivalent Chromium flag to prevent PC/SC enumeration at the Electron level
  3. Enable Electron sandboxing (currently launched with --no-sandbox) — the sandbox would block access to the pcscd socket by default

extent analysis

TL;DR

Launch Claude Desktop with restricted access to the PC/SC socket using systemd-run with InaccessiblePaths=/run/pcscd to prevent destabilization of GnuPG's scdaemon.

Guidance

  • Create a wrapper script to launch Claude Desktop with systemd-run and InaccessiblePaths=/run/pcscd to block access to the PC/SC socket.
  • Override the system-wide .desktop file with a user-level version that launches Claude Desktop through the wrapper script.
  • Consider passing --disable-features=SmartCardWebAuthn or equivalent Chromium flag to prevent PC/SC enumeration at the Electron level.
  • Enabling Electron sandboxing (by removing --no-sandbox) could also block access to the pcscd socket by default.

Example

The provided wrapper script and .desktop override files demonstrate how to implement this workaround:

#!/usr/bin/env bash
set -euo pipefail
exec systemd-run \
  --user \
  --collect \
  --same-dir \
  --quiet \
  -E DISPLAY \
  -E WAYLAND_DISPLAY \
  -E XDG_RUNTIME_DIR \
  -E DBUS_SESSION_BUS_ADDRESS \
  -E XAUTHORITY \
  -p InaccessiblePaths=/run/pcscd \
  /usr/bin/claude-desktop "$@"

Notes

This workaround does not require any code changes to Claude Desktop and only restricts access to the PC/SC socket, which is not used by the application.

Recommendation

Apply the workaround by creating a wrapper script and overriding the system-wide .desktop file, as this is a simple and effective solution that does not require any code changes to Claude Desktop.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING