KeePassXC-Browser in Chromium won't connect to KeePassXC even when database is open and Chromium is checked.


KeePassXC-Browser works in Firefox.

Connect.
KeePassXC:
KeePassXC - Community-driven port of the Windows application “KeePass Password
Safe”
ID: org.keepassxc.KeePassXC
Ref: app/org.keepassxc.KeePassXC/x86_64/stable
Arch: x86_64
Branch: stable
Version: 2.3.4
License: GPL-3.0+
Origin: flathub
Collection: org.flathub.Stable
Installation: system
Installed: 13.5 MB
Runtime: org.kde.Platform/x86_64/5.12
Sdk: org.kde.Sdk/x86_64/5.12
Commit: 03a58a317bdf7107cde8f31c30bc5bb0fd4dd2e5d8761b7df324e84c5bda24c9
Parent: 8702d16b321c4ed61f14f7e9dbbccea84cef01f369b474655f680277ddc79bb6
Subject: Update sdk to 5.12 (0ba59621)
Date: 2019-01-22 15:52:59 +0000
KeePassXC-Browser Version: _1.3.2_
Operating system: Linux
Description: Ubuntu 18.04.1 LTS
Snap:
snap 2.37.1
snapd 2.37.1
series 16
ubuntu 18.04
Flatpak:
Flatpak 1.2.0
Browser: Chromium
Name Version Rev Tracking Publisher Notes
chromium 71.0.3578.98 566 stable canonical* -
Browser: Firefox
Mozilla Firefox 65.0
Using a Snap version of a browser requires you to manually embed the configuration file. This is because snaps install configuration files in non-standard locations.
Well, how would it work? I only know how to use KeePassHTTP in the case. If you mean the configuration file is the NativeMessagingHosts/org.keepassxc.keepassxc_browser.json then it doesn't work whether I move or copy it.
You need to move ~/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json to ~/snap/chromium/current/.config/chromium/NativeMessagingHosts/
You will have to create the NativeMessagingHosts folder.
Although even after doing that it does not look like you can communicate to a process outside of the snap sandbox. This is not something we can fix.
You're right, that didn't solved it. One way it would work is with KeePassHTTP which will be deprecated soon.
I recommend using autotype coupled with an extension that changes the window title based on the website you are on. Or don't use a browser in a snap.
Just adding a comment that as of Ubuntu 19.10 eoan Chromium is only available as a snap.
That's disappointing. What's worse is the Chrome add-on Keepass Tusk is no longer maintained and there's a lack of similar standalone add-ons for using .kdbx files. So far what's left for Ubuntu 19.10 and later is relying solely on using Auto-Type.
The situation (lake of solution to have a password safe working with Chromium on Ubuntu ) means that I will not use Chromium any more.
For context, this isn't just impacting us. Any extension that uses native messaging will not work in a browser installed as a snap. The snap developers need to add a plug for native messaging or similar.
Would it be possible to make this work if Chromium is installed with classic confinement? (Which in practice means unconfined.) I'd be glad to test it if I knew what I should do to check it.
Possibly yes
Possibly yes
I would be glad if you could give me a hint on how to try it.
Sorry to say I asked the snapcrafters and it doesn't seem to be possible to install Chromium with classic confinement, so we'll have to wait until they fix whatever is needed in the snaps.
As others have pointed out, there doesn't seem to be a fix given the state of snaps.
I have found a workaround however:
This hack directly runs chromium from the snap. So I it might not be as secure as running it within the snap.
Overrule chromium_chromium.desktop from snap:
cp /var/lib/snapd/desktop/applications/chromium_chromium.desktop ~/.local/share/applications/chromium_chromium.desktopcreate symlink to /usr/local/bin/chromium
** sudo ln -sf /snap/chromium/current/usr/lib/chromium-browser/chrome /usr/local/bin/chromium
I have been running this for a couple of weeks now, on 2 machines and it works just fine. I have encountered 2 minor issues:
edit: I have been running thius setup for some time now, updated the snap, made the dist upgrade form 20.04 to 20.10 and it works fine. If you have multiple launher icons, make sure the WM_CLASS repirted by chrome(ium) (xprop WM_CLASS and select the chrome(ium) window) and the StartupWMClass in the desktop-file match,
I hope this helps.
@derflocki oh, man! That works! Just wanted to confirm.
save
on
~/.local/share/applications/chromium_chromium.desktop
and start chromium with double-click on this.
fine.
Most helpful comment
Just adding a comment that as of Ubuntu 19.10 eoan Chromium is only available as a snap.