I have a Firefox extension calling a native messaging host on Linux (CentOS 8 Stream); here is the declaration of the host :
{
"name" : "myhost",
"description" : "My Host Description",
"path" : "/home/benoit/my_app",
"type" : "stdio",
"allowed_extensions" : [ "myhost@mydomain.com" ]
}
my_app is a simple executable file (chmod 755), created with account root, than opens the notepad (/usr/bin/gedit)
However, this doesnt work and I get the following error from the firefox console:
Failed to execute command "/home/benoit/my_app"
startupPromise resource://gre/modules/NativeMessaging.jsm:113
The surprising part is that if I use the actual binary of notepad directly
"path" : "/usr/bin/gedit"
it opens a notepad successfully.
So I tried moving my_app to /usr/bin/my_app, with the same permissions as /usr/bin/gedit, still under root account, but I again got the following error in the firefox console:
Failed to execute command "/usr/bin/my_app"
Quick note: my_app is working fine when testing with another test Chrome extension.
I feel like I am missing a setting or a constraint somewhere, but I have no idea what it is. Any thought?