[Feature Request] Improve Flatpak Chrome integration to support automatic detection and configuration
Bug Description
If you're using Chrome installed via Flatpak (common on Fedora Silverblue, immutable distros, etc.), the Claude Code browser automation won't work out of the box.
Environment Info
- Platform: linux
- Terminal: vte-based
- Version: 2.0.76
- Feedback ID: 5357cef3-6f33-409d-a0f8-ce9257db0887
Errors
Claude's instructions to work around the issue are below.
---
The Problem
Claude Code installs the native messaging host to the standard Chrome location, but Flatpak Chrome:
- Looks for native messaging hosts in a different directory
- Has a sandboxed
/tmpthat isolates the Unix socket used for communication - Doesn't have access to
~/.claude/or~/.local/share/claude/by default
The Fix
Step 1: Copy the native messaging host manifest
cp ~/.config/google-chrome/NativeMessagingHosts/com.anthropic.claude_code_browser_extension.json \
~/.var/app/com.google.Chrome/config/google-chrome/NativeMessagingHosts/
Step 2: Grant Flatpak access to Claude directories
flatpak override --user com.google.Chrome \
--filesystem=~/.claude:ro \
--filesystem=~/.local/share/claude:ro
Step 3: Share host /tmp with Flatpak
This is needed because Claude Code's MCP server and the native messaging host communicate via a Unix socket in /tmp. Without this, the socket created inside Flatpak's sandbox isn't visible to Claude Code.
flatpak override --user com.google.Chrome --filesystem=/tmp
Step 4: Restart Chrome
Fully quit Chrome (not just close the window) and relaunch it:
pkill -9 -f '/app/extra/chrome'
pkill -9 -f 'bwrap.*chrome'
# Then reopen Chrome
Step 5: Test the connection
Run claude --chrome or use /chrome in an existing Claude Code session.
Verify permissions
You can check your Flatpak overrides with:
flatpak override --user --show com.google.Chrome
Expected output should include:
[Context]
filesystems=~/.local/share/claude:ro;/tmp;~/.claude:ro;
Security Note
Sharing /tmp with Flatpak has some security implications as it breaks part of the sandbox isolation. A better long-term fix would be for Claude Code to use a socket path in a user-accessible directory like ~/.claude/ or $XDG_RUNTIME_DIR instead of /tmp.
Related Issues
---
Tested on Fedora Silverblue with Chrome Flatpak (com.google.Chrome) and Claude Code 2.0.76.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗