Please Note: This is hosted at https://codeberg.org/ryangreenup/firefox-podman, if you’re viewing this on GitHub it is only a mirror. Please use the bug tracker on Codeberg for any issues.
This runs firefox in a container, this makes it easier to rsync
the firefox profile between machines because the version will be consistent.
- Clone the repo
- Install the dependencies
pip install click
- Build the dockerfile
./run.py build
- Make a Directory for the profile
mkdir -p ./data/profiles/arkenfox
- Run a shell in the container
./run.py run --shell --profile ./data/profiles/arkenfox
- Create a new profile under
~/.mozilla/firefox/main_profile
using the Profile Manager:firefox --ProfileManager
Then exit the container
- Run firefox from the container:
./run.py run --profile ./data/profiles/arkenfox
- Optionally symlink
./run.py
to~/.local/bin/firefox-podman
:./run.py install # unisntall with # ./run.py uninstall
./run.py run --profile ./data/profiles/arkenfox
If the host has XDG_SESSION_TYPE=wayland
and XDG_USER_DIRS
is defined, firefox will run through wayland and unset the X11 DISPLAY
variable.
This uses pipewire pulse to communicate with pipewire on the host.
A run shell script is included that can be used for debugging
Firefox only allows one instance of a profile to run at a time, it is configured to simply attach back to the last running session. This is confusing and not implemented here, instead, create new windows from the running session.
I had some grief running VPNs, I had to restart the container, I’ve since mounted /etc/resolv.conf
and this should probably fix that.
One can use rsync
or unison
to syncrhonise profiles. Syncthing is not recommended because the files will change a lot during runtime and this will likely lead to a poor experience. I’ve used git
and the experience was pretty good also.
target="my_other_pc"
user="username"
dir="$HOME/Sync-Current-rsync/containerized_applications/share/firefox"
rsync -avh "${dir}/" ${user}@${target}:"${dir}"