ff2mpv
ff2mpv copied to clipboard
Support for snap/flatpak distributions of Firefox
ff2mpv seems to no longer work in Firefox 99
starting from 99 firefox moved to snap, but their migration tool did not copy the native-messaging-hosts/ff2mpv.json
(and others?) file.
the profile root that used to be ~/.mozilla
is now in ~/snap/firefox/common/.mozilla/
copying ff2mpv.json
to ~/snap/firefox/common/.mozilla/native-messaging-hosts/ff2mpv.json
did not help
Could you please fill out the entire bug report template? It provides the context I need to help debug this.
For context: I'm running Firefox 99 on Ubuntu LTS (20.04) using the recommended installation, and ff2mpv works correctly for me. snap
is still not the recommended way to install Firefox on Linux distributions, because its isolation/sandboxing mechanism causes problems like these.
Could you please fill out the entire bug report template? It provides the context I need to help debug this.
i'll get to it ASAP
snap
is still not the recommended way to install Firefox on Linux distributions,
I'm on Ubuntu 22.04, so I am a voice from the future =)
https://news.itsfoss.com/ubuntu-firefox-snap-default/
@woodruffw is ff2mpv impossible with snap?
Firefox-ESR is still a proper deb package on 22.04, but its only a matter of time till ff2mpv becomes totally useless in Ubuntu ≥20.10 :(
is ff2mpv impossible with snap?
I don't know if it's impossible, but it's probably more difficult given snap
's pseudo-isolation.
I ran into a similar problem while trying to test ff2mpv on Chrome/Chromiuim via snap
-- the default native messaging directories weren't respected, and neither were the "isolated" ones.
Looks like this isn't a new problem:
- https://forum.snapcraft.io/t/firefox-support-native-messaging/11068
- https://bugzilla.mozilla.org/show_bug.cgi?id=1661935
I'm going to follow up on that BMO bug report, since it looks like Mozilla's devs are already aware this this is going to be a problem.
Edit: Ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1661935
FWIW, I tested this extension and the native host connector with https://phabricator.services.mozilla.com/D140803 built in the firefox snap, and I'm happy to report that it works as expected. This is still work in progress, but it is getting closer to a releasable state.
FWIW, I tested this extension and the native host connector with https://phabricator.services.mozilla.com/D140803 built in the firefox snap, and I'm happy to report that it works as expected. This is still work in progress, but it is getting closer to a releasable state.
That's great news! Thanks for testing that.
It sounds like we might want to add some additional documentation to the wiki when the new LTS fully rolls out, but otherwise that there are no major changes needed to ff2mpv itself. Am I understanding that correctly?
That's correct, no functional changes should be required, other than a documentation update.
Excellent. We'll leave this open for now, just so other users who experience breakage during the packaging change have a place to look.
Pinging back on this: can any users confirm that this extension is working correctly for them with the snap-ified distribution of Firefox in 22.04?
tested with Firefox 100 from snap: does not work
works fine with straight .deb distributions though. firefox-next ppa doesn't use snap :+1:
same here for flatpak...it doesn't works
Another pingback: I'll probably upgrade my own machine when 22.04.1
is released, which will likely be in the next couple of weeks. If it's still broken when that happens, I'll try and fix it...
This doesn't work in Ubuntu 22.04 out of the box just yet, but is being addressed. Please see the corresponding call for testing. I personally tested ff2mpv and got it working, if you're seeing something different please comment on that thread. Thanks!
I upgraded today, and this is the only command I needed to run to get things working:
flatpak permission-set webextensions ff2mpv snap.firefox yes
(I did need to install flatpak
via sudo apt install -y flatpak
).
Could someone else in this thread confirm that the above makes the extension work for them? If so, I'm inclined to close this as fixed upstream (albeit in an annoying manner).
Forgot to mention: I did have to switch to the "beta" channel:
sudo snap refresh firefox --beta
A couple of comments on this:
- In theory one should be prompted for permission by their desktop environment (GNOME Shell displays a modal prompt) the first time firefox requests access to a given native application through the portal. Choosing yes means no further action needed, but it could be that other desktop shells haven't implemented that prompt yet, and so the permission defaults to "no".
- The use of the flatpak command is quite confusing indeed. This is because the permissions database, even though it’s not flatpak-specific (it’s also used for snaps), doesn’t have its own separate management tool yet.
- As you mentioned, this is not available in a stable version of firefox yet, you'll need to use the snap from the beta or edge channel for now. I'm hoping this will land very soon in stable, but until that happens it's probably premature to mark it fixed.
Thanks for these comments!
The point about the permission prompt makes sense: I'm using i3wm
, which probably doesn't have support for this kind of stuff. It's good to know that the experience should be smoother for most other users.
This has been working for me with the snap-ified Firefox on Ubuntu 22.04 for the last two weeks, so I'm closing it.
I upgraded today, and this is the only command I needed to run to get things working:
flatpak permission-set webextensions ff2mpv snap.firefox yes
(I did need to install
flatpak
viasudo apt install -y flatpak
).Could someone else in this thread confirm that the above makes the extension work for them? If so, I'm inclined to close this as fixed upstream (albeit in an annoying manner).
This doesn't work for firefox 112 with flatpak...
- copied ff2mpv.json to ~/.var/app/org.mozilla.firefox/.mozilla/native-messaging-hosts
- changed the path of ff2mpv.py
- gave a permission: flatpak permission-set webextensions ff2mpv org.mozilla.firefox yes
Maybe it is just solved for only snap` firefox atm
EDIT: made it work according to these instructions