9

I reinstalled Firefox, because my profile was crashing. I backed up my ~/.mozilla folder to some other place, uninstalled firefox and installed it again. New firefox wasn't crashing. So I copied one of my backup up old profile to new firefox, and that profile was crashing again.

Now, I would like to use completely fresh profile and copy only the things that I need from the old profile that is crashing. Which files need I to replace? I need bookmarks (the quick access bar with bookmarks is sufficient for me and I need all the extensions with extension data). What could I also need and forget? I want to try it, I will at least find out, if it is some extension that's causing the crashes. But, I think it is not. It starts usually when I open a new tab and the page won't load.

My OS is Lubuntu 18.04.6 LTS. Firefox version is 112.0.2 32 bit

1 Answer 1

4

You don't need to reinstall firefox if the system files are not corrupted or damaged.

Firefox Safe Mode

You can also start firefox in the safe mode, so the extensions are disabled

How to Start Firefox in Safe Mode

Firefox Safe Mode is a troubleshooting mode that temporarily disables all extensions, themes, and custom settings in Firefox and starts the browser with default settings. It is designed to help you diagnose and fix problems with Firefox, such as performance issues, crashes, or problems with add-ons.

Firefox profiles with firefox -p

You can start your firefox with firefox -p

Now you get a new popup window where you can create, delete or rename profiles for firefox

Just unmark Use the selected profile without asking at startup

and after that every time firefox start's you can select the profile you wanna work with

You can create different profiles for different use-cases

On my debian gnu/linux the config files are in

~/.mozilla/firefox/

You can copy or backup the profiles from there

The starts with varchar+name like 5v96ky6z.AI but you can rename them and you can copy and start them from an other disk, usb, sshfs/fuse, samba share, nfs, etc..

If you rename and move the folder you need to edit the profiles.ini, in my case the ~/.mozilla/firefox/profiles.ini

You have different blocks for each profile that looks like this:

[Profile0]
Name=MENU_NAME
IsRelative=0
Path=/home/USER/FOLDER_NAME
Default=1

Default=1 You only have this once in the file for only one profile, you can delete this it is not absolutely necessary

Default is the standard profile that will start if Use the selected profile without asking at startup is selected

Name=MENU_NAME The name for your selected profile in the menu list

Path=/home/USER/FOLDER_NAME The path and the folder name of your profile

You can use a relative or an absolute path, you can use IsRelative=0 IsRelative=1

[Profile1]
Name=USERNAME2
IsRelative=0
Path=/MYPATH/FOX2

The name of the selected user Name=USERNAME2 and the name of the folder Path=/MYPATH/FOX2 do not have to be the same

You can add or delete you profiles entries from the backup Don't forget the enumeration of the number must always take place in the order [Profile0], [Profile1], [Profile2]

but in the file the arrangement can be messed up not in the order [Profile2], [Profile0], [Profile1]

You can't have [Profile0], [Profile1] and [Profile3] without and existing dummy-entry or profile named [Profile2]

If you start firefox and the menu is empty, you may have a syntax error.

Backup profile files:

This are the files i do my backup logins, bookmarks, without the extensions or others..

  • places.sqlite
  • logins.json
  • logins-backup.json
  • key4.db

or you backup the whole profile folder, in my case for profile 5v96ky6z.AI ~/.mozilla/firefox/5v96ky6z.AI

places.sqlite is the storage for the bookmarks

For the quick access bar with bookmarks, for your session search for the folders sessionstore or sessionstore-backups or the files sessionstore.jsonlz4

Firefox Sync

You can also link your firefox profile to an email and thus synchronize everything between different firefox instances or computers.

Sync your Firefox on any device

How do I set up Sync on my computer?

Addons & Extensions|xpi(Cross-Platform Install) package/file:

In the profile path ~/.mozilla/firefox/5v96ky6z.AI/extensions in the folder extensions there are the {--ID--}.xpi packages, every addon is a {--ID--}.xpi with an ID

you can open a package with double click an you can see all the files that belongs to an addon example: {b9acf540-acba-11e1-8ccb-001fd0e08bd4}.xpi

In the manifest.json file you get all the information about that selected addon, like description, version. etc.

You can copy this addon to your new/selected profile by right mouse click open as than select firefox start the profile you wanna install to or select open file from your firefox menu and you can easy install that addon from this package

You can also see the extensions if you start about:config in firefox as url and search for

extensions.webextensions.ExtensionStorageIDB.migrated.

If you start about:support scroll down and you will find in the Add-ons area the Addon name for the {--ID--}.xpi package ID

There are also 3 files in the profile path ~/.mozilla/firefox/5v96ky6z.AI/ where you can find other information about the search-engines, settings, etc..:

  • extension-preferences.json
  • extensions.json
  • prefs.js

Maybe you need the addonStartup.json.lz4 file, I did not backup that.

In the storage directory you will find a subfolder for each installed add-on but some add-ons, maybe store the data in a different location/directory in your profile path

What else:

  • Check if there is an addon for your firefox version available to export/backup your addons

Backup with terminal and bash:

You can write a bash script to backup all the files you need, with cp or rsync and/ or create a tar file

Write your on addon|xpi(Cross-Platform Install):

Your first extension

Your second extension

How do I create an addon for Firefox?

Open the about:debugging page, click the This Firefox option, click the Load Temporary Add-on button, then select any file in your extension's directory. The extension now installs, and remains installed until you restart Firefox.

8
  • Thank you. You forgot only, how to safely copy extensions from one profile to another?
    – xralf
    Commented May 12, 2023 at 19:49
  • 1
    @xralf | i will be back later than i will add more information... max 1 hour ^^
    – Z0OM
    Commented May 12, 2023 at 20:00
  • So, it's not possible to simply copy the extensions from command-line? I'm using i3 window manager, which file manager you suggest to use when it is not possible do it command line?
    – xralf
    Commented May 12, 2023 at 22:14
  • And another thing. I'd like to copy the data associated with the extensions as well. For example I'm using Element Blocker, SiteDelta watch, Adblock Plus and they have some data associated with them and I'd like to transfer them to new profile as well.
    – xralf
    Commented May 12, 2023 at 22:22
  • 6
    You can copy all files you need from the terminal, i use a bash script with cp or rsync for my ff backup
    – Z0OM
    Commented May 12, 2023 at 22:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .