I found the following methods to be working, testing on Ubuntu 20.04:
Method 1: Using the mozlz4 binary from GitHub:
Download the linux binary for mozlz4 from https://github.com/jusw85/mozlz4.
Then run the following:
chmod u+x mozlz4-linux
./mozlz4-linux -x filename.jsonlz4
Method 2: Using the lz4json package from Ubuntu repos:
Ubuntu 20.04 repos have a package named lz4json.
I haven't checked whether it is present on previous Ubuntu versions.
To install and use that, run
sudo apt install lz4 lz4json
lz4jsoncat ~/.mozilla/firefox/default/sessionstore-backups/recovery.jsonlz4
The above output will show a minified json.
To make it readable, you can use the 'jq' json parser:
sudo apt install jq
then pipe the output of the previous command through jq to make it readable:
lz4jsoncat ~/.mozilla/firefox/default/sessionstore-backups/recovery.jsonlz4 | jq
If you just want to see the list of URLs and the page titles, you can use this:
lz4jsoncat ~/.mozilla/firefox/*default*/sessionstore-backups/recovery.jsonlz4 \
| jq '.["windows"] | .[0] | .["tabs"] | .[] | .["entries"] | .[0] | .url,.title' \
| grep -v 'New Tab' | grep -v 'about:newtab' | sed 's/"http/\n"http/g'