Friday, 13 March 2015

How to move a Firefox profile to reduce the size of your roaming profile

I found that logging into Windows was taking an age in the office, as my roaming profile had crept up to 3GB, which naturally takes some time to bring over the network. Rooting around to see what I could move to a local hard drive folder on C:, I noticed just how many files were under the Mozilla folder containing my Firefox and SeaMonkey profiles.

At first sight the advice on how to move a profile looked so involved that I gave up. One day later when things were quieter I tried again, and it's actually remarkably simple!

Here's what you need to know : the Firefox profile is just a folder full of files and subfolders. It's not quite as easy as moving this folder though, as the browser needs to know where to look. Firefox keeps its own record of where the profile is, and this is easily changed with the -p option.

To find the profile folder

Use the menu option : Help... Troubleshooting Information... and there you'll find a button [Show Folder]. Click this, and close the browser, keeping the folder open  (it should be somewhere under your profile if you're in the same boat that I was)

To create a new folder

Create the folder where you would like it to be on your C or D drive, etc.
Now you just have to tell the browser where it is. Use the Start.. Run.. method to open an application, and run : Firefox -p
The -p parameter tells Firefox (and SeaMonkey, also from Mozilla) to open in Profile Manager mode. Here you'll find a simple dialog that should need no further explanation really. Just add a new profile, point it to your new folder, and away you go - launch the browser and verify that your settings have vanished.

Copy the profile

Now, without the browser running, delete everything in the new folder, and copy everything from the original profile folder. Launch with -p again, select the new local profile and verify all your settings are back to normal.

Delete the old profile

If you're happy with the new profile, you can exit, go back in with -p and delete the old profile. You may now find that logging in to Windows is significantly quicker!

What about Chrome?

Chrome can be persuaded to use a profile in another location by changing the shortcut properties target and adding on your new path (you may need to change this in several locations depending upon how many ways you launch Chrome - e.g. start menu, pinned launcher, desktop icon.

"C:\Program Files\Google\Chrome\Application\chrome.exe" --disk-cache-dir="E:\YourPath" --user-data-dir="E:\YourPath"

However, this doesn't change the default call to the exe when a URL is launched from another app or the start menu's run box - Chrome is launched using the bare exe path on its own as stored in the Windows registry (HKEY_CLASSES_ROOT\http\shell\open\command and HKEY_CLASSES_ROOT\https\shell\open\command). I shy away from trying to modify this, as there are so many other references to chrome.exe in my registry (apart from the "chrome.exe,0" ones used in relation to grabbing the icon) that I'd rather not meddle and risk breaking it!

And another 'however' - having carefully updated my shortcut targets, I opened a www URL from the start menu run box, and up came Chrome using the old (default) profile location. Then, having closed it, I launched Chrome again from the icon pinned to the task bar and it had lost the settings I had made. The disk-cache-dir and user-data-dir param.s had vanished. Sigh!

There is another method, adding a string value called UserDataDir under
but this overrides any use of the --user-data-dir command-line option so you won't be able to use different profiles.

Another approach (Win 7 and later) involves placing a symbolic link in the default location to redirect file access elsewhere - not much help for XP diehards.

And then there's the method of enabling a profile switch to Chrome's interface - browse to
 - but this means running Chrome first, before changing the profile. This is hopeless if some other app launches a URL and it's already using the default profile path before you get a chance to change it!

Needless to say, I'm not a great fan of Chrome and I don't use it unless I have to! Having this much disregard for a basic requirement is not a great indicator of software quality, is it?

No comments:

Post a Comment