I would like to make a bash script that will iterate over different user agent options, open Firefox with the selected user agent, wait for x seconds, and then close, and loop.
Is there a command-line option for firefox
to specify the user agent?
I would like to make a bash script that will iterate over different user agent options, open Firefox with the selected user agent, wait for x seconds, and then close, and loop.
Is there a command-line option for firefox
to specify the user agent?
There is no flag for this specific purpose, but you can create a set of Firefox profiles, where each profile will specify a particular user agent.
There is an about:config option general.useragent.override
, which you can specify in the user.js
file in the profile folder with a line like:
user_pref("general.useragent.override", "Mozilla/5.0 AppleWebKit/…")
You can then start Firefox with the -P
flag, providing the name to the specific profile.