How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Forum rules
Tutorials and Howtos should only relate to developed software, and not to third party applications. e.g.: Don't post a generic Howto for configuring a firewall.
If you have a question how to do something, you should use one of the support boards, not this board. It is meant for people to document and post instructions.
Tutorials and Howtos should only relate to developed software, and not to third party applications. e.g.: Don't post a generic Howto for configuring a firewall.
If you have a question how to do something, you should use one of the support boards, not this board. It is meant for people to document and post instructions.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
That's my github! Sorry I'm so late to the party, I was having trouble getting a confirmation email through to register on here.
There were a number of problems with newer versions built from source that I have tried to patch myself, but I must first admit that I am a complete and utter noob with no experience other than playing around in python for personal use. In particular things like the referer spoofer and as you've noticed blocking inline scripts were broken, I think I have fixed those but cannot be sure I haven't made any mistakes. I hope someone can look at my code (in legacy firefox branch) and look for anything obvious or bad style or the like.
Anyways, I was going to ask if there is anyone with more experience who might be able to assist with a proper fork so people who are unable to build from source can still use it . I have attached my patches that I have so far to be applied to version 1.2.0, with the only bug I know of being that blocking web workers doesn't work in Pale Moon (it works fine in Firefox 52, but I think it can't be made to work until support for child-src in Content Security Policy is added for those interested). Test at your own risk!
There were a number of problems with newer versions built from source that I have tried to patch myself, but I must first admit that I am a complete and utter noob with no experience other than playing around in python for personal use. In particular things like the referer spoofer and as you've noticed blocking inline scripts were broken, I think I have fixed those but cannot be sure I haven't made any mistakes. I hope someone can look at my code (in legacy firefox branch) and look for anything obvious or bad style or the like.
Anyways, I was going to ask if there is anyone with more experience who might be able to assist with a proper fork so people who are unable to build from source can still use it . I have attached my patches that I have so far to be applied to version 1.2.0, with the only bug I know of being that blocking web workers doesn't work in Pale Moon (it works fine in Firefox 52, but I think it can't be made to work until support for child-src in Content Security Policy is added for those interested). Test at your own risk!
You do not have the required permissions to view the files attached to this post.
-
- Pale Moon guru
- Posts: 35648
- Joined: 2011-08-28, 17:27
- Location: Motala, SE
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
For the record, "child-src" was already obsolete when it landed in the spec. It should not be used.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
2calibrations: it looks like your patch is working (and mine was completely wrong, lol). i didn't do a proper check, tho (only checked that sites are really blocked, and inline scripts aren't fired anymore). anyway, i switched to your patched version, so i think we'll see if something will go wrong. ;-)
tnx for your work!
tnx for your work!
Last edited by ketmar on 2018-01-06, 00:35, edited 1 time in total.
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
2Moonchild: will Pale Moon have "worker-src" implemented then? or it is already there, and i missed it?
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Thanks for the heads up Moonchild, I'll keep that in mind I had seen that it was deprecated in Pale Moon issue 949 when I was looking for more information on it, I was trying to point out to people not to expect it to work but perhaps I should have been clearer. I'd left it in for now incase anyone wanted to to try it out with Firefox ESR where it does still work (even the Webextension version of uMatrix uses it, Chrome is still the only browser with worker-src it seems).
Ketmar I don't think you were far wrong, you were looking in the right places at least. Thanks for your patches so far, I wouldn't have been inspired to look without your first patch
Ketmar I don't think you were far wrong, you were looking in the right places at least. Thanks for your patches so far, I wouldn't have been inspired to look without your first patch
-
- Lunatic
- Posts: 399
- Joined: 2016-12-27, 00:12
-
- Lunatic
- Posts: 399
- Joined: 2016-12-27, 00:12
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
version uMatrix 1.3.2 works fine, without any patches
Last edited by jars_ on 2018-03-04, 12:51, edited 1 time in total.
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
no, it doesn't.
-
- Board Warrior
- Posts: 1878
- Joined: 2015-09-30, 23:02
- Location: uk.
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Are you going to be punch or judy...?..lol.ketmar wrote:no, it doesn't.
user of multiple puppy linuxes..upup,fossapup.scpup,xenialpup.....
Pale moon 29.4.1
Pale moon 29.4.1
-
- Lunatic
- Posts: 399
- Joined: 2016-12-27, 00:12
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
it`s not perfect, had an error in Console, yes...no, it doesn't.
Code: Select all
Метка времени: 04.03.2018 15:43:18
Ошибка: uncaught exception: Error opening input stream (invalid filename?): chrome://umatrix/content/js/contentscript-end.js
To fix this error would be good, of course. But I have not yet noticed any consequences.
-
- Lunatic
- Posts: 399
- Joined: 2016-12-27, 00:12
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
there is still no such file(contentscript-end.js), so just comment out the line 306 in frameModule.js to get rid of the error.
frameModule.js :
line 306: // lss(this.contentBaseURI + 'contentscript-end.js', sandbox);
frameModule.js :
line 306: // lss(this.contentBaseURI + 'contentscript-end.js', sandbox);
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
it doesn't block all scripts without proper fix. you just happened to not notice those rare circumstances where it doesn't. please, don't tell that "it works" until you fully understand how exactly uMatrix works internally, and why some internal errors matters or not.
-
- Moon lover
- Posts: 90
- Joined: 2017-07-28, 14:44
- Location: The Netherlands
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
I was able to build uMatrix up until version 1.3.2 (albeit with the contentscript-end.js error in the console), but with 1.3.4 I get this where the icon should be:
When I hover over it, a small rectangle shows and when I click on it the uMatrix interface opens.
Is there a way to fix this bug and the script error as well?
For now I have disabled uMatrix and enabled NoScript again...
Is there a way to fix this bug and the script error as well?
For now I have disabled uMatrix and enabled NoScript again...
Linux Mint 20.3 Mate 64bit
Pale Moon latest
Pale Moon latest
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
but what is wrong with using the old version, which works perfectly?
-
- Fanatic
- Posts: 167
- Joined: 2017-08-24, 15:02
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
I'm still using the last Firefox XUL version of uMatrix in Pale Moon, 1.1.4. Are there any plans to continue the possibility of forking it for Pale Moon users? Right now it's been working just fine though.
-
- Lunatic
- Posts: 369
- Joined: 2015-07-28, 11:10
- Location: Earth
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
tbh, i don't see any reason to fork it. as you said, the old version is working ok, and i honestly cannot see anything i need to fix/add so badly that i have to fork uM. as Pale Moon is not going to break extensions with each new release (i am currently on PM 28 beta, and everything still works ;-), i don't think that there is a real need to fork uM. if uM will ever stop working, we'll return to this question, but until then, it is fine as it is now, i believe. for now, i am using uM, and if it will break, i'll prolly try to fix it.
of course, there can be other brave souls, and somebody may create a fork. that will be great, 'cause it will free me from one constant headache (watching for uM to not break ;-).
of course, there can be other brave souls, and somebody may create a fork. that will be great, 'cause it will free me from one constant headache (watching for uM to not break ;-).
-
- Hobby Astronomer
- Posts: 16
- Joined: 2014-11-21, 17:22
- Location: California
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
tl;dr --> uMatrix 1.3.2 works perfectly in all latest PM versions and is much improved over v1.1.4 (last official XUL version) <--
An update about uMatrix functionality in Pale Moon (for those who use uMatrix and/or are interested) is that uMatrix 1.3.2 released in Jan 2018 has been working perfectly for me in PM over the past year including with all PM versions through 28.2.2 (most recent PM release at the time of this post).
A number of bugfixes/improvements for uMatrix are included in v1.3.2 that are not in v1.1.4, with a big change being the addition of a global scope button (the star) in the pop-out panel. The star button was added in version 1.1.8 and makes it much easier to do global scope changes than in earlier versions.
To make uMatrix 1.3.2 for PM one can follow the below steps (an updated version of steps from this earlier post, with newer file names as appropriate). These steps are intended to be run on a Linux system though should work fine in Cygwin or a similar Linux subsystem running on Windows (python must also be installed and working correctly, steps to check this on Debian/Ubuntu based distributions are in the OP for this topic):
For uMatrix 1.3.4 and higher the pop-out panel fails to render properly in PM (either 27.x or 28.x) even after applying the linked "for 1.2.0" patch, thus making uMatrix impossible to use. Creating a fork of uMatrix and doing some serious code debugging might reveal why the pop-out panel fails to render for v1.3.4+ though with v1.3.2 working perfectly it is not really a priority.
Perhaps at least a fork on GitHub for uMatrix 1.3.2 with a pre-created XPI download that has the patch already integrated would be handy for Pale Moon users. So if I get around to that I will post back to this topic to let folk know (and maybe with a working PM-specific fork of uMatrix 1.3.2 the good folks who create Pale Moon would even be happy to host it on the main PM extensions site)!
An update about uMatrix functionality in Pale Moon (for those who use uMatrix and/or are interested) is that uMatrix 1.3.2 released in Jan 2018 has been working perfectly for me in PM over the past year including with all PM versions through 28.2.2 (most recent PM release at the time of this post).
A number of bugfixes/improvements for uMatrix are included in v1.3.2 that are not in v1.1.4, with a big change being the addition of a global scope button (the star) in the pop-out panel. The star button was added in version 1.1.8 and makes it much easier to do global scope changes than in earlier versions.
To make uMatrix 1.3.2 for PM one can follow the below steps (an updated version of steps from this earlier post, with newer file names as appropriate). These steps are intended to be run on a Linux system though should work fine in Cygwin or a similar Linux subsystem running on Windows (python must also be installed and working correctly, steps to check this on Debian/Ubuntu based distributions are in the OP for this topic):
- Start in the home directory
Code: Select all
cd ~
- Download uMatrix 1.3.2 source code
Code: Select all
wget https://github.com/gorhill/uMatrix/archive/1.3.2.tar.gz -O uMatrix-1.3.2.tar.gz
- Extract uMatrix 1.3.2 source code
Code: Select all
tar -xzvf uMatrix-1.3.2.tar.gz
- Enter the new uMatrix directory
Code: Select all
cd ~/uMatrix-1.3.2
- Download the patch file (from this post)
Code: Select all
wget https://forum.palemoon.org/download/file.php?id=9837 -O for-1.2.0.patch
- Apply the patch file
Code: Select all
patch -p1 < for-1.2.0.patch
- Build the XPI bundle
The new XPI module will be at the following path:
Code: Select all
tools/make-firefox.sh all
Code: Select all
~/uMatrix-1.3.2/dist/build/uMatrix.firefox.xpi
For uMatrix 1.3.4 and higher the pop-out panel fails to render properly in PM (either 27.x or 28.x) even after applying the linked "for 1.2.0" patch, thus making uMatrix impossible to use. Creating a fork of uMatrix and doing some serious code debugging might reveal why the pop-out panel fails to render for v1.3.4+ though with v1.3.2 working perfectly it is not really a priority.
Perhaps at least a fork on GitHub for uMatrix 1.3.2 with a pre-created XPI download that has the patch already integrated would be handy for Pale Moon users. So if I get around to that I will post back to this topic to let folk know (and maybe with a working PM-specific fork of uMatrix 1.3.2 the good folks who create Pale Moon would even be happy to host it on the main PM extensions site)!
Off-topic:
A final slightly off-topic (though useful for some) note is that the uMatrix 1.3.2 extension created by the above steps also installs and works fine with Firefox ESR 52.x, being the last useful Firefox version for many people due the bizarre (?!) choice the Mozilla Foundation made (shooting in foot) to entirely remove XUL extension support after FF v52 and switch to Web Extensions, thus turning Firefox into "Fire-Chrome" (and obliging however many thousands/millions of long-term FF users who depend on XUL extensions for their work to ditch FF for greener pastures, such as provided by Pale Moon!).
A final slightly off-topic (though useful for some) note is that the uMatrix 1.3.2 extension created by the above steps also installs and works fine with Firefox ESR 52.x, being the last useful Firefox version for many people due the bizarre (?!) choice the Mozilla Foundation made (shooting in foot) to entirely remove XUL extension support after FF v52 and switch to Web Extensions, thus turning Firefox into "Fire-Chrome" (and obliging however many thousands/millions of long-term FF users who depend on XUL extensions for their work to ditch FF for greener pastures, such as provided by Pale Moon!).
-
- Moon Magic practitioner
- Posts: 2411
- Joined: 2012-08-19, 20:32
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
Thank you for the update, MoonSavvy - quite promising stuff.
Safe Mode / clean profile info: Help/Restart in Safe Mode
Information to include when asking for support - How to apply user agent overrides
How to auto-fill passwords
Windows 10 Pro x64
Information to include when asking for support - How to apply user agent overrides
How to auto-fill passwords
Windows 10 Pro x64
-
- Lunatic
- Posts: 399
- Joined: 2016-12-27, 00:12
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
hehe... i make a CSS-style in userChrome.css for button bug:For uMatrix 1.3.4 and higher the pop-out panel fails to render properly in PM
Code: Select all
#umatrix-legacy-button[badge]::before { content: "uM" !important; font: bold 1em Arial !important; }
in last XUL-compatible version uMatrix 1.3.12 (internal number 1.3.3b8)
-
- Moon lover
- Posts: 90
- Joined: 2017-07-28, 14:44
- Location: The Netherlands
Re: How to install uMatrix in Pale Moon 27 in GNU/Linux (Ubuntu)
That sure is helpful.r4and0mUs3r wrote:For anyone interested .. decided to have a go at building this according to MoonSavvy's post ..
... building uMatrix v1.3.2 : v1.3.4 : v1.3.6 with the patch, they each appear to work correctly according to checking them at the BrowserLeaks page .. with the exception of the Icon/button not being available/visible in the latter two.
Found this .. the "Update Badge" section in the v1.3.2 "tabs.js" file is the only significant difference in that file between the three versions. Copying just that section of code from v1.3.2 to 1.3.4 or 1.3.6 results in the Icon/button being usable again.
This appears to work because it seems the rest of the icon breaking changes were not incorporated until v1.3.8 .. and from that version up, trying the same thing no longer works.
It's only a partial solution, if that, but maybe it's helpful ..
cheers.
Thanks!
I even tried building version 1.3.8 as per your instructions and it works here (Linux Mint 17.3)...
The icon behaves as it should.
I have not (yet) tried any higher versions.
One thing though: the refresh button in the logger does not work .
Have to refresh the webpage itself to actually fill the logger...
Linux Mint 20.3 Mate 64bit
Pale Moon latest
Pale Moon latest