Question

I'm making a Bootstrap addon.

On Firefox pre-startup I need to make it read a profiles.ini file from a custom path. Normally, it always tries to read profiles.ini at this location: OS.Path.join(OS.Constants.Path.userApplicationDataDir, 'profiles.ini');

On Windows XP it is:"C:\Documents and Settings\Noitidart\Application Data\Mozilla\Firefox"

Is it possible to make it read from another location?

Was it helpful?

Solution

Where profiles.ini is read from isn't exactly something you can influence. Given that no profile is selected at this point, your add-on obviously isn't active yet. Also, any preferences your add-on could write aren't active either because these would be stored in the profile as well. And if you look at the actual implementation - there is indeed no configurability here, the profiles.ini file is always looked up in userApplicationDataDir. On Linux you could manipulate that value by setting the HOME environment variable differently, this approach won't work on Windows or OS X however - OS functions are used to locate the home directory there.

So what you could do is bypassing profiles.ini completely by passing in -profile c:\foo\bar command line option when you run Firefox, this will make Firefox use the specified profile directory. Other than that there isn't much you can do.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top