-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] Snap support #59
Comments
The path to the bridge is hardcoded in the path key of the native messaging manifest. It’s set during the build and can’t be specified at runtime. I don’t know much about snaps, can they actually execute binaries under $HOME? If so, it would be possible to provide two manifests, allowing for a backup path. I suppose the only way to allow user-editable paths would be to use an existing native messaging connection to generate a different manifest with that specified path, but I’m pretty sure that’s not what you’re looking for. |
I did some digging, and it seem like snaps with It seems like we could only try to contact a running process. (maybe, if we had the bridge running as a daemon?) |
I think it's worth trying and finding out. I can help with the testing. |
Firefox’s native messaging spawns new processes, so we can’t contact existing processes that way. Can a snap with strict confinement establish a local WebSocket (or HTTP) connection? We could have the bridge run as a daemon and provide the API that way instead. Probably the cleanest way to do that, without changing the existing bridge too much, would be a separate daemon process that mimics how Firefox spawns native messaging processes. |
Yes, I just looked at the Native Messaging API and that was my conclusion as well.
There's at least permissions for establishing network connections and listening for incoming network connections. The firefox snap should at least have the first of those two.
That might work. See also this thread. |
Just tested and WebSocket connections work with the snap, so it's viable. Originally, I was thinking a separate binary, but because of the way the Linux build is packaged, that just complicates things if it's going to be done in node. So, instead I'm thinking just a On the extension side, probably wrapping the |
Some progress in #60 Just the app-side. Doesn't work, but unless I'm missing something obvious, I think there's a |
The current state of things
Right now the extension is looking for the bridge under
/opt/fx_cast/
but inside a snap, Firefox is unable to read such directory.A possible approach
Under Linux, when
/opt/fx_cast/bridge
fails to be found, could it be possible to look for the bridge under a user-owned directory (like $HOME, for example)? Maybe a symlink could make the trick in such case.Another possible approach
Give the user the option to indicate the path under which the bridge is located.
Note
I'm not by any means a Linux nor a Firefox extensions expert. But I'd like to try fx_cast without giving away the option of using Firefox as a snap (I like it to has limited access to my system).
The text was updated successfully, but these errors were encountered: