Firefox configuration from command line: edit, change, copy, migrate or backup

By neokrates, written on April 27, 2010

howto

Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • 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

    Vote

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

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:

[v] Firefox
[v] Unix

Should also work with:

[v] 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!

 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +1 (from 1 vote)
1 votes 'YES'  0 votes 'NO'

LEARN MORE (amazon bookstore)

TAGS

RELATED
Pages
Posts
    nope :(

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


Leave a Reply