HOW-TO: Ubuntu 22.04.03 Desktop clean install, reliably get Firefox integration working
I find myself reinstalling Ubuntu onto bare-metal or VM environments quite often. We're talking scorched earth, nuke the drive partition table and reformat, clean install from ISO or USB.
I follow these steps, gleaned from numerous threads in this community and on Reddit, to reliably get the 1Password for Linux app full integrated with the 1Password for Firefox browser plugin. Unlocking one unlocks the other, as intended. I figured I'd share these steps for posterity.
On a freshly installed Ubuntu Desktop 22.04.03 system:
sudo snap install curl
Then use curl to trust the official 1Password apt repo keys, configure the repo, and install the latest 1Password for Linux app via apt per this procedure (which the 1Password team keeps up to date):
https://support.1password.com/install-linux/#debian-or-ubuntu
Next, remove the Ubuntu default Snap packaged version of Firefox and install the .deb packaged version from the Mozilla maintained apt repos per this procedure (which the blog's author, Joey Sneddon, seems to keep up to date):
https://www.omgubuntu.co.uk/2022/04/how-to-install-firefox-deb-apt-ubuntu-22-04
It seems like eventually, Snap packaged versions of Firefox should support the Native Messaging features that the 1Password Firefox browser extension (on Linux) uses to talk to the 1Password for Linux app. But as of this writing, it does not.
Once you've got your .deb packaged version of Firefox installed, you can now install the 1Password for Firefox browser extension:
https://addons.mozilla.org/en-US/firefox/addon/1password-x-password-manager/
And finally, the magic sauce. You need to enable some AppArmor Native Messaging permissions to allow the Firefox extension to communicate with the 1Password for Linux app. This requires editing a config file, for which I use vim (sudo apt install vim).
sudo vim /etc/apparmor.d/usr.bin.firefox
Add this at the bottom of the config file, but BEFORE the closing curly brace }
# Native Messaging
owner @{HOME}/.mozilla/**/native-messaging-hosts/** ixr,
# 1Password extension
/opt/1Password/1Password-BrowserSupport ixr,
/run/user/1000/1Password-BrowserSupport.sock ixr,
/run/user/1000/1Password-BrowserSupport.sock wr,
Save the file (:wq for you non-VI folks), then:
close Firefox
close the 1Password app for Linux
Restart apparmor:
sudo systemctl restart apparmor
And now your 1Password for Firefox Extension should unlock with the 1Password app for Linux, and vice versa. Hope this helps!
1Password Version: 8.10.9
Extension Version: 2.13.0
OS Version: Ubuntu
Browser: Firefox
