Page 1 of 3
How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-05, 11:56
by gracious1
How to install uMatrix in Pale Moon 27 for GNU/Linux (Ubuntu)
Recently Raymond Hill ceased to release XUL builds of uMatrix to github for installation. However, all is not lost for Pale Moon users. The XUL source code has not been removed from the repository; therefore, it is possible to create your own build. In this tutorial, I am using Ubuntu, although it will work in just about any GNU/Linux distro.
- Open Terminal
- Make sure you have the Python Programming Language (python3) installed.
- Enter this command:
Code: Select all
dpkg-query -W -f='${Status} ${Version}\n' python3
If you have it installed this is your output:The <version> will be a string, such as 3.4.0-0ubuntu2 if you are using Ubuntu.
- If you do not see that output, install python3, like so:
Code: Select all
sudo apt-get update && sudo apt-get install python3
(Enter 'y' when prompted).
- Now we get down to the nuts and bolts: building the cross-platform installer module (XPI), also called a "bundle".
- Make sure you are in your home directory.
- Clone the uMatrix repository at Github.com into a newly created directory in your home directory.
Code: Select all
git clone https://github.com/gorhill/uMatrix.git
This creates a directory called uMatrix, filled with the sources you need.
- Enter the new uMatrix directory.
- Okay, let's build this bundle!! Enter this command:
Now there is an XPI module ready to be installed, with this path:
Code: Select all
~/uMatrix/dist/build/uMatrix.firefox.xpi
- At last, we install uMatrix into Pale Moon.
- In Add-ons Manager in Pale Moon, pull down the gear menu and select "Install Add-on From File".
- Navigate to the uMatrix.firefox.xpi file, following the above path, and select it.
- Now look in the Extensions list in your Add-ons Manager. You should see uMatrix installed with the beloved Blue Dot.
Now you are ready to use uMatrix.
Nice work!
P.S. An alternative to step 4: In your graphic file manager, drag and drop uMatrix.firefox.xpi onto Pale Moon.
Special thanks to ketana.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-06, 06:02
by jars_
What about windows users? no bat\cmd in package. I must to rewrite make-firefox.sh to cmd\bat format, right?
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-06, 06:39
by adisib
jars_ wrote:I must to rewrite make-firefox.sh to cmd\bat format, right?
If you don't want to rewrite it or have someone else rewrite it, you run shell scripts in the Linux Subsystem for Windows 10 or Cygwin for any version of Windows, or run it in real Linux by temporarily booting into a live usb.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-06, 07:44
by jars_
OK, i forget, that i have UnixUtils(Cygwin) installed
Everything worked out.
Thanks for instruction.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-09, 22:02
by ghysler
Awesome. Thank you very much for the detailed instructions! (my favorite add-on, for sure)
Note: it might be wise to use the source code for the latest
release instead - links at
https://github.com/gorhill/uMatrix/releases
Otherwise you will most likely end up with a pre-release build.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-09, 22:45
by back2themoon
Thanks for the guide gracious1. It'd be really nice if we could have a similar Windows guide "for dummies"... I'm seeing the references to Subsystem/Cygwin/LiveUSB, perhaps I might try something like that.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-20, 19:21
by MoonSavvy
Another way to install uMatrix in Pale Moon 27 (under Linux) is to download the release source code for a specific desired version from the uMatrix github site (
https://github.com/gorhill/uMatrix/releases), then extract the contents of the specific tar.gz file that was downloaded, then cd into the extracted folder and run the same build command as given by the OP.
For example, to build an XPI for uMatrix 1.1.18 one can do the following (assumes python is installed, follow step 2 from OP if unsure):
- Start in the home folder
- Download uMatrix 1.1.18
Code: Select all
wget https://github.com/gorhill/uMatrix/archive/1.1.18.tar.gz -O uMatrix-1.1.18.tar.gz
- Extract uMatrix 1.1.18
- Enter the new uMatrix directory
- Build the XPI bundle
The new XPI module will be at the following path:
Code: Select all
~/uMatrix-1.1.18/dist/build/uMatrix.firefox.xpi
- Now drag and drop the new XPI into Pale Moon to install (or install by navigating to the file as per step 4 from OP).
Unfortunately it seems that uMatrix 1.1.18 is the last version that works correctly on Pale Moon 27. There were evidently some significant code changes committed to uMatrix version 1.1.19rc0 (see
https://github.com/gorhill/uMatrix/compare/1.1.18...3b77c07) with the result being that any version of the uMatrix extension higher than 1.1.18 no longer works in either PM 27 or Firefox ESR 52 (at least based on testing in PM 27.6.2 and FF ESR 52.5.2 by this user, including on both Windows and Linux systems).
What happens on both PM 27.6.2 and FF ESR 52.5.2 is that the pop-up uMatrix panel fails to render correctly on any uMatrix version higher than 1.1.18 (so this includes the latest main release 1.1.20 as well as all other tested release candidates listed on the releases page linked above). Here is how the uMatrix panel looks on any version higher than 1.1.18 for this user (on both PM and FF ESR):
Perhaps someone with good JavaScript skills can figure out what changes have resulted in uMatrix 1.1.19rc0 and higher not working correctly on PM and FF ESR (the JS skills of this user are minimal and after looking at the various diffs it is not clear what code changes have resulted in the extension failing to work). If such a person has the inclination, a fork of uMatrix could be created that is designed to continue functioning correctly on PM and FF ESR. This forked version could then include whatever changes and bug-fixes are compatible with PM and FF ESR, of course without including whatever changes have broken the extension on these browsers since version 1.1.19rc0.
In the meantime, uMatrix version 1.1.18 works very well on both PM 27.6.2 and FF ESR 52.5.2 and the instructions above can be used to build and install this version. Note that once the XPI file is built it will of course install successfully on PM or FF ESR running under Windows as well.
Thanks to Raymond Hill for creating such an excellent extension, really a very sophisticated firewall for the web browser. And hopefully there will be a Pale Moon user out there with the necessary JavaScript skills who might step up to create a fork of the extension one day!
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-20, 19:44
by ketmar
the attached "hackfix" should make uMatrix great again. to apply it, download the patch file, copy it into uMatrix source code directory, and do "git am downloadedfile.patch" from there. if there will be no error messages, you can proceed as described, and UI should work again.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-20, 22:05
by MoonSavvy
@ketmar
Thank you for the very fast response and the fix! The additional code you added in the patch file results in a good working uMatrix extension in PM for versions 1.1.19rc0 and higher. When I tried the command you mentioned ("git am 0001-pm-messaging-API-hackfix.patch") in the uMatrix git clone directory it failed due to an email address issue. Using the following command worked immediately without having to configure an email address:
Code: Select all
git apply 0001-pm-messaging-API-hackfix.patch
Alternatively, for those who want to build a specific patched version of uMatrix from a downloaded tar.gz file (similar to instructions
above) the patch file can be placed in the appropriate uMatrix source code directory and then the "patch" command can be used to apply the changes to the source code. For instance, to build a patched uMatrix 1.1.20 (latest "official release" at this time) do the following:
- Start in the home directory
- Download uMatrix 1.1.20 source code
Code: Select all
wget https://github.com/gorhill/uMatrix/archive/1.1.20.tar.gz -O uMatrix-1.1.20.tar.gz
- Extract uMatrix 1.1.20 source code
- Enter the new uMatrix directory
- Download the patch file
Code: Select all
wget https://forum.palemoon.org/download/file.php?id=9713 -O 0001-pm-messaging-API-hackfix.patch
- Apply the patch file
Code: Select all
patch -p1 < 0001-pm-messaging-API-hackfix.patch
- Build the XPI bundle
The new XPI module will be at the following path:
Code: Select all
~/uMatrix-1.1.20/dist/build/uMatrix.firefox.xpi
Thanks again ketmar for providing this uMatrix fix for now!
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2017-12-20, 23:38
by jars_
Thanks guys, on Win7 too all worked!
For those who want to repeat on Windows, I recommend a set of
UnixUtils - where there is everything you need for this(link for download in the bottom page)
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 15:00
by ScootyPuffJr
Hello chaps, new member here
I've been trying to patch the newest uMatrix build (1.1.21b6, as of today) but get this error message when getting to the patching stage:
Code: Select all
patching file platform/firefox/vapi-client.js
Hunk #1 FAILED at 148.
1 out of 1 hunk FAILED -- saving rejects to file platform/firefox/vapi-client.js.rej
I'm not sure if it is to do with new changes to uMatrix, etc as this is the first time I'm trying to patch with Unix Utils on Win 10 (never tried before) and was hoping someone could shed some light on what's wrong
Many thanks in advance, and for the effort that has already gone in to this thread
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 16:24
by ketmar
it looks like 1.1.21b6 doesn't need that patch anymore. it still has some quirks that should be patched, tho, but it looks ok (working) without any patches.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 16:35
by ketmar
two hackfixes for new quirks in uMatrix 1.1.21b6.
the first one has something to do with webworkers blocking: i don't even know what it tries to accomplish, so i just forced it to keep silence instead of throwing an error. sorry.
the second one is something GH forgot to remove: there was an UA spoofer once, then GH removed it, but forgot to cleaned up some code. this fix is purely optional: uMatrix works without it, but spams js debug console with scary (yet completely harmless) error messages.
WARNING! please note that version newer than 1.1.21b6 may not need those patches anymore. don't be afraid to write here in case of any "strange" messages you may see when applying those patches, so i can investigate the cause and write an update!
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 18:54
by ScootyPuffJr
Thanks for the quick update Ketmar, v1.2.0 has been released so tried to use the fixes on that and build but I think there's an issue with Unix Utils as I keep getting this error when building:
Code: Select all
tools/make-firefox.sh: line 33: python: command not found
And the install.rdf is screwed up, etc
If you get the time could you please upload a fixed (patched) .xpi of v1.2.0, or maybe recommend an alternative Windows Unix tool
Sorry for being a pain lol
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 18:58
by ketmar
it is forbidden to upload xpis on the forum (or give direct links to xpis, for that matter ;-).
as for error message -- you need python3 installed. i don't know how to do it on win properly, sorry,
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-04, 19:38
by JustOff
ScootyPuffJr wrote:maybe recommend an alternative Windows Unix tool
You can use
MozillaBuild environment, I tried
2.1.0 and it works just fine, other versions should be good as well.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-05, 05:07
by ketmar
WARNING!
it seems that uMatrix versions after 1.1.21b1 aren't blocking inline scripts! it shouldn't be the effect of my hackfixes (i hope), but still: don't install any later version until somebody (either me, or some other person ;-) investigate the cause.
it still blocks access to sites, tho, so it's not completely useless. if you're using uMatrix with something like NoScript, you prolly have nothing to worry about.
WARNING!
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-05, 15:10
by ScootyPuffJr
Thanks for the heads up about xpi rules (apologies mods for asking) and the warning about uMatrix inline blocking (or lack of!) in later builds Ketmar, much appreciated
I'll give MozillaBuild a try in a bit, cheers JustOff
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-05, 21:01
by ScootyPuffJr
Just a quick update; v1.1.21b1 running fine after building in MozillaBuild
As a side note, is this your uMatrix fork on Github Ketmar?
https://github.com/calibrations/uMatrix
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Posted: 2018-01-05, 21:05
by ketmar
nope, i don't have GH account at all.