I'm doing some automation with Firefox and although I can open Firefox window from shell, I'm not able to terminate it properly. If I kill
Firefox process with kill -3
or kill -2
command the next time I open a new Firefox window it asks me if I want to run in safe-mode. I understand that calling kill -9
could confuse Firefox so it would try to run in safe-mode but -3
should be fine.
Do you have any idea how to gently tell Firefox to close properly?
A bit more gentle
As @skybert indicated in the comment, you can
in
about:config
, whichTo get rid of the safe-mode message, you can set the config
or (just set) the environment variable
MOZ_DISABLE_AUTO_SAFE_MODE
.Less gentle
In lack of a better solution, you can remove
sessionstore.js
from the profile folder after thekillall
.This is no more "gentle" than your solution, but it fixes the "Safe Mode" message:
Source: https://support.mozilla.org/en-US/questions/817752