Firefox: Support Native Messaging


Currently it is hard to use addons that make use of Native Messaging. I suggest to add a readonly content plug so other snaps can provide the necessary files for Native Messaging. Something like

    content: native_messaging_hosts
    target: $SNAP_USER_COMMON/.mozilla/native-messaging-hosts

This is not perfect. It means that there can only be one addon that uses Native Messaging at a time. Also according to path does not support relative paths. That makes it hard to set the correct path for the executable. But I think having this plug is better than having no way to use another snap for Native Messaging.


The problem is similar to bug #1741074 in the chromium snap.

I haven’t tested with the firefox snap yet, but I have managed to make a simple native host connector run with the chromium snap (see bug report), so I will try to replicate this with firefox.