Skip to content

Instantly share code, notes, and snippets.

@cdpb
Last active December 17, 2023 21:37
Show Gist options
  • Save cdpb/fd2dbecdb4a08d79da6c08d8a65dd97c to your computer and use it in GitHub Desktop.
Save cdpb/fd2dbecdb4a08d79da6c08d8a65dd97c to your computer and use it in GitHub Desktop.
Vivaldi (Chrome) and KeePassXC Flatpak Integration for Browser

Inspired by this

# modify keepassxc browser path
In the KeePassXC UI.
- Tools
  - Settings
    - Browser Integration
      - General
        - Enable Browser Integration
        - Tick Vivaldi
      - Advanced
        - Untick "Update native messaging manifest at startup"
        - Use a custom location
          - Chromium
            - ~/.var/app/com.vivaldi.Vivaldi/config/vivaldi/NativeMessagingHosts

# clone
git clone https://github.com/varjolintu/keepassxc-proxy-rust
cd keepassxc-proxy-rust

# compile
# add deps if needed
sudo dnf install gcc rustup
rustup-init
rustup target add x86_64-unknown-linux-musl
RUSTFLAGS='-C link-arg=-s' cargo build --release --target x86_64-unknown-linux-musl
cp target/x86_64-unknown-linux-musl/release/keepassxc-proxy ~/.var/app/com.vivaldi.Vivaldi/config/vivaldi/NativeMessagingHosts/

# set path: /var/home/REPLACEUSER/.var/app/com.vivaldi.Vivaldi/config/vivaldi/NativeMessagingHosts/keepassxc-proxy
vi ~/.var/app/com.vivaldi.Vivaldi/config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json

# modify flatpaks
sudo flatpak override --filesystem=xdg-run/app/org.keepassxc.KeePassXC:ro com.vivaldi.Vivaldi
sudo flatpak override --filesystem=xdg-run/org.keepassxc.KeePassXC:ro com.vivaldi.Vivaldi
sudo flatpak override --filesystem=/var/home/m8/.var/app/com.vivaldi.Vivaldi/config/vivaldi/NativeMessagingHosts org.keepassxc.KeePassXC

# untick above BrowserIntegration, leave it enabled, but disable Vivaldi and Advanced/Custom Location (otherwise it gets overwritten)

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