I really dislike snap, so I decided to uninstall and use apt
KeepassXC browser integration was working with the snap version, but not with apt version. So, I tried to revert, and it was no longer working with snap.
Hours later, I solved it and managed to have the Firefox apt version connecting with KeepassXC without deactivating the apparmor protection. I primarily based my solution on the KeepassXC Troubleshoot:
- . Add the rules below to
/etc/apparmor.d/usr.bin.firefox
just somewhere before you encounter the first profile (in my case it is called profile lsb_release
):
# Native Messaging
owner @{HOME}/.mozilla/**/native-messaging-hosts/** ixr,
/usr/bin/keepassxc-proxy ixr,
/run/user/1000/org.keepassxc.KeePassXC.BrowserServer ixr,
/run/user/1000/app/org.keepassxc.KeePassXC/org.keepassxc.KeePassXC.BrowserServer wr,
(DISCLAIMER: no idea how important is the place where you add this)
- Save the file and restart apparmor
sudo service apparmor restart
- Restart Firefox, if necessary.
Still not working?
If your problem is associated to apparmor, you will find the errors in the syslog:
Try to connect keepassXC from Firefox (to make sure that the error is at the end of the syslog)
Search for errors associated to syslog: tail -n 100 /var/log/syslog | grep keepass
Or to Firefox: tail -n 100 /var/log/syslog | grep firefox
This comment helped me get an idea of what is happening.
firefox
fixes will only land when Mozilla deem them ready/stable. – guiverc Apr 22 '22 at 23:02