Personal tools
You are here: Home / cmgui / Zinc / Installing code as Chrome

Installing code as Chrome

A nice description of how to package up xul code so you can install it as chrome can be found here:

It states there are two ways of doing this:

  • adding manifest files into either the application or use specific chrome directories
  • installing an extension.

I found the information on the tutorial slightly inaccurate and misleading. It states that:

all you need to do to install a new package is add a new manifest file either into the application chrome directory or the user
specific chrome directory. This latter chrome directory is normally the one used since the application directory might not have
sufficient permissions to write into it.

This is not true. If you want to try testing a privileged XUL code in the Firefox browser without creating an extension you must put the manifest file in the application chrome directory (eg /usr/lib/firefox/chrome) otherwise your manifest file is ignored. Placing a manifest file in the user specific chrome directory does not seem to have any effect.

It is desirable to be able to place manifest files in the chrome directory as it allows you to develop code for extensions without having to package them up. In theory you should be able to put them in your own user specific directory (eg somewhere like ~/.mozilla/firefox/idr1qmb5.default/chrome), in practice this does not work. This is annoying as you can only place a manifest file in the application chrome directory if you have admin priveleges. If you do not have sufficient privelegs to write files to the admin directory you can still install XUL code but you will need to create a package first. Packages install themselves into the user specific extension directory (eg something like ~/.mozilla/firefox/idr1qmb5.default/extensions) and a manifest placed here has the desired effect.