jlebon / textern

A Firefox add-on for editing text in your favourite external editor!
GNU General Public License v3.0
138 stars 21 forks source link

for global install, put textern.json in /usr/lib/mozilla/native-messaging-hosts #51

Closed jmcclelland closed 4 years ago

jmcclelland commented 5 years ago

On debian buster, /usr/lib64/mozilla/native-messaging-hosts does not seem to be consulted.

But, putting textern.json in /usr/lib/mozilla/native-messaging-hosts works.

Mozilla claims it can be stored in either /usr/lib64/native-messaging-hosts/ or /usr/lib/native-messaging-hosts, so maybe this is a debian bug?

I'm not sure if there are platforms where it only works in /usr/lib64 - but maybe you could copy it into both locations?

jlebon commented 4 years ago

Hmm yeah, pretty sure this is because of Debian's multiarch strategy.

Quickly glancing at the Firefox source, it only looks at either /usr/lib or /usr/lib64, based on the standard libdir build var. And indeed testing on my x86_64 Fedora machine, installing to /usr/lib does not work.

I'm not sure if there are platforms where it only works in /usr/lib64 - but maybe you could copy it into both locations?

Yeah, that would work but is a bit too hacky for my tastes. :)

Anyway, I think the best thing we can do for this is to just make it easily configurable and document it. Fixed in https://github.com/jlebon/textern/commit/3b154ca7dc069c3a3e849c03ac4246a2cfe33dc4!