Installing/activating plugins via script

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
Peregrine

Installing/activating plugins via script

Unread post by Peregrine » 2018-01-16, 16:58

To install and activate plugins, one generally needs to not only copy the plugins to /palemoon_extensions but also go to file:///tmp/palemoon_extensions with pale moon (or alternatively /tmp/palemoon_extensions in the file browser) and then click on each individually. I was wondering whether I can't circumvent this requirement by using a script. Reason I ask is for the add-on palemoon package I'm having developed for gentoo.

If this can be done using a script , then what command do I actually need to put into that script ?
Last edited by Peregrine on 2018-01-16, 17:00, edited 3 times in total.

New Tobin Paradigm

Re: Installing/activating plugins via script

Unread post by New Tobin Paradigm » 2018-01-16, 17:02

Are we talking about plugins or extensions?
about:addons wrote:What are Add-ons?

Add-ons let you customize Pale Moon with extra functionality or a different look.

There are several types of add-ons. Extensions expand the capabilities of the browser, themes allow you to personalize Pale Moon's visual aesthetic, and plugins further extend the browser with specialized external components such as the Adobe Flash Player.
Last edited by New Tobin Paradigm on 2018-01-16, 17:03, edited 2 times in total.

Peregrine

Re: Installing/activating plugins via script

Unread post by Peregrine » 2018-01-17, 14:23

Plugins I think, here's the list of what I want to add and activate via the script:
calomel_ssl_validation-0.62.xpi
encryptedweb-5.1.1.xpi
noscript-2.6.9.39.xpi
ublock_origin-1.3.2.xpi
user_agent_overrider-0.2.4.xpi

I would also copy disconnect-3.15.3.xpi to the /palemoon_extensions map yet not activate this.

What's the command I need to put into the script to activate the above ?

New Tobin Paradigm

Re: Installing/activating plugins via script

Unread post by New Tobin Paradigm » 2018-01-17, 14:34

Those are extensions.

Peregrine

Re: Installing/activating plugins via script

Unread post by Peregrine » 2018-01-18, 13:18

New Tobin Paradigm wrote:Those are extensions.
Ok. But what's the command I need to put into the script ?

Peregrine

Re: Installing/activating plugins via script

Unread post by Peregrine » 2018-01-20, 15:13

I updated the extensions:

calomel_ssl_validation-0.62.xpi --> replaced with CipherFox 4.2.0 (https://addons.palemoon.org/addon/cipherfox/ )
encryptedweb-5.1.1.xpi --> to version 5.1.5 (https://addons.palemoon.org/addon/encrypted-web/ )
noscript-2.6.9.39.xpi --> to version 5.0.6 (https://addons.palemoon.org/addon/noscript/ )
ublock_origin-1.3.2.xpi --> to version 1.14.25rc1 (https://github.com/gorhill/uBlock/releases)
user_agent_overrider-0.2.4.xpi --> replaced with eclipsed moon (https://addons.palemoon.org/addon/eclipsedmoon/ )

With encryptedweb, the page says it doesn't work with pale moon 27 and up, however someone tested it with 27.0 and that worked (see https://www.reddit.com/r/palemoon/comme ... pale_moon/ ). That said, I'm going to use the 27.6.0 version. Anyone tested it with that ? Alternatively, I read I can also used the "enforce HTTPS" feature in NoScript; however I don't know whether there's a file I can change in NoScript to automatically redirect a webpage to https when available or whether there's a command or noscript entry in about:config that I can change. The FAQ gives no info on this: https://noscript.net/faq#forceHTTPS

For the installing of the plugins via script, will this command do the trick ?:
emerge gksu palemoon -install-global-extension extension_name.xpi
See https://askubuntu.com/questions/73474/h ... in-scripts
Last edited by Peregrine on 2018-01-20, 15:24, edited 1 time in total.

New Tobin Paradigm

Re: Installing/activating plugins via script

Unread post by New Tobin Paradigm » 2018-01-20, 15:27

New Tobin Paradigm wrote:Those are extensions.

JustOff

Re: Installing/activating plugins via script

Unread post by JustOff » 2018-01-20, 17:29

Peregrine wrote:palemoon -install-global-extension extension_name.xpi
-install-global-extension and -install-global-theme command line options were removed from Mozilla-based applications in 2010.

If you want to install extensions manually you need to rename each one to ID.xpi by taking ID is from the corresponding install.rdf, then copy them either to the extensions folder in the profile dir (~/.moonchild\ productions/pale moon/extensions/), or to /opt/palemoon/browser/extensions/ for global installation.

Note that /opt/palemoon/browser/extensions/ is not preserved between browser updates, there should be another folder for global installation (like /usr/lib/firefox-addons/extensions/ for Firefox), I hope someone more familiar with Pale Moon on *nix will suggest the correct path.

As an alternative for batch installation you can use FEBE add-on.
Last edited by JustOff on 2018-01-20, 17:40, edited 2 times in total.

Peregrine

Re: Installing/activating plugins via script

Unread post by Peregrine » 2018-01-21, 09:42

Ok. I found I could simply extract the xpi, and get the install.rdf
I then opened it with notepad++, and got the ID's.
I found however that many had exactly the same filenames:

noscript: {73a6fe31-595d-460b-a920-fcc0f8843232}
cipherfox: {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
ublock origin: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}

These had the same filenames:
encrypted web: {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}
eclipsed moon: {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}

Swapping out eclipsed moon with user agent overrider also didn't work, as this had again, ... a same filename.
user agent overrider: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}

Would simply changing the id in the install.rdf work, or will that give problems ?

PS regarding the path: the same paths are preserved, so I think it's /usr/share/mozilla/extensions/ that you mean, see https://linux.palemoon.org/help/faq/ .I'm keeping the regular path (opt/palemoon/browser/extensions/ ) as updating isn't possible anyway.
Last edited by Peregrine on 2018-01-21, 09:44, edited 1 time in total.

Peregrine

Re: Installing/activating plugins via script

Unread post by Peregrine » 2018-01-21, 10:09

I gave it a shot:
eclipsed moon: {8de7fcbb-c55c-4fbe-bfc5-fc555c89dbc7}
encryptedweb: {8de7fcbb-c55c-4fbe-bfc5-fc555c48dbc9}

BTW: the link on the encrypted web page (source) is no longer working:
viewtopic.php?t=12026
https://github.com/Axiomatic-/encryptedweb
Last edited by Peregrine on 2018-01-21, 10:12, edited 1 time in total.

Locked