andy-portmen/external-application-button

Doesn't work on Ubuntu 22.04 because browser cannot access native client

SuperSonicHub1 opened this issue · 4 comments

See darktrojan/openwith#334 for a similar issue.

I have it running fine on Ubuntu 22.04, but don't remember how I've installed and configured it.

My similar/same problem was because of AppArmor. I fixed it by adding the following lines to /etc/apparmor.d/local/usr.bin.firefox :

@{HOME}/.config/com.add0n.node/* r,
@{HOME}/.config/com.add0n.node/run.sh ix,
/usr/bin/node ix,

After that, I ran sudo systemctl reload apparmor.service and got the connection working.

The actual script will need AppArmor settings defined, too, but I don't have time for that now.

OS: Ubuntu 22.04.1 LTS
Firefox: 110.0.1+build2-0ubuntu0.22.04.1~mt1 (from apt repository ppa:mozillateam/ppa)

With waterfox on flatpack or anything with flatpak you just need to enable access for the plugin in the sandbox.
Setup the startup command to include it:
flatpak --filesystem=$HOME/.config/com.add0n.node run net.waterfox.waterfox
Also add the path to the application/script you are running.

My similar/same problem was because of AppArmor. I fixed it by adding the following lines to /etc/apparmor.d/local/usr.bin.firefox :

@{HOME}/.config/com.add0n.node/* r,
@{HOME}/.config/com.add0n.node/run.sh ix,
/usr/bin/node ix,

After that, I ran sudo systemctl reload apparmor.service and got the connection working.

The actual script will need AppArmor settings defined, too, but I don't have time for that now.

OS: Ubuntu 22.04.1 LTS Firefox: 110.0.1+build2-0ubuntu0.22.04.1~mt1 (from apt repository ppa:mozillateam/ppa)

As stated, this gets the Native Messaging client working, but not the add-on itself. If someone could post the AppArmor settings for the actual script, that would be fantastic. Perhaps @AnttiBoman has the time now? 😄

OS - KDE Neon User Ed. (Ubuntu 22.04 LTS base) with FF from the Mozilla PPA - 118.0 (but issue has been present since about FF 106 regarding any add-on's Native Messaging client).

EDIT: I installed Firefox manually following the instructions from their website. All Native Messaging add-ons work without issue now. Note that the manually installed Firefox needs to be the same version (or greater) as the currently installed one to use the same profile. Firefox sync may only get your add-ons and bookmarks back if the versions differ.