Quit Firefox gracefully from the command line
Since Firefox has problems handling SIGTERM gracefully, here's another way of quitting a running instance from the command line:
wmctrl -c firefox
firefox is the pattern used to match the window title against.