Once upon a time Firefox had -remote for executing commands on linux like that, but it was removed back in Firefox 39. This also allowed doing useful stuff like telling firefox to reload a url.
but also:
-remote "xfeDoCommand(close)"
Regrettably there's no replacement for this super useful legacy functionality that I know of apart from Selenium Webdriver (have fun) or xdotool scripting.
Of those options, xdotool sending commands to window with Firefox name to ctrl-q is probably sanest, with possible confirmation prompt handling.
Once upon a time Firefox had -remote for executing commands on linux like that, but it was removed back in Firefox 39. This also allowed doing useful stuff like telling firefox to reload a url. close)"
but also:
-remote "xfeDoCommand(
Regrettably there's no replacement for this super useful legacy functionality that I know of apart from Selenium Webdriver (have fun) or xdotool scripting.
Of those options, xdotool sending commands to window with Firefox name to ctrl-q is probably sanest, with possible confirmation prompt handling.