[Gllug] XUL chrome in home directory?

Stuart Children stuart at terminus.co.uk
Wed May 5 09:53:06 UTC 2004


Richard Jones wrote:
> Enough grumbling about banks.  I'm just going to spend another 2 hours
> on the phone tomorrow.

Good luck. :(

> Does anyone know how to make Mozilla recognise a chrome:/... URL which
> actually comes from my $HOME directory (so the XUL runs without
> security restrictions, but I can develop without needing to be root)?
> If so do you think you could send me an example?  I simply cannot get
> this to work ...

It depends what your XUL file is doing. If it's just one XUL file then 
you should be able to just type in the location of the file as a regular 
URL (ie: file:///.../my.xul - or stick it on a websever and use http).

However, if it's more of a XUL package, containing more than one XUL 
files, or has external JavaScript and/or CSS then you need to install it 
properly as chrome. A chrome URL uses Mozilla's chrome directory as its 
root (so the URL is relative to that). This is either a global location, 
or in your Mozilla profile. This would be 
$HOME/.mozilla/$profile_name/$random_chars/chrome/

You may also need to update/create an installed-chrome.txt file in that 
directory which alerts Mozilla to the specific chrome. Then restart Mozilla.

Hope that's enough to get you started - I'm missing out some details of 
the directory structures within the chrome directory and exactly what 
you put in the installed-chrome.txt because I can't recall them for 
certain off hand. Hopefully that's enough information to feed into 
Google, or otherwise check out XULplanet which has some examples.

HTH

-- 
Stuart
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list