Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a bash-script for installing Firefox which is downloaded and executed from every client workstation in the network. The script is on the server and all workstations are running Ubuntu. Now I want all workstations to have some default predefined bookmarks like company website etc.

So how can I deploy Firefox in that way?

share|improve this question
add comment

3 Answers

There are two methods:

  1. You can export your bookmarks from Firefox by going to Bookmarks > Show all bookmarks > Import and Backup > Backup. You can then restore them on other computers by the same process, but by selecting Restore > Choose File at the final step.
  2. You can copy the bookmarks from your profile and restore them by copying them to the profiles on other computers (or you can copy the entire profile). The bookmarks are at $HOME/.mozilla/firefox/[profile]/bookmarks.htm.

As for the deployment itself, maybe put a profile on a share that the computers can access, and have the script copy from it.

share|improve this answer
    
But I am talking about approximately 300 computers so the first step is not feasible. And a further problem is that the profile folder consists of a random name followed by .profile. Do you know another solution to realize that? Maybe there is a way to copy the bookmarks in the installation folder so that they will be automatically added when Firefox is installed. –  djihad Sep 21 '11 at 12:58
1  
You should just be able to copy the profile verbatim. Just have a copy operation on all of the computers copy the profile. –  Chris Down Sep 21 '11 at 14:04
add comment

If you had installed firefox via the Ubuntu package, you could push your pre-defined bookmarks to /etc/firefox/profile/bookmarks.html, which is used as the basis for new profiles.

I'm assuming you can't provision firefox via the Ubuntu package for some reason. Perhaps too old? In which case, why not package your firefox up as a .deb and provision that to your clients?

share|improve this answer
add comment

Maybe you can have the script change the about:config file (or run a macro to do it) for firefox as well.

You will find bookmarks.html in %APPDATA%\Mozilla\Firefox\Profiles*.default folder on many windows boxes. http://kb.mozillazine.org/Profile_folder_-_Firefox

First get a hard location for that (without the wildcard *) or move it, and make the changes. Unsure about over network, but just test it out.

From that same folder you have prefs.js which is the same settings from about:config in firefox.

Add line to prefs.js: 
user_pref("browser.bookmarks.file", "<BOOKMARK_LOC>");

Manually in firefox:

open about:config in firefox
right click in the window (any of the fields, but in the middle somewhere)
select "New->String"
add "browser.bookmarks.file" and the location "<BOOKMARK_LOC>"

http://ilias.ca/blog/2006/04/customize-the-firefox-bookmarks-location/

haven't tested either way yet, but that would be the way to go.

EDIT: I misread question. Thought you wanted shared bookmarks... You can just edit the bookmark.html in firefox profile folder.

EDIT2: ANd that was windows and not unix/linux. Either way, on linux it's easier. I was coming back to say where in the installer to change.

This is untested also, but I can probably test this later, because I have a Linux box I can change. You can open the installer and change the following:

Before you run, create <BOOKMARK_LOC> with the bookmark.html (I think you need bookmarks.bak too)

edit "<zipped installer>/firefox/defaults/prefs/channel-prefs.js"
add "pref("browser.bookmarks.file", "<BOOKMARK_LOC>");" to the end

Again, haven't tested, but will probably be able too later.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.