Project

General

Profile

Installation instructions (browser extension Mozilla) » History » Version 18

koszko, 03/24/2022 04:34 PM
make it clear that snippets are meant to be copy-pasted

1 1 koszko
# Installation instructions (Mozilla)
2 2 koszko
3 13 koszko
{{toc}}
4 12 koszko
5 1 koszko
## Browser compatibility
6
7 11 koszko
Haketilo is currently compatible with browsers based on Mozilla Firefox 60 and upwards.
8 1 koszko
9 15 koszko
Although this makes little difference to Haketilo, please consider using a Firefox derivative that ~~isn't malware~~ respects your freedom and privacy (i.e. does not snoop on you). Valid options are browsers in some of the ["ethical" GNU/Linux distros](https://www.gnu.org/distros/free-distros.html#for-pc) like Parabola and Trisquel, the Tor Browser and LibreWolf.
10 1 koszko
11 13 koszko
## Single-user install
12 1 koszko
13 13 koszko
Here we'll describe how to install Haketilo from a .xpi file served by our servers. Extensions in Firefox and its derivatives are often installed from the Mozilla Add-ons website (AMO) but this approach has serious privacy and freedom problems.
14
15 17 koszko
Right now we only provide an unsigned .xpi extension file. This means it hasn't been cryptographically signed by Mozilla (this is nohow related to the signatures we provide on the [[Releases]] page) and therefore some of Mozilla browsers and even derivatives will refuse to install it. While we're going to provide a signed version of the extension soon, you are strongly encouraged to use a Firefox derivative that allows you to manage your software and install unsigned add-ons as well.
16 13 koszko
17 17 koszko
*Note: even if your browser refuses to install unsigned extensions, you can still 1) try it out by installing it as a "temporary" add-on on `about:debugging` page or 2) try installing it [[#Global-install-GNULinux-distributions|globally]]*
18 13 koszko
19
### Steps
20
21 12 koszko
*Note: depending on the versions of your web browser and Haketilo some UI elements and text messages might be slightly different on your machine than on the screenshots below*
22 9 koszko
23 17 koszko
First, download the extension's .xpi file from  the [[Releases]]. You can also download the PGP and Signify cryptographic signatures made by us to verify the file hasn't been tampered with. The verification procedure is described [[Verifying signatures|here]]. After downloading, go to the `about:addons` URL. In the extensions management page that shows up, click on the gear icon and select "Install Add-on From File...".
24 12 koszko
25 7 jahoti
![extensions page](mozilla_install_from_file.png)
26 3 koszko
27
Now, navigate to the downloaded .xpi file and select it.
28
29 6 jahoti
![navigating to the extension file](navigate_extension_xpi_file.png)
30 3 koszko
31 1 koszko
*Note: if, at this point, your browser shows you an error message about extension file being invalid but you're sure the browser supports installation of unsigned extensions, go to the `about:config` URL, confirm the warning prompt that appears, search for the `xpinstall.signatures.required` preference and double-click it to toggle its value to "false"*
32 5 jahoti
33 3 koszko
You should be presented with a dialog asking whether to add Haketilo to your browser. Once you click "Add", the add-on will install.
34 1 koszko
35
![adding Haketilo](mozilla_add_hachette.png)
36
37 15 koszko
The browser might ask whether you want to allow Haketilo to run in private windows. If you installed Haketilo for its script-blocking capabilities, you most likely also want to utilize them in Private Browsing mode and you can check this option. However, there might be some issues involved and it's recommended that you read the [[#Using-Haketilo-in-private-windows|related note]].
38
39 1 koszko
![Haketilo installed, allowing extension to run in private windows](mozilla_hachette_installed_allow_private.png)
40
41 13 koszko
## Global install (GNU/Linux distributions)
42
43
Most Firefox-based browsers from GNU/Linux distros' package managers (including `firefox-esr` from Debian and `abrowser` from Trisquel) are configured to automatically pick up extensions placed under
44
```
45
/usr/share/mozilla/extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}
46
```
47
where `{ec8030f7-c20a-464f-9b0e-13a3a9e97384}` is the ID of Mozilla Firefox. This is what enables commands like *`apt install webext-ublock-origin`* to work on distros (in this case, Debian and Trisquel).
48 1 koszko
49 13 koszko
Here, we'll leverage this to install Haketilo system-wide and have it appear in the browser of every user account.
50
51
*Note: you need access to root account via `sudo` command for the instructions below to work*
52
53 17 koszko
*Note: it is assumed you have `wget` and `unzip` commands installed*
54 13 koszko
55 1 koszko
### Steps
56
57
*Note: depending on the versions of your web browser and Haketilo some UI elements and text messages might be slightly different on your machine than on the screenshots below*
58
59 18 koszko
Run the following in your POSIX shell (i.e. copy+paste) to download the .xpi file and its PGP and Signify signatures made by us:
60 1 koszko
``` shell
61
HAKETILO_VER="1.0b1" # replace with the version you want to have installed
62 13 koszko
HAKETILO_URL="https://hydrilla.koszko.org/downloads/haketilo-$HAKETILO_VER.xpi"
63 17 koszko
HAKETILO_DIR="/tmp/haketilo-${HAKETILO_VER}_release_files"
64
rm -rf $HAKETILO_DIR && mkdir -p $HAKETILO_DIR && cd $HAKETILO_DIR
65
wget "$HAKETILO_URL" "$HAKETILO_URL.sig" "$HAKETILO_URL.asc"
66
```
67
68 18 koszko
The files have been placed in a new directory under `/tmp`. You are now encouraged to verify our signatures as described [[Verifying signatures|here]]. Once done, run the snippet below in **the same** shell (again, copy+paste) and type your user password when prompted:
69 17 koszko
``` shell
70 13 koszko
FIREFOX_ID="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
71
HAKETILO_ID="{6fe13369-88e9-440f-b837-5012fb3bedec}"
72
# You may need to use a different path for other browsers and distros.
73
EXT_PATH="/usr/share/mozilla/extensions/$FIREFOX_ID/$HAKETILO_ID/"
74
75
install_haketilo() {
76 17 koszko
    sudo rm -rf "$EXT_PATH" && sudo mkdir -p "$EXT_PATH" && cd "$EXT_PATH"
77
    sudo unzip $HAKETILO_DIR/haketilo-$HAKETILO_VER.xpi
78
    rm -rf $HAKETILO_DIR
79 13 koszko
}
80
81 1 koszko
install_haketilo
82 13 koszko
```
83
84 15 koszko
Once you have performed the installation, you might (or might not) want to give Haketilo access to private browser windows. You can do it from the `about:addons` page. There might be some issues involved, so it's recommended that you read the [[#Using-Haketilo-in-private-windows|related note]].
85 13 koszko
86
![Haketio manage](haketilo_manage.png)
87 1 koszko
88
89
![Haketio allow in private tabs](haketilo_manage_allow_private_tabs.png)
90 15 koszko
91
## Post-installation notes
92
93
### Using Haketilo in private windows
94
95 16 koszko
**Note: after this section was written bug #115 was discovered which makes some of the workarounds described here ineffective; work is ongoing to fix the bug inside Haketilo**
96
97 15 koszko
If you're using the Private Browsing mode, you probably care about security and privacy. Those are basically unachievable with JavaScript globally allowed in the browser. Because of that, you likely want to give Haketilo permission to run in private windows as well.
98
99
*Note: it is a perfectly valid approach to aim for a purely script-less experience in private browsing windows and use an add-on like NoScript or uBlock Origin there instead of Haketilo*
100
101
Haketilo 1.0 uses IndexedDB in-browser database to store all its settings and data. Unfortunately, the ability to use IndexedDB in Private Browsing mode is disabled by default in many Mozilla-based browsers. This causes Haketilo's settings page to be inoperable even when Haketilo itself is allowed to run in private windows.
102
103
The following solutions exist.
104
105
#### 1. Don't use Private Browsing mode
106
107
This is probably not what you are interested in, so let's move ahead.
108
109
#### 2. Enable IndexedDB access in private windows
110
111
The relevant setting is controlled by "dom.indexedDB.privateBrowsing.enabled" preference. You need to navigate to `about:config` URL, click through the warning that appears, find the preference and set it to "true".
112
113
![toggling the "dom.indexedDB.privateBrowsing.enabled" preference](indexeddb_private_browsing.png)
114
115
##### Warning
116
This will also give pages browsed in Private Browsing mode the ability to use IndexedDB. In practice, pages that are going have their scripts blocked will not be able to access the IndexedDB database anyway. This means you have to carefully consider what remote JavaScript (if any) you're going to allow to execute. Only you can decide whether it is the right choice to toggle this preference.
117
118
#### 3. Access Haketilo's settings page from non-private windows
119
120
Other parts of Haketilo work properly regardless of IndexedDB settings for private windows. If you open Haketilo's settings page in a non-private window, configuration you make there will affect script blocking and injection in both private and non-private windows.
121 13 koszko
122 14 koszko
## Gratulations
123 8 jahoti
124 5 jahoti
That's it. You can now play a bit with the extension and [[User manual#Understanding-the-concepts|learn how it works]]. Also, make sure you realize its [[Known limitations|limitations]].