
Need to change the location of "~/.mozilla" for Linux Firefox
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.
Modified
Chosen solution
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.
- http://kb.mozillazine.org/Determining_plugin_directory_on_Linux
- https://developer.mozilla.org/en-US/docs/Installing_extensions
- https://developer.mozilla.org/Gecko_Plugin_API_Reference/Plug-in_Basics#How_Gecko_Finds_Plug-ins
All Replies (11)
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
- http://kb.mozillazine.org/Moving_your_profile_folder#Create_a_new_profile_and_migrate_your_old_data
- http://kb.mozillazine.org/Profiles.ini_file
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.
Maybe you can create a hard link or a soft link to this folder.
@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.
@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.
you can launch firefox with certain command line arguments to force it to use a profile located in a certain path...
@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....
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.
@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.
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.
- The system requirements are here http://www.mozilla.org/en-US/firefox/25.0/system-requirements/
- If using & installing Mozilla Firefox I will repeat the link. It is install firefox on linux (Ensure you have the required libraries.)
- If using a Red Hat distro consult a Red Hat or an independent forum such as mozillazine: e.g. http://forums.mozillazine.org/viewtopic.php?f=38&t=2732555
- I am sure you will discover that on Red Hat you may choose the location where you wish to extract and install Firefox.
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
- better link https://developer.mozilla.org/docs/Mozilla/Command_Line_Options
- similar info from mozillazine
http://kb.mozillazine.org/Command_line_arguments#List_of_command_line_arguments_.28incomplete.29
Modified
Chosen Solution
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.