Monday, May 6, 2024
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 9849  / 1 Year ago, sat, april 29, 2023, 2:22:03

I would like to find out the URLs of the currently opened firefox tabs with a terminal command. Is there any possibility?



This way I would be able to write them into a text file and look at them lateron; and safe resources (I often have many open tabs).
I know that there is an add-on for firefox, but I would be more confortable writing my own script.


More From » command-line

 Answers
3

The currently open URLs of the opened Firefox tabs are stored in sessionstore.js file which is located somewhere in $HOME/.mozilla/firefox/XXXXXXXX.default directory.



So, you can start from something like this:



cat $HOME/.mozilla/firefox/*default/sessionstore.js | sed "s/{/
/g" | egrep -o '"url".*"scroll"' | cut -d" -f4


Using cat we can display that file, and with the help of sed, egrep and cut we select only the URLs of the opened Firefox tabs from that file.


[#29734] Sunday, April 30, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
farnic

Total Points: 409
Total Questions: 117
Total Answers: 125

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;