Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding A Custom Search Engine To Firefox [closed]

Tags:

firefox

I need to add a custom search engine to Firefox. I have a name and a search url.

  1. What options should I change in %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js file?

  2. Do I need to create a distinct xml file for new search engine in one of these folders?

    • %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins

    • %PROGRAM_FILES%\Mozilla Firefox\searchplugins

  3. Should I modify %APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\search.sqlite sqlite database file?

like image 465
Nusrat Nuriyev Avatar asked Apr 01 '12 09:04

Nusrat Nuriyev


People also ask

Can I use a different search engine in Firefox?

To change the default search engine in Firefox, click the three-line icon in the top-right corner. Then go to Options > Search and choose a search engine from the Default Search Engine drop-down. If your preferred provider isn't listed, scroll down to Find more search engines.

Is Firefox no longer a search engine?

Firefox 98 will be released in early March 2022 and it will include a change that replaces the default search engine of the browser with another automatically for some users. Firefox ships with a number of search engines based on a user's region.

What happens when you add DuckDuckGo to Firefox?

At DuckDuckGo, we believe online privacy should be simple. DuckDuckGo Privacy Essentials comes packed with best-in-class privacy essentials and makes browsing in Firefox even faster. FEATURE HIGHLIGHTS: Search Privately — our private search engine comes built-in so you can search the Internet without being tracked.


2 Answers

Here are the steps:

  1. Need to create an xml file which will contain information about search engine like ShortName, Description, Url etc. (Example)

  2. Give a name to that xml file and put it here

    "%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\searchplugins" 

    or here

    "%PROGRAM_FILES%\Mozilla Firefox\searchplugins" 
  3. Modifying firefox preferences file "%APPDATA%\Mozilla\Firefox\Profiles\XXXXXXXX.default\prefs.js"

    Simply add/modify this line:

    user_pref("browser.search.selectedEngine", "engine_name"); 

No need to modify sqlite database file manually. New search engine will be added automatically after restarting Firefox.

like image 51
Nusrat Nuriyev Avatar answered Sep 25 '22 06:09

Nusrat Nuriyev


If you are just trying to search a certain site from the address bar, you do not have to create any OpenSearch XML.

You can add a bookmark with %s as a placeholder, and give it a keyword. The subsequent search terms will fill into the placeholder. For an example that searches Stack Overflow, put these fields into a "New Bookmark"

Name Search Stack Overflow
Location https://stackoverflow.com/search?q=%s
Tags development (your relevant tags)
Keyword so
Description

To perform a search, type so How to exit Vim into the address bar and hit return.

If you have also added search engines in Chrome, you will recognize the same %s placeholder that is used in chrome://settings/searchEngines. I do not know, but it may be that Chrome also uses bookmarks like Firefox under the hood.

like image 39
Michael Avatar answered Sep 23 '22 06:09

Michael