Skip to content

Instantly share code, notes, and snippets.

@vifon
Created April 18, 2019 19:45
Show Gist options
  • Save vifon/af4d4cf3e73b3f467f4c67daadf7474a to your computer and use it in GitHub Desktop.
Save vifon/af4d4cf3e73b3f467f4c67daadf7474a to your computer and use it in GitHub Desktop.
Start an absolutely fresh Firefox instance that's self-destruct afterwards
#!/bin/bash
finish() {
rm -rf "$TMP"
exit
}; trap finish EXIT INT TERM
TMP="$(mktemp -d -t prefix.XXXXXX --tmpdir=/tmp)"
env HOME="$TMP" firefox -no-remote "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment