MozillaZine

[Solved] bookmarks.html in user.js export fails in Windows

User Help for Mozilla Firefox
ineuw

User avatar
 
Posts: 600
Joined: March 19th, 2006, 4:17 pm
Location: Québec, Canada

Post Posted October 17th, 2020, 3:15 pm

I use this user.js preference in several installations of Windows and Linux, each with their appropriate syntax and path without a glitch. But, in my Windows 10 desktop installation it fails. It creates the bookmarks,html file in the profile folder. How can I fix this issue? The path was verified over and over.

Code: Select all
user_pref("browser.bookmarks.autoExportHTML", true);
user_pref("browser.bookmarks.file", "D:\google-drive\firefox\bookmarks\w10pdt.html");
Last edited by ineuw on October 18th, 2020, 5:49 am, edited 1 time in total.
Windows 10 Pro and Linux Mint 20.0 Cinnamon 64 bit, with the latest FF releases (currently 80beta6 en-US).

morat
 
Posts: 4019
Joined: February 3rd, 2009, 6:29 pm

Post Posted October 17th, 2020, 4:50 pm

In JavaScript, the backslash is an escape character. Try replacing single backslashes with double backslashes in the prefs.js file.

Code: Select all
user_pref("browser.bookmarks.autoExportHTML", true);
user_pref("browser.bookmarks.file", "D:\\google-drive\\firefox\\bookmarks\\w10pdt.html");

If you edit the preference in the about:config page, then use single backslashes.

ineuw

User avatar
 
Posts: 600
Joined: March 19th, 2006, 4:17 pm
Location: Québec, Canada

Post Posted October 17th, 2020, 9:17 pm

Thanks for the help. Changing it didn't help because of the existing error, until I deleted and recreated the prefs.js. Now all is well. Another question, is it possible to import a bookmarks file automatically on opening the browser?
Windows 10 Pro and Linux Mint 20.0 Cinnamon 64 bit, with the latest FF releases (currently 80beta6 en-US).

jscher2000

User avatar
 
Posts: 11073
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted October 17th, 2020, 9:48 pm

I don't see anything related to bookmarks here:

https://developer.mozilla.org/docs/Mozilla/Command_Line_Options

ineuw

User avatar
 
Posts: 600
Joined: March 19th, 2006, 4:17 pm
Location: Québec, Canada

Post Posted October 18th, 2020, 5:52 am

jscher2000 wrote:I don't see anything related to bookmarks here:

https://developer.mozilla.org/docs/Mozilla/Command_Line_Options


It's a user preference. Not a command line option.

[url]https://kb.mozillazine.org/About:config_entries#Browser[/url]
Windows 10 Pro and Linux Mint 20.0 Cinnamon 64 bit, with the latest FF releases (currently 80beta6 en-US).

jscher2000

User avatar
 
Posts: 11073
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted October 18th, 2020, 11:00 am

ineuw wrote:
jscher2000 wrote:I don't see anything related to bookmarks here:

https://developer.mozilla.org/docs/Mozilla/Command_Line_Options


It's a user preference. Not a command line option.

There is a preference to import a bookmarks file automatically on opening the browser?

therube

User avatar
 
Posts: 20559
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted October 20th, 2020, 11:12 am

On "first run", possibly it is if places.sqlite is not found ?, FF will (automatically) import an (existing) "bookmarks.html" file (found in the Profile Folder).

So there may be some Pref that you can flip that will cause FF to re-import from bookmarks.html on startup?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

ineuw

User avatar
 
Posts: 600
Joined: March 19th, 2006, 4:17 pm
Location: Québec, Canada

Post Posted October 20th, 2020, 6:31 pm

therube wrote:On "first run", possibly it is if places.sqlite is not found ?, FF will (automatically) import an (existing) "bookmarks.html" file (found in the Profile Folder).
So there may be some Pref that you can flip that will cause FF to re-import from bookmarks.html on startup?


Thanks. I have some "master lists" of user preferences with varying counts. Is there a recently updated complete list available? about:config lists over 4,000, but doubt that they are all functional. And how many are relevant to me?
Windows 10 Pro and Linux Mint 20.0 Cinnamon 64 bit, with the latest FF releases (currently 80beta6 en-US).

Return to Firefox Support


Who is online

Users browsing this forum: Bing [Bot] and 7 guests