Skip to content

Instantly share code, notes, and snippets.

@geeknik
Last active March 1, 2024 22:02
Show Gist options
  • Save geeknik/d59d48549c19fa082d8b4d0fe152a372 to your computer and use it in GitHub Desktop.
Save geeknik/d59d48549c19fa082d8b4d0fe152a372 to your computer and use it in GitHub Desktop.
launch firefox with a temporary profile and remove the temporary profile when firefox exits
#!/bin/sh
trap 'rm -rf "$PROFILEDIR"' EXIT
PROFILEDIR=$(mktemp -p /tmp -d tmp-fx-profile.XXXXXX.d)
/path/to/firefox -profile "$PROFILEDIR" -no-remote -new-instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment