A few notes about how to get useful information from Firefox/Iceweasel on the command line. All examples were run on using Bash on Debian. A post I found interesting while researching how to do the below was this post on the new way Firefox does session restores in version 33 and up. Also of note if you have an SSD beware of the heavy writes Firefox does as part of the session save process.
Finding open tabs turns out to be pretty easy, this guy has a python one-liner to do it. He also has some other information about stuff you can pull out of the JSON which is worth checking out. I felt like something a bit more compact so I decided to see if jq could grab the data for open tabs.
At first glance I throught the python script was filtering by index of 1 so I wrote up this:
Neat, except I was getting the wrong URL's on some of the entries. Seems you need to take the index and use that value to grab the correct entry within entries. Turns out after looking through the manual jq can actually do just that:
Next up lets say you closed that tab, no worries we can grab it from history with sqlite like so:
That's all for now, feel free to head back to the mostly empty home page