Hey everyone,
I managed to get Plasma Browser Integration fully working with Brave Browser
(Flatpak) on Fedora 43 + KDE Plasma 6 (Wayland). Since this is a pain point
for many users on immutable distros and Flatpak-based setups, I wanted to share
the solution.
The Problem
The extension shows “Failed to connect to the native host” on any
Chromium-based Flatpak browser. There are two root causes:
- The “args” field in native messaging JSON doesn’t work correctly inside
the Flatpak sandbox — the browser tries to execute the extension URI as a
command (bwrap: execvp chrome-extension://… No such file or directory) - plasma-browser-integration-host hangs when called from a Flatpak
context because it tries to connect to the XDG Desktop Portal via D-Bus and
blocks indefinitely
The Fix (3 small files)
The approach uses two wrapper scripts to bridge the Flatpak sandbox boundary.
Step 1 — Host-side wrapper (requires sudo):
sudo tee /usr/local/bin/plasma-browser-integration-host-wrapper << 'EOF'
#!/bin/bash
export QT_NO_XDG_DESKTOP_PORTAL=1
exec /usr/bin/plasma-browser-integration-host "$@"
EOF
sudo chmod +x /usr/local/bin/plasma-browser-integration-host-wrapper
Step 2 — Sandbox-side wrapper:
cat > ~/.var/app/com.brave.Browser/data/plasma-browser-integration-wrapper.sh << 'EOF'
#!/bin/bash
exec flatpak-spawn --host /usr/local/bin/plasma-browser-integration-host-wrapper "$@"
EOF
chmod +x ~/.var/app/com.brave.Browser/data/plasma-browser-integration-wrapper.sh
Step 3 — Native messaging JSON (replace <HOME_DIR> with your home path):
mkdir -p ~/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser/NativeMessagingHosts
cat > ~/.var/app/com.brave.Browser/config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.kde.plasma.browser_integration.json << ENDJSON
{
"name": "org.kde.plasma.browser_integration",
"description": "KDE Plasma Integration",
"path": "<HOME_DIR>/.var/app/com.brave.Browser/data/plasma-browser-integration-wrapper.sh",
"type": "stdio",
"allowed_origins": [
"chrome-extension://cimiefiiaegbelhefglklhhakcgmhkai/"
]
}
ENDJSON
Step 4 — Restart Brave and the extension should connect immediately.
Result
Everything works: media controls, KRunner tab search, download notifications.
Notes
- This should work for any Chromium-based Flatpak browser (Chrome, Edge,
Vivaldi) — just adapt the paths. - It’s a workaround until xdg-native-messaging-proxy lands in browsers.
- Full technical details posted on bugs.kde.org #502759
(https://bugs.kde.org/show_bug.cgi?id=502759).
Hope this helps someone!