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
In Mac OS X, you could use AppleScript to close it (adjust the application name as necessary; I don't have FireFox installed to test):
$ osascript -e 'tell application "FireFox"
quit
end tell'
This should trigger the same event that the Quit menu command triggers, so FireFox should shut down cleanly.
Obviously, this won't work in Linux.