Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to figure out how to deploy a set of Firefox defaults (some changeable some not) to a series of Ubuntu Desktops. The machines are running Natty and Firefox 6. I would like to install this set of defaults as a .deb package ideally.

I thought I would start small and set the default homepage using one of the config files but so far I can't get firefox to acknowledge any of my changes regardless of where I put them. My basic test has been this:

pref('browser.startup.page', "http://askubuntu.com");

And so far I have put that line in:

/etc/firefox/syspref.js

/usr/lib/firefox-6.0/defaults/pref/vendor.js

~/.mozilla/firefox/whatever.default/prefs.js

~/.mozilla/firefox/whatever.default/user.js

/usr/share/xul-ext/ubufox/defaults/preferences/000system.js

I quit Firefox, make the change in the file and then log out and log in and start FF again. Every one of these has been unsuccessful.

Keeping in mind that the default homepage is only the first of about a dozen settings I need to customize, how can I get Firefox to use the settings I am adding?

share|improve this question
add comment

1 Answer

Firefox generally reads its settings from ~/.mozilla/firefox, so if you have the settings in a shared location, once that folder has been created, Firefox will ignore your shared settings. What you could do however is take a look at the addon Install xulext-ubufox used by Ubuntu to modify Firefox settings (it is installed by default), and see how that gets it done.

Another option, if the systems do not yet have user accounts set up (or if you can recreate the accounts), is to put a customized ~/.mozilla/firefox folder in /etc/skel. This will be copied to all new accounts.

A third, possibly easier option, is to create the customized defaults, package them in a deb that points to some shared location like /usr/share/firefox-defaults, and then copy these settings on startup (of the user profiles) to ~/.mozilla/firefox. I don't know the full technical details of accomplishing this, but I believe it should be possible to do it by adding something to /etc/rc.local

Another way to get this ~/.mozilla/firefox re-initialised on every login could be by making a 'login-script', activated by the pam-script module. See here for more info on how to use it.

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.