by ketanmaheshwari · 1y ago · 0 comments
Ancient documentation: https://www-archive.mozilla.org/docs/command-line-args.html
PROFILEDIR="$(mktemp -d)"
firefox --no-remote --profile "$PROFILEDIR" --screenshot $PWD/output.png https://xkcd.com
rm -r "$PROFILEDIR"
(You don't have to create and destroy a profile directory every time, but it's cleaner to do that way and you need one per instance you're going to run anyways)