UB
Universal Blue•5mo ago
bonk

KeepassXC browser integration issue [unsolved]

PERSONAL TESTING, THIS FIX WORKS (for instructions follow below the steps) https://github.com/keepassxreboot/keepassxc-browser/issues/1631#issuecomment-1153736766 There may be a simpler solution coming in the future. For now, attempt this if you have not tried any other solutions! (It might not work if you have tried another method)
GitHub
Cannot save new credentials using browser · Issue #1631 · keepass...
When I login to a new site where I have not added my credentials, the credentials are not saved to keepassxc. Expected Behavior When a new credentials is entered, upon successful login, the credent...
9 Replies
bonk
bonkOP•5mo ago
this is a sort of continuation from #🎮bazzite https://discordapp.com/channels/1072614816579063828/1087140957096517672/1389518455157424148 Installation: Firefox and KeepassXC are installed as a FLATPAK on the SYSTEM Possible solution steps using the github: 1. Granted the browser access to KeePassXC flatpak app and KDE runtime installations, and to the KeePassXC proxy socket (RUN IN TERMINAL):
flatpak override --user \
--filesystem={/var/lib,xdg-data}/flatpak/{app/org.keepassxc.KeePassXC,runtime/org.kde.Platform}:ro \
--filesystem=xdg-run/app/org.keepassxc.KeePassXC:create \
org.mozilla.firefox
flatpak override --user \
--filesystem={/var/lib,xdg-data}/flatpak/{app/org.keepassxc.KeePassXC,runtime/org.kde.Platform}:ro \
--filesystem=xdg-run/app/org.keepassxc.KeePassXC:create \
org.mozilla.firefox
2. Make sure to go to ~/.var/app/org.mozilla.firefox/data and create a bin folder (it may not exist) Created a wrapper script that will launch the official keepassxc-proxy from KeePassXC flatpak, at a path accessible by the Firefox flatpak, e.g.
~/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh
~/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh
3. Into the sh file paste the following:
#!/bin/bash

APP_REF="org.keepassxc.KeePassXC/x86_64/stable"

for inst in "$HOME/.local/share/flatpak" "/var/lib/flatpak"; do
if [ -d "$inst/app/$APP_REF" ]; then
FLATPAK_INST="$inst"
break
fi
done
[ -z "$FLATPAK_INST" ] && exit 1

APP_PATH="$FLATPAK_INST/app/$APP_REF/active"

RUNTIME_REF=$(awk -F'=' '$1=="runtime" { print $2 }' < "$APP_PATH/metadata")
RUNTIME_PATH="$FLATPAK_INST/runtime/$RUNTIME_REF/active"

exec flatpak-spawn \
--env=LD_LIBRARY_PATH=/app/lib \
--app-path="$APP_PATH/files" \
--usr-path="$RUNTIME_PATH/files" \
-- keepassxc-proxy "$@"
#!/bin/bash

APP_REF="org.keepassxc.KeePassXC/x86_64/stable"

for inst in "$HOME/.local/share/flatpak" "/var/lib/flatpak"; do
if [ -d "$inst/app/$APP_REF" ]; then
FLATPAK_INST="$inst"
break
fi
done
[ -z "$FLATPAK_INST" ] && exit 1

APP_PATH="$FLATPAK_INST/app/$APP_REF/active"

RUNTIME_REF=$(awk -F'=' '$1=="runtime" { print $2 }' < "$APP_PATH/metadata")
RUNTIME_PATH="$FLATPAK_INST/runtime/$RUNTIME_REF/active"

exec flatpak-spawn \
--env=LD_LIBRARY_PATH=/app/lib \
--app-path="$APP_PATH/files" \
--usr-path="$RUNTIME_PATH/files" \
-- keepassxc-proxy "$@"
4. Go to the folder ~/.var/app/org.mozilla.firefox/.mozilla/ and create a folder named "native-messaging-hosts". Afterwards, in that folder create "org.keepassxc.keepassxc_browser.json". Open it in an editor and paste in:
{
"allowed_extensions": [
"keepassxc-browser@keepassxc.org"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/var/home/USERNAME/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh",
"type": "stdio"
}
{
"allowed_extensions": [
"keepassxc-browser@keepassxc.org"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/var/home/USERNAME/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh",
"type": "stdio"
}
make sure to replace USERNAME with your own 5. Making the script executable (REQUIRED)
chmod +x ~/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh
chmod +x ~/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh
4.1 if that doesn't work then attempt to use this (also replace USERNAME):
{
"allowed_extensions": [
"keepassxc-browser@keepassxc.org"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/home/USERNAME/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh",
"type": "stdio"
}
{
"allowed_extensions": [
"keepassxc-browser@keepassxc.org"
],
"description": "KeePassXC integration with native messaging support",
"name": "org.keepassxc.keepassxc_browser",
"path": "/home/USERNAME/.var/app/org.mozilla.firefox/data/bin/keepassxc-proxy-wrapper.sh",
"type": "stdio"
}
ah, so it was a mistake. Because that is what I put into my json file lol.I also tested it with the fixed version and didn't work btw
cube
cube•5mo ago
lol i was about to say at least we solved the mystery but ig not
bonk
bonkOP•5mo ago
I would try and reinstall bazzite but if it's going to be fixed later on I won't bother.
cube
cube•5mo ago
yeah dont reinstall yet
cube
cube•5mo ago
i used an ai to write a script for the whole workaround though it looks very over engineered. havent tested it either (i have a working system and dont want it to break somehow lol)
bonk
bonkOP•5mo ago
@cube yoo guess what! It worked on a reinstalled version of bazzite :beagle_happy: oh and sorry for ping. I had to reinstall the os because I just messed the os too much 💀
cube
cube•5mo ago
hey no worries about the ping, im glad it worked at the end oops sorry i really forgot to turn off the ping myself lol
CheckYourFax
CheckYourFax•5mo ago
Okay @bonk what is the exact method without requiring to build a proxy? I'm testing now
bonk
bonkOP•5mo ago
Well the fix or method is just following the steps above. The github is just put there as a source on where it's from. This was the method that worked for me without issues unlike the other method which required more tinkering with stuff, from which this method FAILED to work afterwards. I am not a linux expert so, I am just posting what I can so others can find the solution easier

Did you find this page helpful?