Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some issues are caused by the current profile, so it is a good idea to use a temporary profile for testing weird bugs. Here is a script to automatically create and clean up a temporary Firefox profile:

  $ head -n-0 ~/bin/firefox-tmp-profile 
  #!/bin/sh
  # Workaround for missing feature:
  # https://bugzilla.mozilla.org/show_bug.cgi?id=1604376
  set -e
  dir="$(mktemp --tmpdir --directory firefox-tmp-profile-XXXXXXXX)"
  cleanup () { rm --recursive --force "$dir"; }
  trap cleanup EXIT
  firefox -no-remote -profile "$dir" "$@" || true


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: