Firefox configuration from command line: edit, change, copy, migrate or backupBy neokrates, written on April 27, 2010 |
howto |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Your favorite browser?
- Firefox (44%, 7 Votes)
- Something else (31%, 5 Votes)
- Opera (19%, 3 Votes)
- Safari (6%, 1 Votes)
- Firefox based (swiftfox, iceweasel, etc) (0%, 0 Votes)
- Internet Explorer (0%, 0 Votes)
- Chrome (0%, 0 Votes)
- Galleon (0%, 0 Votes)
- Lynx (0%, 0 Votes)
Total Voters: 16
Loading ...
Sometimes you only have a terminal access on the target system, but Firefox still needs to be properly configured (maybe you create automatic test environment). So, you have one source system, where you can configure Firefox visually and one fresh headless (at least for you) unix system.
Software:
Firefox
Unix
Should also work with:
Any OS with Firefox (shell commands might be different though)
Most of the standard config settings are stored in your ~/.mozilla/firefox/$YOUR_PROFILE/prefs.js. So, configuration changes can be done directly.
The only problem is that it is error-prone to type all of it manually. That is why you can just tune your config on the source system and then just copy it.
| 1 |
Source and destination Firefox profiles
Make sure that you can access the active firefox profiles on source and destination systems.
type: vim ~/.mozilla/firefox/$YOUR_PROFILE/prefs.js on both systems (if your have many profiles, the active one is normally in ~/.mozilla/firefox/ profiles.ini)
You will see smth. like:
# Mozilla User Preferences .. user_pref("accessibility.typeaheadfind.flashBar", 0); user_pref("app.update.lastUpdateTime.addon-background-update-timer", 1272354540); ..
If Firefox on target system has no profiles just yet, make one:
firefox -CreateProfile $YOUR_PROFILE
| 2 |
How to copy some settings
Sometimes, only particular settings need to be copied (example: proxy settings). To do that store the original copy of prefs.js from the source system. Then, try to change the setting you are interested in in the firefox GUI. Firefox will store your setting in the prefs.js. By comparing stored and updated versions of prefs.js you can find the settings you seek.
| 3 |
If you want to copy all config
| 3.1 |
Archive the source ~/.mozilla/firefox/
zip -r sourceFirefoxConf.zip __~/.mozilla/firefox/__
| 3.2 |
Backup and remove the target ~/.mozilla/firefox/
| 3.3 |
Extract settings for target
Unzip, put under ~/.mozilla/firefox/ and make sure the user, which starts firefox also is the owner of ~/.mozilla/firefox/:
On target system
chown $FFOX_USER:$FFOX_GROUP -R ~/.mozilla/firefox/
| 4 |
If you want to backup and restore later
Backup into /your/backup/dir:
mkdir -p /your/backup/dir zip -r /your/backup/dir/backupFirefoxConf.zip ~/.mozilla/firefox/
You can unzip and replace later Firefox config versions with backup whenever you want.
Have fun!
|
LEARN MORE (amazon bookstore)
|
|
TAGS
|
|
SOCIAL
|


















