-
Your OS uses systemd
-
Firefox is installed
-
fuse-overlayfs
is installed
sudo pacman -S fuse-overlayfs
sudo yum -y install fuse-overlayfs
sudo apt-get install fuse-overlayfs
sudo dnf -y install fuse-overlayfs
sudo zypper install fuse-overlayfs
- Copy "firefoxpwa-runtime-overlayfs.service" to
$HOME/.config/systemd/user
- cURL
curl https://gist.githubusercontent.com/JJRcop/46450e4f7aa0770a60cb8d4a61ecd2f6/raw/6cd70d4153c4b3f0fb66ecfe1c8552fb1e48d1cd/firefoxpwa-runtime-overlayfs.service -o $HOME/.config/systemd/user/firefoxpwa-runtime-overlayfs.service
- Wget
wget https://gist.githubusercontent.com/JJRcop/46450e4f7aa0770a60cb8d4a61ecd2f6/raw/6cd70d4153c4b3f0fb66ecfe1c8552fb1e48d1cd/firefoxpwa-runtime-overlayfs.service -O $HOME/.config/systemd/user/firefoxpwa-runtime-overlayfs.service
- Modify
AssertPathIsDirectory=
andlowerdir=
paths to point to your Firefox runtime
FIREFOX_RUNTIME=/usr/lib/firefox sh -c 'sed -i -e "s|%%runtime_path|${FIREFOX_RUNTIME}|" $HOME/.config/systemd/user/firefoxpwa-runtime-overlayfs.service'
- Install the service
systemctl --user enable --now firefoxpwa-runtime-overlayfs.service
- Check that the runtime overlay was installed correctly by clicking on the extension in Firefox
- Finally, make sure
Always patch runtime and profile
is enabled in PWAsForFirefox
You can make an equivalent script which runs when you log in (a form that is run as the logged in user is preferred) This section will try to be POSIX-compliant to help the most people
Your script should:
- Create
upper/
andwork/
directories under$XDG_RUNTIME_DIR/firefoxpwa/overlayfs
$XDG_RUNTIME_DIR
may be substituted for any tmpfs, ramdisk, or equivalent ephemeral directory if/run/user/$(id -u)
is not used by your OS
- Run
fuse-overlayfs -f -o squash_to_uid=$(id -u),squash_to_gid=$(id -g),lowerdir=%%runtime_path,upperdir=$XDG_RUNTIME_DIR/firefoxpwa/overlayfs/upper,workdir=$XDG_RUNTIME_DIR/firefoxpwa/overlayfs/work $HOME/.local/share/firefoxpwa/runtime/
, replacing%%runtime_path
with the path to your Firefox runtime
When logging out
- Run
fusermount -u $HOME/.local/share/firefoxpwa/runtime/
to unmount the runtime overlayfs - Destroy the
upper/
andwork/
directories, or leave them if your OS destroys them for you