{"id":1286,"date":"2025-02-06T19:58:46","date_gmt":"2025-02-06T19:58:46","guid":{"rendered":"https:\/\/geekblog.febo.com\/?p=1286"},"modified":"2025-02-06T19:59:53","modified_gmt":"2025-02-06T19:59:53","slug":"customizing-firefox-search-engines-feat-searxng","status":"publish","type":"post","link":"https:\/\/blog.febo.com\/?p=1286","title":{"rendered":"Customizing Firefox Search Engines (Feat. SearXNG)"},"content":{"rendered":"\n<p class=\"has-black-color has-text-color has-link-color wp-elements-7b9d804e405bf58ec686e0ac8e4afb96\">In an attempt to de-google my life, I am running a local instance of <a href=\"https:\/\/docs.searxng.org\/\" data-type=\"link\" data-id=\"https:\/\/docs.searxng.org\/\">SearXNG<\/a>, a search front end that uses multiple search engines, anonymizes requests, and blocks ads and AI drivel.  It works really, really well.<\/p>\n\n\n\n<p class=\"has-black-color has-text-color has-link-color wp-elements-d9a2f20c35757c908d65b571f6b3a8d6\">I wanted to make it my default search engine in Firefox, and that proved to be a bit challenging.  I want to document here what I did; it might be useful not only for this but for other tweaks to your search engines.  Follow these steps.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install the &#8220;local&#8221; SearXNG extension that&#8217;s available for Firefox.  Go to Settings\/Search, then click &#8220;Find More Search Engines&#8221; and search for &#8220;SearXNG&#8221;.  You&#8217;ll find several listings.  The one I started with (in February, 2025) is called &#8220;Private &#8211; SearXNG&#8221;.  Install that.<\/li>\n\n\n\n<li>Exit Firefox and open a console window, navigating to your profile directory (on Linux, in ~\/.mozilla\/firefox\/&lt;something>.default-release).<\/li>\n\n\n\n<li>There&#8217;s a file called &#8220;search.json.mozlz4&#8221;.  Make a backup copy.<\/li>\n\n\n\n<li>Then run this command:<br \/><code>python3 -c \"import lz4.block; open('search.json', 'wb').write(lz4.block.decompress(open('search.json.mozlz4', 'rb').read()[8:]))\"<\/code><\/li>\n\n\n\n<li>That will decompress the search configuration file.  Now run:<br \/><code>python3 -m json.tool search.json > search_pretty.json<\/code><\/li>\n\n\n\n<li>That will yield a nicely formatted version of the JSON file.  Find the line(s) with the SearXNG URL and edit it to suit your needs, and save the file.<\/li>\n\n\n\n<li>Now run these commands to recompress the file:<br \/><code>python3 -c \"import json, sys; json.dump(json.load(open('search_pretty.json')), open('search.json', 'w'))\"<\/code><br \/><code>python3 -c \"import lz4.block; open('search.json.mozlz4', 'wb').write(b'mozLz40\\0' + lz4.block.compress(open('search.json', 'rb').read()))\"<\/code><\/li>\n\n\n\n<li>Now when you restart Firefox, you should have SearXNG available with your customized URL.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-black-color has-white-background-color has-text-color has-background has-link-color wp-elements-47d958ad6a60c5b6ae01d7b70f52ffdc\">This procedure should allow you to modify any Firefox search engine entry.  I&#8217;ve only used if for SearXNG, though.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In an attempt to de-google my life, I am running a local instance of SearXNG, a search front end that uses multiple search engines, anonymizes requests, and blocks ads and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[90,1],"tags":[89],"class_list":["post-1286","post","type-post","status-publish","format-standard","hentry","category-software","category-uncategorized","tag-software-web-internet-search"],"_links":{"self":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/1286","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1286"}],"version-history":[{"count":2,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/1286\/revisions"}],"predecessor-version":[{"id":1298,"href":"https:\/\/blog.febo.com\/index.php?rest_route=\/wp\/v2\/posts\/1286\/revisions\/1298"}],"wp:attachment":[{"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1286"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1286"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.febo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1286"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}