-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KeePassXC-browser native messaging does not work with flatpak #92
Comments
You may be able to expose
Or perhaps use the Perhaps the cleanest way would be to be able to pass some kind of |
Hi @wvengen, unfortunately I cannot hardlink native-messaging-hosts because it's actually a directory, not a file. The closest thing I can think is:
but even like this it doesn't work. With regard to the |
@oidualc Can we maybe change the title of this issue to something like "KeePasssXC-browser' native messaging does not work with flatpak", which is more specific than the current one? |
BTW a workaround has been provided in this issue (or here) that works if KeePassXC is also installed as a flatpak. |
Thank you @rugk for your effort to solve this issue. With the wrapper script my native FF doesn't start KeePassXC in parallel, as intended. The flatpaked version of FF (this repo) still doesn't connect to the flatpaked KeePassXC. |
Okay, hmm. Note I have also been advised that DBUS could be used to spawn another process, but AFAIK this is a thing that would have to be baked in, into this browser flatpak. (@xhorak, are you listening?) @kaymio If you want to try it, you can create the following wrapper script as a workaround somewhere accessible to the Firefox flatpak (and keepassxc too, AFAIK, so in the worst case use #!/bin/sh
flatpak-spawn --host keepassxc-proxy "$@" I've based this loosely on my other scripts here. Then This should allow Firefox to spawn a keepassxc-proxy on the host, so if keepassxc runs on the host, it works. So now, you may want both (also KeePassXC) as flatpaks. So we also need to do step 4 here, which may end up in a script like this: #!/bin/sh
flatpak-spawn --host /usr/bin/flatpak run --command=keepassxc-proxy --branch=master --arch=x86_64 org.keepassxc.KeePassXC "$@" I am just not sure whether the whole thing with unix sockets and so on still works. In any case, take these as ideas, I guess it won't work exactly like this and there may still be bugs. |
Unfortunately my skill level is not high enough to meddle that deeply with the system. Especially if it goes that deep:
Nonetheless, thx! PS: There was some movement during the flatpak update today. Although it finished with an error. |
Unless it is fixed in the next second, yes. 😄 (also noticed that issue already) |
@rugk your solution works for a flatpaked-firefox and a host-keepassxc, but it allows firefox to run arbitrary commands on the host, which severely reduces the benefit of running FF in a flatpak. :/ any idea how to restrict it further? |
Well… unfortunately I do not have any better idea. Because you need to grant Firefox host execution permissions or it just does not work, as it needs to spawn a command. 🤔 |
Okay maybe another idea I am not quite sure whether it works: AFAIK KeePassXC also supports some kind of "reverse connection", where KeePassXC actually spawns the proxy. This way KeePassXC could possibly spawn it inside of the Firefox flatopak. (via |
FYI, for everyone following: I have found a working around involving some manual steps you need to do though for KeePassXC<->Firefox communication, if Firefox is flatpaked/sandboxed (works if KeePassXC is sandboxed or not). Read the full write-up/tutorial here. |
This can not be soved in flatpackaging. There's upstream issue https://bugzilla.mozilla.org/show_bug.cgi?id=1621763 for native messaging in flatpak. |
Subject of the issue
KeePassXC-Browser is unable to connect to KeePassXC, likely a problem with Native Messaging.
Probably relevant, the needed file
org.keepassxc.keepassxc_browser.json
is available in~/.mozilla/native-messaging-hosts
, but not in~/.var/app/org.mozilla.FirefoxNightly/.mozilla
. In fact the directorynative-messaging-hosts
is missing.Environment
Steps to reproduce
Assuming the availability of a working instance of KeePassXC, install the KeePassXC-Browser addon and try to connect.
Expected behaviour
After having verified that on Firefox Nightly (non-flatpak) the extension works correctly, try to connect using Firefox Nightly (flatpak) and expect it working the same way.
Actual behaviour
On Firefox Nightly (non-flatpak) the extension works as intended, on Firefox Nigthly (flatpak) the error message is "Timeout or not connected to KeePassXC".
The text was updated successfully, but these errors were encountered: