Open Bug 1759673 Opened 3 years ago Updated 11 months ago

Configurable profile path

Categories

(Toolkit :: Startup and Profile System, enhancement)

Firefox 98
enhancement

Tracking

()

People

(Reporter: maxime.accadia, Unassigned)

Details

(Keywords: dupeme)

Expected results:

Following up on a discussion on Mozilla Enterprise mailing list.

I think it would be useful to have a way to configure where the Firefox profile is stored. Currently the default an only path supported is %AppData%\Roaming\Mozilla\Firefox on Windows.

For example QGis has an option to define where the profile should be stored via an environment variable.

Chrome has an option to define this path through group policy :
https://chromeenterprise.google/policies/#RoamingProfileLocation

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0

Hi,

Thank you for opening this enhancement. I will set this as New and waiting for the developer's opinion about it.
If this is not the correct component feel free to change it to a more appropriate one.

Thanks for your report.

Status: UNCONFIRMED → NEW
Component: Untriaged → Startup and Profile System
Ever confirmed: true
Product: Firefox → Toolkit

We already do support setting a custom profile path with the XRE_PROFILE_PATH environment variable. Does that cover this?

Flags: needinfo?(maxime.accadia)

(In reply to Dave Townsend [:mossop] from comment #2)

We already do support setting a custom profile path with the XRE_PROFILE_PATH environment variable. Does that cover this?

It does, thank you. Sorry I missed it.

I noticed few caveats :

  • If the folder defined by XRE_PROFILE_PATH does not exists, Firefox fail to start with the error "Your Firefox profile cannot be loaded. It may be missing or inaccessible". This is a bit of an issue but it's possible to work around.
  • about:profiles does not show anything
  • XRE_PROFILE_PATH specifies where the profile is and not where to store profiles. It is not the same as redefining the %AppData%\Roaming\Mozilla\Firefox path.

I think it covers most use cases though.

Flags: needinfo?(maxime.accadia)

According to Relocating non-persistent parts of Firefox profile, it seems to be a good idea to define XRE_PROFILE_LOCAL_PATH in addition to XRE_PROFILE_PATH. Non-persistent parts of the profile are then stored in XRE_PROFILE_LOCAL_PATH.

There is a bug somewhere on being able to override the main directory for testing purposes that would probably cover this use-case

Severity: -- → N/A
Keywords: dupeme

This feature is basically mandatory for use at my job. We need to store the profile in a different spot than the default location using GP. I know we can edit the shortcut or .ini file, but that is not feasible in a mass deployment. Way too many ways for users to accidentally step around those.

Mossop: How difficult do you think it would be to set the main Mozilla/Firefox folder via policy?

(In reply to Mike Kaply [:mkaply] from comment #7)

Mossop: How difficult do you think it would be to set the main Mozilla/Firefox folder via policy?

The simplest would be to just deploy a profiles.ini file that points the profile to where you want it to be, though that runs the risk of breaking as we make changes to that file and wouldn't allow you to split roaming and local profile parts.

Otherwise we'd probably have to add a policy hook into https://searchfox.org/mozilla-central/rev/159929cd10b8fba135c72a497d815ab2dd5a521c/toolkit/xre/nsXREDirProvider.cpp#1352 to allow an override at some point.

You need to log in before you can comment on or make changes to this bug.