January 4, 2008

For some changes to be made, you need to edit configuration files manually in spite of using Firefox GUI.

There are three files you should know about:

userChrome.css
used to change the appearance of the browser

userContent.css
used to change the appearance of web pages

user.js
used to change various preferences

All these files are plain text files you need to create in your profile folder.
They can be edited using a standard text editor, such as Notepad on Windows and gedit on Linux.

Locate your profile folder

Profile folder is where Firefox saves all your settings on your hard drive.

Windows Vista/XP/2000

the path is usually %AppData%\Mozilla\Firefox\Profiles\xxxxxxxx.default\ where xxxxxxxx is a random string of 8 characters. Just browse to C:\Documents and Settings\[User Name]\Application Data\ Mozilla\Firefox\Profiles\ on Windows XP/2000 or C:\users\[User Name]\AppData\Roaming\Mozilla\Firefox\Profiles\ on Windows Vista, and the rest should be obvious.

Windows 95/98/Me

the path is usually C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\xxxxxxxx.default\

Linux

the path is usually ~/.mozilla/firefox/xxxxxxxx.default/

Mac OS X

the path is usually ~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/

%AppData% is a shorthand for the Application Data path on Windows 2000/XP/Vista. To use it, click Start > Run… (use the search box on Vista), enter %AppData% and press Enter. You will be taken to the “real” folder, which is normally C:\Documents and Settings\[User Name]\Application Data on Windows XP/2000 and C:\users\[User Name]\AppData\Roaming on Windows Vista.

Firefox is capable of handling more than one user and thus, more than one profile. The path examples above refers to the default profile that is automatically created when you start Firefox for the first time. You can manage any number of profiles by using the Profile Manager.

Make use of Configuration files

userChrome.css

This file sets the display rules for various elements in the Firefox user interface and is located in the sub-folder called chrome in your profile folder. This file does not exist by default, so you need to create it before you can start adding your preferences. There’s actually an example file that exists by default, called userChrome-example.css. Basically, you can just rename that file by removing the -example part.

userContent.css

This file sets the display rules for web content and is located in the sub-folder called chrome in your profile folder. As with userChrome.css, this file does not exist by default, so you need to create it before you can start adding your preferences. As with userChrome.css, there is an example file that exists by default, called userContent-example.css. Basically, you can just rename that file by removing the -example part.

user.js

This is the main preferences file for Firefox and is located in you profile folder. The file does not exist by default, so you need to create it before you can start adding your preferences. In almost all cases, edits made using the user.js can be done via about:config, which is the recommended method.

I used Firefox Help. Content available under a Creative Commons license.

RSS feed for comments on this post. TrackBack URL.

2 comments:

  1. Comment by mousa
    4:04 am, August 22, 2008

    How can i change firefox extension, i mean that i want to remove the uninstall button for all the extensions, can i do it using userChrome.css and if yes, please tell me how
    thanks.

  2. Comment by lrk
    4:58 am, December 7, 2008

    This web looks great!

Leave a comment: