Ephemeral Firefox with Extensions (2/3)

I recently posted about how to create a sandboxed firefox profile to compartmentalize (and shred) your firefox browsing history in an Ephemeral Firefox session. But so far I've only covered how to create a simple vanilla firefox profile. What if you want your Ephemeral Firefox to include a few basic extensions?

This post will cover how to add extensions to your Ephemeral Firefox profile.

Prereqs

Before proceeding, you must first execute the following prerequsites, which are detailed in my first post on setting up an Ephemeral Firefox.

sudo apt-get -y install firejail secure-delete
sudo firecfg --clean

Create Skeleton Directory

Because we build the Ephemeral Firefox profile directory on-the-fly, we need to build a base skeleton directory with the extensions we want and a few configuration files.

The commands below will create the skeleton directory, download a few basic extensions, rename them as needed for installation, and change the config to allow for automatic installation of extensions.

First Run Bootstrap

At this point you should be able to run `ephemeralFirefox.sh` in your shell, and it you'll get a Ephemeral Firefox session with all your extensions installed. But [a] your extensions won't be configured and [b] firefox will probably annoyingly start with a tab for each of the plugins' latest release notes.

We can clean this up a bit by copying a few items from the first run's temporary profile directory and permanently storing it to the skeleton directory created above like so:

First, delete any orphaned temp profile dirs that may be lingering around. Then kick-off the first-run Ephemeral Firefox.

srm -vrfll $HOME/tmp/ephemeralFirefox/*
ephemeralFirefox.sh
...

Then, in another terminal, copy the following items from the first-run Ephemeral Firefox's profile dir into the skeleton dir: