welcome: please sign in
location: MozillaPreferences

1. For the Impatient

The quick and dirty way to set preferences is to browse to the url about:config. It is a pretty self-explanatory gui interface to set and clear user prefs.

A common misperception is that just because a given pref does not appear in about:config, that it must not exist. This is not the case. It only means that the pref does not have a default value.

2. For the Studious

2.1. Theory

For any pref, there are (up to) two values that Mozilla keeps track of: a default value and a user value. User values override default values when the pref's value is queried. Makes sense.

default value
defaults behave more or less like ordinary javascript variables. They are assigned values (through the pref manager) and they retain those values until the program exits.
user value
user values have one up on defaults. When they are assigned a value, that value is recorded to a file on disk, in your profile. That file is loaded at startup, meaning that user values persist from invocation to invocation.

2.2. Rationale

Mozilla's pref system is ideal for programs like Firefox and Thunderbird, whose configuration UIs consist of interactive dialog boxes. The match is not so perfect for a program like Conkeror, which is configured mainly in a runtime script (your .conkerorrc) which is not machine-editable. What is needed is some abstraction over the basic pref system that allows us to conveniently work with prefs in our rc scripts.

The fundamentals as outlined above apply to Conkeror just as they do to Firefox and every other Mozilla program. Default values exist in runtime memory only, and user values are still stored in a file on disk in your profile. Ideally, we could just ignore user values and use only default values which behave like ordinary variables. Then we would not have to worry about values in persistent storage overriding what is in our rc. But user prefs play an important part, which I will come to shortly, so they cannot be completely ignored.

2.3. Practice

Most of the time, when setting prefs in the rc, we want to use default prefs. Since the rc runs every time we start the program, we don't need the disk storage that user prefs provide. For this purpose, Conkeror provides the procedure session_pref.

2.3.1. session_pref

session_pref is a high-level procedure over the pref system which does two things: clear the user value, and set the default value. This has the net effect of freeing you from worrying about user values in your profile overriding what's in your rc. It has the following call form:

session_pref(pref_name, value);

2.3.2. user_pref

But user values cannot be ignored completely. They are still important for one case: prefs that are needed before your rc is loaded. This includes the preference conkeror.rcfile, which sets the filename of your rc. How could you set the rc filename before the rc is loaded? Easy: with a user_pref. Mozilla loads user values from your profile as one of the first things it does during program launch. The call form looks like this:

user_pref(pref_name, value);

3. Resources

4. Small list of useful preferences

browser.enable_automatic_image_resizing
When true image documents will be automatically scaled to fit the viewport.
general.smoothScroll
When true, smooth-scrolling will be enabled.
general.useragent.compatMode.firefox
A value of true makes Mozilla put the word "Firefox" into your user-agent string, which will trick some websites' ua sniffing into thinking you are running firefox.
intl.accept_languages

The list of languages (by their ISO639-1 language code) that the browser exposes to websites. Websites can then use this information to change the the interface language when you visit them. The first languagecode listed has highest priority.

  • Example value: da, en-us, en (i.e. Danish, US English, International English)

layout.scrollbar.side

A value of 3 forces scrollbars to be on the left. Further information.

Conkeror.org: MozillaPreferences (last edited 2012-02-14 19:59:49 by retroj)