1 |
On Mon, Jun 23, 2014 at 06:02:02PM +0100, Mick wrote |
2 |
|
3 |
> Taking this a step further I create additional one-off profile |
4 |
> directories in /tmp, which are deleted when I reboot (this is a |
5 |
> laptop), which ensures that tracing between sites does not happen. |
6 |
|
7 |
Here is more detail on my approach... |
8 |
|
9 |
1) Generate a random 8-letter name for a directory with the command |
10 |
|
11 |
head /dev/urandom | tr -d -c a-z | tail -c 8 |
12 |
|
13 |
Let's say you got "cjyqsiqd" (without the quotes). |
14 |
|
15 |
2) mkdir ~/.mozilla/firefox/cjyqsiqd |
16 |
(or whatever 8-character string you got) |
17 |
|
18 |
3) Create directories for a template profile, plus the profiles you want |
19 |
to use. I'll call them "profile1", "profile2", etc, but in real life, |
20 |
you'll want more descriptive names. |
21 |
|
22 |
mkdir ~/.mozilla/firefox/cjyqsiqd/template |
23 |
mkdir ~/.mozilla/firefox/cjyqsiqd/profile1 |
24 |
mkdir ~/.mozilla/firefox/cjyqsiqd/profile2 |
25 |
mkdir ~/.mozilla/firefox/cjyqsiqd/profile3 |
26 |
... |
27 |
mkdir ~/.mozilla/firefox/cjyqsiqd/profilen |
28 |
|
29 |
4) Create the profiles starting with the template profile. Note that |
30 |
there is a good reason for navigating into the profile dirs. It will |
31 |
become obvious later. The command is... |
32 |
|
33 |
firefox -new-instance -ProfileManager |
34 |
|
35 |
Create Profile |
36 |
Next |
37 |
Enter new profile name: (more intuitive if it matches the directory name) |
38 |
Choose Folder (Navigate into the corresponding folder before clicking Open) |
39 |
Open |
40 |
Exit |
41 |
|
42 |
Rinse lather repeat for all the other profiles you'll want. |
43 |
|
44 |
5) For the next step do not delete the template dir, but delete all the |
45 |
other profile dirs you've just created. No, this is not a joke. |
46 |
|
47 |
cd ~/.mozilla/firefox/cjyqsiqd/ |
48 |
rm -rf profile1 profile2 profile3 ... profilen |
49 |
|
50 |
6) Launch firefox with the template profile... |
51 |
|
52 |
firefox -new-instance -P template |
53 |
|
54 |
...and tweak it to your heart's content, keeping in mind what options |
55 |
your profiles will need. Install extensions, set font sizes, your |
56 |
favourite behaviours, tweak the menu bars, set cookie options, etc. And |
57 |
make sure to set the browser to open to a home page (more on that |
58 |
later). When you're finished, exit Firefox. |
59 |
|
60 |
7) Copy your template directory to replace the profile directories you |
61 |
deleted in step 5. This is a lot easier than doing the same changes in |
62 |
several directories. The names will be different depending on what did |
63 |
in step 3. |
64 |
|
65 |
cd ~/.mozilla/firefox/cjyqsiqd/ |
66 |
cp -r template profile1 |
67 |
cp -r template profile2 |
68 |
cp -r template profile3 |
69 |
... |
70 |
cp -r template profilen |
71 |
|
72 |
8) Open the profiles and do the final customizations for each profile |
73 |
separately. The command is |
74 |
|
75 |
firefox -new-instance -P profilename |
76 |
|
77 |
The customizing includes stuff like which cookie domain(s) to accept and |
78 |
which page(s) to open on startup. And yes, you can get Firefox to open |
79 |
multiple tabs on startup. When entering the homepage to open, separate |
80 |
the pages with pipe signs " | ", e.g... |
81 |
|
82 |
http://foo.com | http://bar.com | ftp://bad.example.com/data.txt |
83 |
|
84 |
> Note, you will also need to remove any flash cookies (LSOs) which |
85 |
> sit in your ~/ and are not deleted, unless you have installed the |
86 |
> Better Privacy addon. For a more pedestrian approach: |
87 |
> |
88 |
> rm -Rf .macromedia/Flash_Player/* |
89 |
|
90 |
There also seems to be ~/.adobe directory. What I do is to create |
91 |
*FILES* (yes) like so... |
92 |
|
93 |
touch ~/.adobe |
94 |
touch ~/.macromedia |
95 |
|
96 |
This blocks the creation of directories by that name. Some idiot sites |
97 |
will refuse to play videos in that situation. I click on the Flash |
98 |
button, and the video displays something like "Error #2046". I have a |
99 |
workaround for that, namely a script ~/bin/killflash like so... |
100 |
|
101 |
#!/bin/bash |
102 |
rm -rf ~/.adobe |
103 |
rm -rf ~/.macromedia |
104 |
sleep 20 |
105 |
rm -rf ~/.adobe |
106 |
touch ~/.adobe |
107 |
rm -rf ~/.macromedia |
108 |
touch ~/.macromedia |
109 |
|
110 |
I launch killflash in an xterm, and then click on the video to play. |
111 |
Note that the video only has to start within the 20-second window. The |
112 |
way that linux works, you can delete a file, but any app that has it |
113 |
open will continue to see it, even though no other apps can. As soon as |
114 |
the last filehandle to the file is closed, its space is finally released. |
115 |
|
116 |
-- |
117 |
Walter Dnes <waltdnes@××××××××.org> |
118 |
I don't run "desktop environments"; I run useful applications |