summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-06-21 12:48:09 -0400
committerAndrew Cady <d@jerkface.net>2020-06-21 12:48:38 -0400
commitd1152d842abe6927fec404a46d10eacba98e80db (patch)
tree8d622fda7510daa5825d44b3913818da2f5c8ac4
parent9f8cc033156b4a389b685597fe80bc5c915694df (diff)
add readme
-rw-r--r--firefox-sideloader/README.md63
1 files changed, 63 insertions, 0 deletions
diff --git a/firefox-sideloader/README.md b/firefox-sideloader/README.md
new file mode 100644
index 0000000..1e1cbad
--- /dev/null
+++ b/firefox-sideloader/README.md
@@ -0,0 +1,63 @@
1# firefox-sideloader
2
3### How to use
4
5The following session demonstrates how to use.
6
7Mostly all you need:
8```
9[u@h:~/firefox-sideloader]$ . functions.sh
10[u@h:~/firefox-sideloader]$ clone_default_profile MyNewProfileName
11[u@h:~/firefox-sideloader]$ firefox -P MyNewProfileName
12```
13
14The profile MyNewProfileName will now start up with all extensions copied from
15the default profile. Effort was made not to copy any settings or leak any
16private data, so that the new profile can be redistributed as a firefox default
17startup state.
18
19Also possible:
20```
21[u@h:~/firefox-sideloader]$ clone_profile MyNewProfileName SecondGenerationClone
22[u@h:~/firefox-sideloader]$ firefox -P SecondGenerationClone
23```
24
25### Future
26
27The next feature (unimplemented but needed) is to change the target home
28directory of the profile. Then the `clone_profile` function becomes
29suitable to use when creating a new home directory (i.e. a dynamic
30/etc/skel/ to work around Firefox's internal dependence on absolute
31paths). This is the whole point of this code from my perspective.
32
33### Counter-factual Future
34
35Another obvious direction to take this code would be to make it work on existing
36profiles, rather than being confined to creating a new profile.
37
38The `jq` queries in this codebase illustrate how/where it would be possible to
39insert one extension at a time into an existing profile without damaging it.
40Just merge the output of those queries back into the JSON input files. The tool
41`jq` itself can make the changes needed. It's obviously the right and robust way
42to go about this, but I don't have a personal need for it.
43
44### By the way
45
46Another useful function:
47
48```
49[u@h:~/firefox-sideloader]$ list_extensions
50{"id":"uBlock0@raymondhill.net","name":"uBlock Origin"}
51{"id":"bypasspaywalls@bypasspaywalls.weebly.com","name":null}
52{"id":"default-theme@mozilla.org","name":null}
53[...]
54```
55
56Check another profile than the default like this:
57```
58[u@h:~/firefox-sideloader]$ list_extensions SecondGenerationClone
59[u@h:~/firefox-sideloader]$ list_extensions ~someotheruser/.mozilla/firefox/randomstring.profilename/
60```
61
62It should just accept a profile name as an argument and do that itself, but it
63does not.