I am writing a program that needs to open a list of URLs. I have firefox on Ubuntu12.04, and every time I kill firefox and reopen it, there will be a message asking if I want to restore the previous sessions or not, which is quite annoying.
I invoke firefox(in Java) using
Runtime r= Runtime.getRuntime();
r.exec("firefox -new-instance www.google.com");
and kill it using
r.exec("killall firefox");
Is there a way to kill and reopen firefox more gracefully? I want the program run automatically without any pop-up messages or human intervention. Thanks a lot!