I'm working on Arch Linux OS where I use Firefox 91.10.0esr (so, Firefox ESR) and I'm looking for a way to install silently Firefox addons by using terminal. I'm aware of methods to install them by calling the downloaded addon .xpi as
firefox-esr <addon-name>.xpi
but it opens Firefox and asks for a further confirmation of the installation.
My purpose is to perform the installation of the .xpi file only by command line without interact with the browser GUI and avoid the further install confirmation (the "Add" button on the popup opened by the browser).
According to several sources (i.e., https://askubuntu.com/questions/73474/how-to-install-firefox-addon-from-command-line-in-scripts) where the process is explained for addons that contain install.rdf
file, it is easy to manage this case.
My issue is related to those .xpi files that don't include a install.rdf
file containing the ID of the application.
For example, if we consider FoxyProxy addon and we download it and extract it:
mkdir foxyproxy && cd foxyproxy
wget https://addons.mozilla.org/firefox/downloads/file/3611407/foxyproxy_standard-7.5.1.xpi
unzip foxyproxy_standard-7.5.1.xpi
among the extracted files, there is not a install.rdf
file containing the usual hexadecimal ID of the extension.
The only ID I can see is inside the manifest.json
file that does not have the hexadecimal format. Taking for example FoxyProxy, I tried to use its ID foxyproxy@eric.h.jung
by making the process like:
mkdir -p /usr/share/mozilla/extensions/foxyproxy@eric.h.jung
or
mkdir -p /home/user/.mozilla/extensions/foxyproxy@eric.h.jung
and then copy all the unzipped content of.xpi in one of these directories, but with no luck.
Is it possible to install by CLI this kind of addons with no install.rdf
file?