darktrojan/openwith

open_with_linux.py cannot treat Firefox Snap-install since Kubuntu 22.04

Opened this issue · 7 comments

Hi,

Ubuntu changed Firefox to Snap-Packaging since 22.04
https://wiki.ubuntu.com/JammyJellyfish/ReleaseNotes/Kubuntu

Therefor, the executable and the profile now reside in: ~/snap/firefox/common/.mozilla/ instead of ~/.mozilla

running "open_with_linux.py install" in Version 7.2.6 will create:
~/.mozilla/native-messaging-hosts/open_with.json
I had to manually copy it over to:
~/snap/firefox/common/.mozilla/native-messaging-hosts/open_with.json
to make it work.

The old ~/.mozilla/ folder is still around - maybe, they didn't dare to delete it. There's even a full copy of my profile untouched ... almost 1 GB of HDD wasted ... erm I mean of Backup. So to detect a snap install you could run:

$ which firefox
/snap/bin/firefox

Moreover: The download of open_with_linux.py from the addon-option-page was refusing to save in ~/bin ... I had to write the python script to ~/Downloads first and move it to ~/bin ... it seems, the snap-sandbox is interfering with writing to ~/bin directly for safety reasons ???
https://askubuntu.com/questions/1033344/how-to-give-snaps-access-to-somedir

OK, it is still not working ... I had to move the python script out of ~/bin again, because the add-on can detect the version, but cannot start it in there. Now with a different location, I get this in the Browser-Console:
20:15:49.336 Promise rejected after context unloaded: Actor 'Conduits' destroyed before query 'RuntimeMessage' was resolved [action.js:70](moz-extension://97686263-2a76-4910-aba6-1d7c89fe43a9/action.js) onclick moz-extension://97686263-2a76-4910-aba6-1d7c89fe43a9/action.js:70 20:15:51.670 Error: Invalid window ID: -1 undefined

At least this shares the magic ID with Open_With options page:
moz-extension://97686263-2a76-4910-aba6-1d7c89fe43a9/options.html

I'm also having this issue. @hklene Have you made any headway in the last month?

I'm having the exact same issue with Kubuntu 22.04 and Firefox snap. Is it even possible for a snap-application to start other programs? I mean, it would kind of defeat the purpose of a sandbox.

I used the "open with"-add on a lot and I'm afraid I have to uninstall firefox-snap and switch to a .deb package.

Same here, does not work with firefox snap or flatpak. I also dont get ANY console output.

edit: nvm, the answer was ctrl+shift+j

Has anybody found a solution for this problem in Firefox Snap?
Or another add-on?

@Filbuntu Haven't tested it yet, but did find this: https://github.com/andy-portmen/external-application-button

Developer's much more active, so he might be willing to help.

Our issues with executing binaries from Snap could be solved if commands were instead run by a web server the browser connects to. That, of course, would require the extension to walk the user through setting up a process to run on startup with systemd: https://wiki.archlinux.org/title/Systemd