I am writing documentation using Pandoc, with a view to having it be viewed in HTML eventually on my web site. During development I want to test how the results look locally, so I have a build command set up in Geany like this:

pandoc --toc --smart --standalone %f -o %e.htm && firefox %e.htm

This all works fine, except that every time I hit the function key to run this, a new tab opens in Firefox, and eventually I have lots of them with older versions of my test document.

My question ...

Can I make Firefox reopen (or reload) a particular tab, from the command line?


  • Ubuntu 14.04
  • Firefox 39.0
  • pandoc
  • geany 1.23.1
  • Close the old tab when you are finished with it? – waltinator Jul 29 '15 at 4:22
  • I'm not sure when I'm finished with it. I review the rendered output, change the markup, review, change etc. Finally I re-test. My point is that the "I'm finished with it" moment is not an easy decision to make. Sure, it's a couple of keystrokes to go back to the older tab and close it, but aren't computers supposed to save us effort? Having said that, certainly that is my current workflow. :) – Nick Gammon Jul 29 '15 at 4:35

Maybe you should add a new Firefox profile, eg with the name development, for the following solution and start this profile (via -P development) for your development process.

With this profile open about:config and search for browser.link.open_newwindow.

Change the value to 1 to open links that would normally open in a new tab in the current tab.


  • 1
    Just to expand on this solution, which worked perfectly (thanks!) - I added -P foo to my command to open Firefox which opens the profile foo. With that profile open I did as suggested, and all seems to be well. – Nick Gammon Jul 29 '15 at 5:15

If you don't need to use Firefox, you could also use the WebHelper plugin. It adds an minimal browser widget based on WebKit to Geany and can e.g. reload the page when saving the document. It's quiet handy on hacking CSS for a webapplication or other HTML related stuff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.