This is not my work, but I wanted to share it here because it's a great hack. I found it on this 1Password forum thread. The original author is Sn0wCrack.
This is a hack, and it's not recommended to do this on a system where flatpak sandboxing is desired.
I will use the org.mozilla.firefox
flatpak as an example, but this should work with any flatpak packaged firefox, I have only tried with the official package.
-
Add
org.freedesktop.Flatpak
to the System Bus Talks.If someone is smarter than me and knows how to do this without using flatseal please let me know.
Go to Flatseal and add
org.freedesktop.Flatpak
to the System Bus Talks.For reference check the other file in this gist.
-
Create the global 1Password configuration directory.
sudo mkdir -p /etc/1password
-
Add
flatpak-session-helper
as an allowed browser.echo "flatpak-session-helper" | sudo tee /etc/1password/custom_allowed_browsers
-
Create a 1Password helper in Firefox's flatpak.
We will create a wrapper script that will call the 1Password Browser Support binary with the
flatpak-spawn --host
command.mkdir -p ~/.var/app/org.mozilla.firefox/data/bin echo -e "#!/bin/bash\n\nflatpak-spawn --host /opt/1Password/1Password-BrowserSupport \"\$@\"" | tee ~/.var/app/org.mozilla.firefox/data/bin/1password-wrapper.sh chmod +x ~/.var/app/org.mozilla.firefox/data/bin/1password-wrapper.sh
-
Allow Native Host Messaging for the 1Password extension.
mkdir -p ~/.var/app/org.mozilla.firefox/.mozilla/native-messaging-hosts echo '{ "name": "com.1password.1password", "description": "1Password BrowserSupport", "path": "/home/$USER/.var/app/org.mozilla.firefox/data/bin/1password-wrapper.sh", "type": "stdio", "allowed_extensions": [ "{0a75d802-9aed-41e7-8daa-24c067386e82}", "{25fc87fa-4d31-4fee-b5c1-c32a7844c063}", "{d634138d-c276-4fc8-924b-40a0ea21d284}" ] }' | envsubst | tee ~/.var/app/org.mozilla.firefox/.mozilla/native-messaging-hosts/com.1password.1password.json
-
Restart Firefox and 1Password.
-
Profit!
Thank you for this neat summary/guide ✨
This worked for me: