The pre-installed Firefox Snap package in Ubuntu 22.04 & 22.10 now works again for native messaging support. Meaning user can now make it work with GSConnect, KeePassXC, Plasma extension, and/or installing Gnome Shell Extensions,
As you may know, Ubuntu switched to the Snap version of Firefox that runs in sandbox since 21.10. Which, however broke the feature to exchange messages with native applications.
Thanks to Flatpak team for working on a new WebExtensions XDG desktop portal and its integration in Firefox. The new native messaging feature is available for testing for a few months in beta channel. And, it’s made int stable channel just a few days ago.
How to Get it
If you’re now using Firefox as Snap, just wait it will automatically update to the latest version with the new feature. Or, open terminal by pressing Ctrl+Alt+T on keyboard and run command:
sudo snap refresh firefox --stable
And install the XDG desktop portal package by running command in terminal. Also install chrome-gnome-shell
if you want to use Firefox to install Gnome shell extensions.
sudo apt update && sudo apt install xdg-desktop-portal
For switching from Firefox .deb package back to Snap, just remove PPA priority file (if any) under ‘/etc/apt/preferences.d/’ directory, then run the command below in terminal:
sudo apt update && sudo apt install firefox
Finally launch Firefox, install or visit the page that need native message exchange. It will pop-up a dialog asks user to grant the permission.
I am running Firefox 115.0.2 (64-bit) on Ubuntu 23.04. I’m getting the “Native messaging portal is not available” message, starting today. I tried your suggestions, but I have the latest Firefox snap, and xdg-desktop-portal is already the newest version (1.16.0-2ubuntu1).
Any ideas?