How to edit search engines in Firefox Quantum?

In Ubuntu 16, FireFox 58, the configuration file is compressed into the .mozlz4 format:

~/.mozilla/firefox/<name>.default/search.json.mozlz4

You can decompress/compress this file via the python lz4 library:

  • Decompress:
    import lz4.block as lb
    
    infile = '/path/to/infile'
    outfile = '/path/to/outfile'
    
    inf = open(infile, 'rb')
    inf.read(8)
    data = lb.decompress(inf.read())
    outf = open(outfile, 'wb')
    outf.write(data)
    
  • Compress:
    import lz4.block as lb
    
    infile = '/path/to/infile'
    outfile = '/path/to/outfile'
    
    inf = open(infile, 'rb')
    data = lb.compress(inf.read())
    data = b'mozLz40\0' + data
    outf = open(outfile, 'wb')
    outf.write(data)
    

A quick search bookmark is a regular bookmark with a 'keyword' in the properties, so you can edit and configure your quick search engines via the bookmark configuration. Tested in FF Quantum 63.0.3. Simply

  1. Open Bookmark Sidebar via CTRL+B
  2. Filter for the bookmark you want to edit [wikipe] and right-click it
  3. Edit the URL and keyword to your needs: Screenshot

I don't think it's possible with Firefox Quantum anymore, although I remember doing the same many years ago by editing the XML file manually to adjust search settings (see here).

  • I've tried to find a file containing search engine settings by looking for a phrase with one of my search engine's name recursively in Firefox profile directory, however none of the returned files referred to search engines:
    grep -Ri 'some search engine name' ~/.mozilla/firefox/<name>.default/
    

Alternative solutions that allow the generation of a new custom search engine:

  • Mycroft Project:
    Intuitive and user-friendly, with great customization options
  • Ready2Search:
    When creating a search engine with an icon, ensure the image file has an extension (.gif, .jpeg, .png, etc.), else it will error with incorrect/unsupported file format.

Tags:

Firefox