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

Installing code as Chrome

last edited 1 year ago by pbier

A nice description of how to package up xul code so you can install it as chrome can be found here: http://www.xulplanet.com/tutorials/xultu/packaging.html

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.

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.