首先要查找到64位firefox的搜索工具栏的插件位置在哪里
首先执行whereis firefox
得到firefox: /usr/bin/firefox /usr/lib64/firefox /usr/share/man/man1/firefox.1.gz
可以大概知道firefox的lib库位置
接着执行find /usr/lib64/firefox/ | grep searchplugins
得道
/usr/lib64/firefox/browser/searchplugins
/usr/lib64/firefox/browser/searchplugins/amazondotcom.xml
/usr/lib64/firefox/browser/searchplugins/bing.xml
/usr/lib64/firefox/browser/searchplugins/duckduckgo.xml
/usr/lib64/firefox/browser/searchplugins/eBay.xml
/usr/lib64/firefox/browser/searchplugins/google.xml
/usr/lib64/firefox/browser/searchplugins/twitter.xml
/usr/lib64/firefox/browser/searchplugins/wikipedia.xml
/usr/lib64/firefox/browser/searchplugins/yahoo.xml
/usr/lib64/firefox/browser/searchplugins/baidu.xml
进入目录
cd /usr/lib64/firefox/browser/searchplugins/
sudo vi baidu.xml
添加内容
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Baidu</ShortName>
<Description>zlidentify baidu</Description>
<InputEncoding>ISO-8859-1</InputEncoding>
<Url type="text/html" method="GET" template="http://www.baidu.com/s">
<Param name="ie" value="utf-8"/>
<Param name="wd" value="{searchTerms}"/>
</Url>
<SearchForm>http://www.baidu.com/</SearchForm>
</SearchPlugin>
Saved,restart firefox
OK