My Win10 pc had a meltdown. No problem really as I was already migrating to Linux. Using Peppermint 10. Before the meltdown, I had copied the Firefox profile folder to an external drive for future use.
So, to make the P-Mint Firefox more usable immediately, I tried to copy over the .json files for bookmarks and logins.
Linux sees them as Program rather than Binary. Is there any way, short of being an expert programmer, that I can get these files to work in Linux ?
Thanks in advance for any ideas.
I suspect that they have windows line endings, which do not work with many linux programs.
Running the files through the
dos2unix command to convert them to unix line endings should work for an easy solution. Some text editors should also do it, as well as
awk although those are more complex.
I’m sorry what
Oh, nvm. Your title confused me super hard.
Did you use a firefox account? Because if so they it backs up all that stuff automatically for you.
Wait what? You’re talking about JSON files?
They are neither. JSON is purely a text-based format, and line endings shouldn’t matter all that much since JSON can also be read without any line endings at all.
So when you say it’s “a program” then either you copied the wrong files, or whatever you used to determine this has weird definitions of programs and strings.
Try restoring the file
Firefox > Bookmarks (three straight line with one sideways line icon) > Bookmarks > Show all bookmarks > Import and Backup > Restore > Choose file
Pick your *.JSON file.
This option asks for a JSON file type
Okay, so a .json is a text file. Gedit won’t properly open it. Gedit gives a warning in red letters at the top that it could not read some of the characters. So I looked for other editors and installed Sublime, and that displays it in 8 columns of letter/number combinations, containing 2053 lines. So, unreadable for me.
It is the file manger that tells me Binary or Program, in the column header when displaying files.
Then it’s not a JSON file.
That’s the typical representation in HEX format for binary files.
Maybe you could start by telling us which files you copied exactly?
Was it something like this:
[[email protected] bookmarkbackups]$ pwd
[[email protected] bookmarkbackups]$ ls -al
drwx------. 2 tarulia tarulia 4096 Oct 28 2018 .
drwx------. 14 tarulia tarulia 4096 Sep 2 18:21 ..
-rw-------. 1 tarulia tarulia 968 Oct 28 2018 'bookmarks-2018-10-28_11_KgoxamZqfp0j+-hQfzX+0Q==.jsonlz4'
AdminDev, thanks for that. It seems I made the problem far more complicated than it was. I was thinking I’d need to copy the file into the folder, never realizing that Linux would allow it’s Firefox to Restore from a json file on a USB external drive.
Bookmarks all sorted. Thanks again.