Mozilla Support में खोजें

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Need to change the location of "~/.mozilla" for Linux Firefox

  • 11 प्रत्युत्तर
  • 3
  • 1215 views
  • के द्वारा अंतिम प्रतियुतर cor-el

more options

Currently, FireFox looks for all profiles, extensions, etc... under my home directory in "~/.mozilla".

My corporate work directory is network mounted to a very remote server and our routers can't keep up with the traffic. So I need a way to completely move the .mozilla directory to a local disk partition.

Google searches are only turning up how to move new profiles to a different directory. I'd really like to change the whole .mozilla directory.

Thanks.

Currently, FireFox looks for all profiles, extensions, etc... under my home directory in "~/.mozilla". My corporate work directory is network mounted to a very remote server and our routers can't keep up with the traffic. So I need a way to completely move the .mozilla directory to a local disk partition. Google searches are only turning up how to move new profiles to a different directory. I'd really like to change the whole .mozilla directory. Thanks.

dlpatri द्वारा सम्पादित

चुने गए समाधान

You can only move the profile folder and not the other directories and files in the ~/.mozilla directory. Since you do not have root access, you also can't make Firefox find plugins and possbile globally installed extensions elsewhere.

संदर्भ में यह जवाब पढ़ें 👍 1

All Replies (11)

more options

Operating System discussions and deployment of Firefox on networks is not within the scope of this forum, but I think I can provide the info you need to solve this problem.

The hidden folder .mozilla is not critical. It will work if relocated or with a different name. It contains some Firefox related Files and importantly the profile. I have a standalone Ubuntu machine with multiple versions of Firefox and multiple profiles.

That is why you are mainly finding articles on moving the firefox profile. That is critical. As is the file profiles.ini and their locations in respect to one another. The profiles ini file stores the locations of the profiles. Note this is the file that the profile manager acts on, although with care it may be edited manually. (not recommended, and keep a backup)

In fact removing or renaming profiles.ini forces Firefox to create a brand new clean profile. That in itself is handy sometimes. If your local copy of Firefox has no access to profiles.ini it will attempt to re-create both profiles ini and a new profile.

You need to remember though Firefox expects to find for instance the bookmarks database (places.sqlite) within the profile.

Here are some useful links

As for your home directory etc you choose their locations when setting up or modifying your filesytems. My /home & /usr are on their own separate partitions, with separate Firefox program directories on each. I do not always keep active profiles within /.mozilla

If instead of asking about Firefox you are asking about Linux that is definitely out out of the scope of this forum and you need to discuss on a suitable Linux forum but these links may be useful as a general hint

P.S. You appear to be posting using Firefox 10 on Windows. That is seriously out of date. You should be on Fx25.0.1 on a household computer, and probably Fx17esr or Fx24 ESR at work.

more options

Maybe you can create a hard link or a soft link to this folder.

more options

@john99, This is not an OS question. This is a question about how to change the location of a hidden directory that FireFox uses in a particular type of OS. The OS and Firefox versions were provided in hopes that a solution for that combination could be found. The network mounted home directory was mentioned to provide the rationale for moving the hidden .mozilla directory.

Also, as I mentioned in the question, the computer I'm having an issue with is a corporate computer. One that I do not have root, or sudo, access to, nor do I think that I can get the fundamental problem of having a network mounted home directory resolved. I also do not have any control as to the version of Firefox, or OS, that I'm using.

To re-phrase the question: Is it possible to tell FireFox to use a different directory than "~/.mozilla"? If it is, how do I do that?

Thanks.

more options

@cor-el, I did definitely think about doing that. However, the problem there is that the link still needs to be accessed from my home directory. I would much prefer a solution that completely divorces Firefox from my home directory.

Thanks.

more options

you can launch firefox with certain command line arguments to force it to use a profile located in a certain path...

https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options?redirectlocale=en-US&redirectslug=Command_Line_Options#-profile_.22.2Fpath.2Fto.2Fprofile.22

more options

@philipp, That's starting to get closer to what I'm looking for.

I'm assuming that by default the profile path points to "~/.mozilla/firefox". But what about extensions, found in "~/.mozilla/extensions", or xulrunner applications?

(I found an eclipse folder in .mozilla. Based on the libs in there, I'm guessing that it's a xulrunner app).

I have found arguments that seem to allow me to install "global" extensions. But I don't have admin privileges, and looking at what it does, I'm guessing that manually installing xulrunner apps won't work either....

more options

Maybe instead of asking about

Need to change the location of "'"~/.mozilla""

You should instead read and consider

You can point Firefox at "~/.mozilla/firefox" using a command, a shortcut, or a modification of profiles.ini : either by direct editing, or by use of the built in or a standalone profile manger. This is done so Firefox may find the profile files.

You are placing undue emphasis on the name and location ~/.mozilla/firefox You already mentioned researching moving profiles. It is standard Linux practice to use ~/.mozilla but Firefox will not object to ~/any_name/firefox .

~/.mozilla is the default location for the Firefox directory. Firefox does not mandate and force you to use that location for the Firefox Directory.

N.B. Read: http://kb.mozillazine.org/Profile_folder_-_Firefox#Viewing_profile_directory_structure_from_above
Which explains

Viewing profile directory structure from above
Up one directory from your profile is the Profiles directory which contains one or more profiles, and one directory above that is the Firefox directory which contains Crash Reports directory, Profiles directory, and profiles.ini file. The profiles.ini is a map of profiles used by the Profile Manager.  

It may not be wise or practicable but Firefox would not prevent you using tmp/any-name/firefox as the Firefox Directory


I suppose you could have just

  • Asked your IT dept. to sort out the problem.
  • Or just installed Mozilla Firefox as an additional browser

You would then be able to customise the location of the installed files and if necessary multiple profiles choosing when or if to run the current network profile.

more options

@john99,

Regarding undue emphasis, all the answers received so far have been putting too much on the profiles. The .mozilla directory contains more than profiles. I want everything moved somewhere else and have Firefox find it.

You said: "It is standard Linux practice to use ~/.mozilla but Firefox will not object to ~/any_name/firefox".

I want to know how to tell Firefox to use "/any/path", instead of the default. None of the answers or links have described this yet.

From the command-line I can, of course, move the folder anywhere I want. But Firefox is just going to re-create the standard directory where it expects it, and not find my pre-existing profiles, extensions, or apps.

Even if I downloaded and installed my own version of Firefox, I'm pretty sure that it's still going to use the standard directory in my "home" folder.

I get how profiles work. I've already moved my profile to a local partition and it has helped. But I would really like to find a solution where Firefox isn't using my home directory for anything.

Thanks.

more options

Hi again, please try to read some of the articles

The .mozilla directory contains more than profiles. I want everything moved somewhere else and have Firefox find it. 

I run multiple copies and versions of Firefox with multiple profiles and do so on Windows and Linux. I am well aware there are files besides the profile which is why I quoted http://kb.mozillazine.org/Profile_folder_-_Firefox#Viewing_profile_directory_structure_from_above.

 I want everything moved somewhere else and have Firefox find it. 

Yes but you also said

Also, as I mentioned in the question, the computer I'm having an issue with is a corporate computer. One that I do not have root, or sudo, access to, nor do I think that I can get the fundamental problem of having a network mounted home directory resolved. I also do not have any control as to the version of Firefox, or OS, that I'm using.

That is why I suggested installing Mozilla (or Distro) Firefox in a location you may have control of.

 My corporate work directory is network mounted to a very remote server and our routers can't keep up with the traffic. 

I also wonder why you do not consult your corporate IT department. Especially as you apparently have problems at work with network traffic caused by the existing setup you describe.

I want to know how to tell Firefox to use "/any/path", instead of the default. None of the answers or links have described this yet. The easiest method is the Profile Manger or a commandline. If necessary Firefox creates the profile and files needed at the new location. You must have write access to your profiles.ini file to modify it either with profile manager, or manually edit. You may alternatively create a launcher, or a commandline philipp has already provided the link or see the link in my previous post.

Even if I downloaded and installed my own version of Firefox, I'm pretty sure that it's still going to use the standard directory in my "home" folder. Firefox normally uses certain defaults, but in Windows you are offered options as the installer runs to customise this.

In Linux you may need to consult the OS documentation and Distro documentation. But you should be able to install where you wish.

more options

You finished off by saying

I get how profiles work. I've already moved my profile to a local partition and it has helped. But I would really like to find a solution where Firefox isn't using my home directory for anything. 

So what is Firefox NOT doing from the local partition. Firefox should use any locally installed plugins and extensions. If they are not already installed then simply download and install them locally. (Subject of course to any licensing issues).


edit

John99 द्वारा सम्पादित

more options

चयनित समाधान

You can only move the profile folder and not the other directories and files in the ~/.mozilla directory. Since you do not have root access, you also can't make Firefox find plugins and possbile globally installed extensions elsewhere.