Comment Comment by hotdox I use next script. It creates temporarily dir for firefox, uses it as a profile dir and remove after firefox closed. #!/bin/sh -e DIR="${XDG_CACHE_HOME:-$HOME/.cache}" mkdir -p -- "$DIR" TEMP="$(mktemp -d -- "$DIR/firefox-XXXXXX")" trap "rm -rf -- '$TEMP'" INT TERM EXIT wget 'https://raw.githubusercontent.com/pyllyukko/user.js/master/user.js' -O "$TEMP/user.js" firefox -profile "$TEMP" -no-remote "$@" It also uses very hardened options from https://github.com/pyllyukko/user.jsIt is not my invention, but I lost a link to blog post parent hotdox 6 years ago
It is not my invention, but I lost a link to blog post