mozdev.org

 Mnenhy    

resources:
Junk Tools Contents Registry Viewer

The Chrome Manager (SeaMonkey below v2, Mozilla, Thunderbird below v1.5, Firefox below v1.5)

What is Chrome?

With Mozilla and its derivates, the term chrome denotes the entirety of the graphical user interface. At close range, we can distinguish between three subareas:

Mozilla supports the installation of custom expansion modules for chrome called addons or extensions. These packages are installed either into the application chrome directory for use by every user or into the profile chrome directory for use by just one user. Usually, they consist of several chrome packages, each describing one of the chrome aspects above.

The Extension Manager that is contained in the stand-alone clients Firefox and Thunderbird since the last few releases is actually just a side entrance to the chrome registry. While installed extensions are stored in a separate directory extensions, the real chrome registration works as before, only the path to an extension is different.

The chrome registration process has changed significantly in Firefox/Thunderbird 1.5 and newer, so the Chrome Manager had to be disabled for them. The information given here is still valid for Mozilla, SeaMonkey and older versions of Firefox/Thunderbird!

The Chrome Manager allows for manipulation of the location, the activity state and the archive state of these chrome packages: packages can be moved between profile and application chrome directories, they can be deactivated temporarily or removed completely. Corresponding .jar files can be extracted into local directories and used there. This simplifies testing addons without uninstaller or building custom hacks and modifications enormously.

This feature is nothing for the faint-hearted: you may destroy your Mozilla installation if you don't know what you're doing! Please read this page carefully!

The chrome registry

Mozilla's GUI, build up by preinstalled and added chrome packages, is stored in a collection of files that together form the chrome registry:

The Chrome Manager window

When you start the Chrome Manager (via Tools → Chrome Manager), the information stored in the chrome registry is read and a hierarchical tree view of all installed chrome packages is built up:

Chrome Manager window

All editable values can be manipulated either by mouse clicks onto the respective icons, via the context menu or by shortcut keys; changed rows will be shown with a yellow background.

Apart from activation state and archive state, changes can only be made if write permission exists for the application chrome directory. Chrome Manager will symbolize that by adding (Root Mode) to the window title.

Package

This column contains the tree view of the chrome registry:

        +- Packages
        |  +- <Package name>
        |  |  +- Properties
        |  |  |  +- <Propert_1>
        |  |  |  ...
        |  |  +- Skins
        |  |  |  +- <Skin_1>
        |  |  |  ...
        |  |  +- Locales
        |  |     +- <Locale_1>
        |  |     ...
        |  ...
        +- Skins
        |  +- <Skin_1>
        |  |  +- Properties
        |  |  |  +- <Property_1>
        |  |  |  ...
        |  |  +- Packages
        |  |     +- <Package name>
        |  |     |  +- Properties
        |  |     |     +- <Property_1>
        |  |     |     ...
        |  |     ...
        |  ...
        +- Locales
           +- <Locale_1>
           |  +- Properties
           |  |  +- <Property_1>
           |  |  ...
           |  +- Packages
           |     +- <Package name>
           |     |  +- Properties
           |     |     +- <Property_1>
           |     |     ...
           |     ...
           ...

Each entry Packages → <Package_x> → Skins → <Skin_y> corresponds to a respective entry Skins → <Skin_y> → Packages → <Package_x>; the same does apply for locales.

Changes to an entry will be marked by a small flag next to the package name. They can be undone by clicking upon the flag or by hitting the [Backspace ←] key.

Value

This column shows the values of the various properties, e.g. the version of a skin package or the URN of a locale package.

If the value is an URN (e.g. urn:mozilla:locale:de-DE:mnenhy), the focus can be set to that other package by double clicking the URN or hitting [G].

Status

This column shows the activation state of a package:

The activation state can be toggled by clicking upon the checkmark or by hitting [Space].

Deleting a package can only be done via the [Del] key.

Location

This column gives the location of a package:

The location can be toggled by clicking upon the icon or by hitting [L]. If no icon is visible, no changes are possible.

Jar

Chrome packages are usually stored as .jar files, i.e. as Zip archives, in the location's chrome directory. But they can also be used from directory structures and thus be manipulated much easier. This column shows the archive state of a package:

The archive state can be toggled by clicking upon the icon or by hitting [J]. If no icon is visible, no changes are possible.

Buttons

These buttons are available:

Help

How to move an addon?

Moving addons is only possible if you have write permission to the application chrome directory. You can change a package's general location (application or profile), but you can't change the package's installation base directory (chrome or extensions).

Then these steps are needed:

Since it is possible to store multiple addons in just one .jar archive, it is possible to have that .jar archive in both chrome directories!

How to remove an addon (temporarily)?

Apart from removing addons entirely, they can also be deactivated temporarily. For addons residing in the application chrome directory you need to have the respective write permission, but addons installed into your profile can always be removed.

These steps are needed:

Since it is possible to store multiple addons in just one .jar archive, the .jar archive might not be deleted!

My chrome directory grows voraciously!

Before making changes to the chrome registry, Chrome Manager will save all relevant files into the subdirectory .mnenhy.bak of the respective chrome directory. If an addon is uninstalled and its files are not used by other packages, these files will also be moved there.

Even though every file is stored exactly once in that directory, there may be many different files aggregating there.

If you are sure that you do not need these backup copies, the directory .mnenhy.bak can be deleted.

Waaah! Mozilla won't start anymore!

There can be several reasons for Mozilla not to start after manipulating the chrome registry:

In these cases, the solution is rather simple: Chrome Manager stores old files in a subdirectory of both chrome directories named .mnenhy.bak. Copying its content back into the respective chrome directory while Mozilla is not runnning will restore the old state. Additionally, you need to delete XUL.mfasl/XUL.mfl in your profile directory.

If the package is still available as a .jar archive, you could extract that again with a zip utility. If not, reinstalling Mozilla might be the easiest solution.

Debug

You can activate logging of the Chrome Manager by adding the following line to your user.js:

user_pref("extensions.mnenhy.log.chroman", true);