Join the Mozilla’s Test Days event from Dec 2–8 to test the new Firefox address bar on Firefox Beta 134 and get a chance to win Mozilla swag vouchers! 🎁

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

How can I update bookmarks.html and prefs.js after installing Firefox on Linux?

  • 2 回覆
  • 2 有這個問題
  • 5 次檢視
  • 最近回覆由 cor-el

more options

Hello! I work for a non-profit organization that wipes donated computers clean, loads Edubuntu, and gives them to underprivileged kids. As part of the install process, we run a script that sets the homepage and adds lots of bookmarks (e.g. a link to an online encyclopedia) to Firefox. The script broke a few weeks ago with the 3.6.8 update.

I've modified the script but I am still having lots of trouble. It seems I need to replace bookmarks.html and prefs.js in the /home/user/.mozilla/firefox/*.default/ directory. However, the script runs immediately after the installation of Edubuntu and before the computer is used for the first time and the directory does not seem to come into existence until Firefox is run.

I've tried "firefox -CreateProfile user" and this causes the directory to be created but then the terminal says I do not have permission to access it and Firefox never finishes loading. It appears in the bottom taskbar briefly and then disappears.

Is there a way I can force the /home/user/.mozilla/firefox/*.default directory and related files to be created without actually launching Firefox? Why are these files and folders not created when it is installed? Is there another way to go about accomplishing what I need: changing the homepage and adding the bookmarks before the computer is used?

Thank you in advance for any help!!

Hello! I work for a non-profit organization that wipes donated computers clean, loads Edubuntu, and gives them to underprivileged kids. As part of the install process, we run a script that sets the homepage and adds lots of bookmarks (e.g. a link to an online encyclopedia) to Firefox. The script broke a few weeks ago with the 3.6.8 update. I've modified the script but I am still having lots of trouble. It seems I need to replace bookmarks.html and prefs.js in the /home/user/.mozilla/firefox/*.default/ directory. However, the script runs immediately after the installation of Edubuntu and before the computer is used for the first time and the directory does not seem to come into existence until Firefox is run. I've tried "firefox -CreateProfile user" and this causes the directory to be created but then the terminal says I do not have permission to access it and Firefox never finishes loading. It appears in the bottom taskbar briefly and then disappears. Is there a way I can force the /home/user/.mozilla/firefox/*.default directory and related files to be created without actually launching Firefox? Why are these files and folders not created when it is installed? Is there another way to go about accomplishing what I need: changing the homepage and adding the bookmarks before the computer is used? Thank you in advance for any help!!

所有回覆 (2)

more options

What I would do is set up Firefox as you want it - with all the bookmarks and preference and whatever.

Then on every new machine just copy the entire profile folder ~/.mozilla/firefox and all its subdirectories onto the new machine before running Firefox.

You can delete or empty the cache directory.

I can't think of a reason why that won't work - though there may be one ;-)

The bookmarks are actually in places.sqlite:

http://kb.mozillazine.org/Profile_folder_-_Firefox

http://kb.mozillazine.org/Bookmarks

由 DaveRo 於 修改

more options

You can set prefs for a new via a file user.js in the default template folder ("C:\Program Files\Mozilla Firefox\defaults\profile\ ") You can also place a file bookmarks.html in that same folder.
This will only work for to initialize new profiles.

It is possible to lock prefs and make it impossible to change them via the about:config page.
See http://kb.mozillazine.org/Locking_preferences