Mnenhy 
| resources: | Home Download & Installation Documentation Bugs Source Code Version History Spinoffs |
|---|
| 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:
- Content:
Which GUI elements are used? How do they behave? - Skin:
What do the GUI elements look like? Which fonts and colours are used? - Locale:
Which language is used for texts?
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:
- In $MozillaProgramDirectory/chrome:
- installed-chrome.txt:
One line per chrome package, describing the type of package and the path to its manifest file contents.rdf. Changing installed-chrome.txt (e.g. by adding new lines) makes Mozilla re-reading it at the next startup and adding the information of all manifest files to chrome.rdf and the overlayinfo directory. The deletion of lines does not delete the chrome package from the chrome registry!
Example:skin,install,url,jar:resource:/chrome/classic.jar!/skin/classic/messenger/ content,install,url,resource:/chrome/mnenhy/content/mnenhy/ locale,profile,url,jar:file:///Q:/if93afhv.slt/chrome/messageidfinder.jar!/locale/de-DE/messageidfinder/ skin,install,select,classic/1.0 - chrome.rdf:
One entry for every chrome package installed into the application chrome directory, embedded into a hierarchical structure. The entry is basically the content of the manifest file, plus cross references to other packages used by this one.
Example:<RDF:Description RDF:about="urn:mozilla:package:chatzilla" c:baseURL="jar:resource:/chrome/chatzilla.jar!/content/chatzilla/" c:locType="install" c:displayName="Chatzilla" c:author="mozilla.org" c:authorURL="http://www.mozilla.org/projects/rt-messaging/chatzilla/" c:description="A simple, straightforward Internet Relay Chat (IRC) client." c:localeVersion="1.7a" c:extension="true" c:settingsURL="" c:name="chatzilla" /> - overlayinfo:
Mozilla supports overlaying of GUI elements and stylesheets. The relevant information needed is taken from the manifest file of packages installed into the application chrome directory and stored here, sorted by files touched.
Example:<RDF:Seq RDF:about="chrome://communicator/content/tasksOverlay.xul"> <RDF:li>chrome://editor/content/editorTasksOverlay.xul</RDF:li> <RDF:li>chrome://wallet/content/walletTasksOverlay.xul</RDF:li> <RDF:li>chrome://venkman/content/venkman-overlay.xul</RDF:li> <RDF:li>chrome://inspector/content/tasksOverlay.xul</RDF:li> <RDF:li>chrome://mnenhy-chroman/content/mnenhy-chroman-tasksOverlay.xul</RDF:li> <RDF:li>chrome://mnenhy-regrig/content/mnenhy-regrig-tasksOverlay.xul</RDF:li> </RDF:Seq>
- installed-chrome.txt:
- In $ProfileDirectory/chrome:
- chrome.rdf:
Like $MozillaProgramDirectory above, but for packages installed into the profile. Additionally, the selected skin and selected locale is stored here.
Example:<RDF:Description RDF:about="urn:mozilla:package:venkman"> <c:selectedLocale RDF:resource="urn:mozilla:locale:en-US:venkman"/> </RDF:Description> - overlayinfo:
Like $MozillaProgramDirectory above, but for packages installed into the profile.
- chrome.rdf:
- Im $ProfileDirectory:
- XUL.mfasl bzw. XUL.mfl:
Last good state of the computed GUI, so that it does not need to get rebuild at every startup.
- XUL.mfasl bzw. XUL.mfl:
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:
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:
- active (normal text; checkmark):
The package is installed and used. - inactive (bold, red text; dot):
The package is installed but not used. - (deleted) (gray text):
The package will be deleted when Chrome Managers is closed by OK.
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:
- Application (normal text; diamond):
The package is installed into the application chrome directory. - Profil (underlined,
green text; dot):
The package is installed into the user profile chrome directory.
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:
- Diamond (normal text):
The package is used from the .jar archive. - Dot (blue text, in italics):
The package is used from the directory structure.
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:
- Extract:
The package's .jar archive will be extracted into the directory structure at the current location, but the archive state will remain untouched. Files already existing in the directory structure will be overwritten.
This function will be applied immediately and cannot be undone! - Purge:
The directory structure at the current location will be erased, but the archive state will remain untouched.
This function will be applied immediately and cannot be undone! Furthermore, it may crash Mozilla permanently! - Purify:
The chrome registry is rebuild from the still current data, changes made in Chrome Manager are not considered.
This function will be applied immediately and cannot be undone! - OK:
The requested changes will be made after confirmation. The Chrome Manager and Mozilla will be closed.
The removal of packages needed for Mozilla startup can permanently crash Mozilla! - Cancel:
Chrome Manager will be closed without making any changes. - Help:
This page. Will also be shown when hitting [F1].
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:
- Identify all content packages of the addon.
- For each content package X:
- Select the desired location.
- For each entry Packages → X → Skins → <Skin_y>,
select the matching location for the corresponding entry
Skins → <Skin_y> → Packages → X.
Tip: double click the URN in the value column. - For each entry Packages → X → Locales → <Locale_y>,
select the matching location for the corresponding entry
Locales → <Locale_y> → Pakete → X.
Tip: double click the URN in the value column.
- Leave Chrome Manager via OK.
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:
- Identify all content packages of the addon.
- For each content package:
- Select the desired activation state.
- Leave Chrome Manager via OK.
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:
- A package has been moved to a location where it will not work.
- A package has been removed that is needed for startup.
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.
- The directory structure of an active package has been removed via Purge.
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);