
{"id":43299,"date":"2022-11-07T10:48:26","date_gmt":"2022-11-07T10:48:26","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=43299"},"modified":"2022-11-07T10:48:26","modified_gmt":"2022-11-07T10:48:26","slug":"firefox-ubuntu-22-04-native-messaging","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2022\/11\/firefox-ubuntu-22-04-native-messaging\/","title":{"rendered":"Firefox in Ubuntu 22.04 Finally Get Back Native Messaging Support"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-34790\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-250x250.png\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-250x250.png 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-300x300.png 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-600x600.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature-768x768.png 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2021\/10\/firefox-icon-feature.png 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>The pre-installed Firefox Snap package in Ubuntu 22.04 &amp; 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,<\/p>\n<p>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.<\/p>\n<p>Thanks to Flatpak team for working on a new <a href=\"https:\/\/github.com\/flatpak\/xdg-desktop-portal\/pull\/705\" target=\"_blank\" rel=\"noopener\">WebExtensions XDG desktop portal<\/a> and its integration in Firefox. The new native messaging feature is <a href=\"https:\/\/discourse.ubuntu.com\/t\/call-for-testing-native-messaging-support-in-the-firefox-snap\/29759\/7\" target=\"_blank\" rel=\"noopener\">available for testing<\/a> for a few months in beta channel. And, it&#8217;s made int stable channel just a few days ago.<\/p>\n<div id=\"attachment_43300\" style=\"width: 610px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/firefox-snap.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-43300\" class=\"size-large wp-image-43300\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/firefox-snap-600x384.webp\" alt=\"\" width=\"600\" height=\"384\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/firefox-snap-600x384.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/firefox-snap-300x192.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/11\/firefox-snap.webp 672w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><p id=\"caption-attachment-43300\" class=\"wp-caption-text\">Firefox as Snap<\/p><\/div>\n<h3>How to Get it<\/h3>\n<p>If you&#8217;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 <b>Ctrl+Alt+T<\/b> on keyboard and run command:<\/p>\n<pre>sudo snap refresh firefox --stable<\/pre>\n<p>And install the XDG desktop portal package by running command in terminal. Also install <code>chrome-gnome-shell<\/code> if you want to use Firefox to install Gnome shell extensions.<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt install xdg-desktop-portal<\/pre>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-42714\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal-600x218.webp\" alt=\"\" width=\"600\" height=\"218\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal-600x218.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal-300x109.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal-768x279.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/apt-xdg-desktop-portal.webp 773w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>For switching from Firefox .deb package back to Snap, just remove PPA priority file (if any) under &#8216;\/etc\/apt\/preferences.d\/&#8217; directory, then run the command below in terminal:<\/p>\n<pre>sudo apt update &amp;&amp; sudo apt install firefox<\/pre>\n<p>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.<\/p>\n<div id=\"attachment_42717\" style=\"width: 516px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/firefox-snap-grant-permission.webp\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-42717\" class=\"size-full wp-image-42717\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/firefox-snap-grant-permission.webp\" alt=\"\" width=\"506\" height=\"243\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/firefox-snap-grant-permission.webp 506w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/07\/firefox-snap-grant-permission-300x144.webp 300w\" sizes=\"auto, (max-width: 506px) 100vw, 506px\" \/><\/a><p id=\"caption-attachment-42717\" class=\"wp-caption-text\">Firefox Snap ask for native messaging permission<\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>The pre-installed Firefox Snap package in Ubuntu 22.04 &amp; 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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34790,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[1194],"class_list":["post-43299","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-firefox"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=43299"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/43299\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/34790"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=43299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=43299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=43299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}