IPv6 Google Toolbar for Firefox running Linux

Published:
Due to recent concerns over the inevitable depletion of the current pool of IPv4 addresses and the desire to provide additional functionality for modern devices, an upgrade to IPv6 on my Internet connection was needed for me to explore the world of IPv6. IPv6 is the new Internet Protocol that is gaining global adoption and acceptance. One of the issues that I came across is that there are many services and applications that do not work very well with IPv6 or not at all. Although IPv6 is maturing, we have to give the new protocol the benefit of the doubt; plus, we are in need of a new one as IPv4 is over 30 years old. One thing I did notice is that IPv6 did not work was the infamous Google toolbar; it worked as expected with IPv4.

Google Toolbar is a down-loadable toolbar for the Internet web browsers, Firefox and Internet Explorer. The toolbar allows a user to conduct a Google search without visiting the Google website (Typing http://www.google.com in the address bar of the browser).

When you install the toolbar, you are upgrading your Internet searching experience which will allow the use of the toolbar to perform a Google search for any site on the web, or to search for specific words on any given page. By default, the search function in the Google toolbar only works for IPv4 (Or at least until Google adds DNS AAAA resource records to their authoritative nameservers); Currently, they have a few AAAA records, but none for the parent domain, www host, or none for suggestqueries.google.com. In this tutorial, we will create an additional Google toolbar for Firefox running on Linux to conduct searches via IPv6.

Although IPv6 is beyond the scope of this tutorial, this tutorial will guide you through on how to create an additional Google toolbar specifically for IPv6. This will allow you to continue to use IPv4 searches if your IPv6 connection is having issues or is temporarily down. As you might already know, certain applications that Google offers can be reached via IPv6, one being the popular search engine: http://ipv6.google.com; However, if you have the Google toolbar installed, it will only search via IPv4 or at least until google adds AAAA records to their authoritative nameservers for www.google.com/google.com.

I went on a quick mission for resolution! I needed to locate the file that was associated with the Google toolbar.

sudo find / -name \*[Gg]oogle\* | grep -i search
                      

Open in new window


The file that sparked my interest was the google.xml file; after opening the file and reviewing the contents, it turned out that the google.xml was the file that was needed. While reviewing the code I notice a snippet of code:

template="http://suggestqueries.google.com/complete/search?output=firefox&client=firefox
                      

Open in new window


Note: do not modify this code, this code is needed for the Suggest Queries/searches. Google does not offer any IPv6 services for the Suggest searches/queries for the toolbar (At least none that I could not find, but that is ok; tis minor!); eventually (Hopefully soon) Google will add IPv6 functionality for this feature/service.

For now, we will only update the code for the Search Engine:

Steps: We will need to locate google.xml, make copies, rename and then modify the file, then restart Firefox.

bguthrie@neteng01 ~ $ sudo updatedb
                      [sudo] password for bguthrie:
                      
                      bguthrie@neteng01 ~ $ locate google.xml
                      /usr/lib/firefox-addons/searchplugins/google.xml
                      /usr/lib/firefox-addons/searchplugins/google.xml.org
                      /usr/lib/firefox-addons/searchplugins/en-US/google.xml
                      /usr/lib/firefox-addons/searchplugins/en-US/ip6.google.xml
                      

Open in new window


If you do not have locate binary/package, then you can use the find command:

sudo find / -name google.xml
                      

Open in new window


For the rest of the examples, just change the absolute path to match yours:

Backup orginal file:
sudo cp /usr/lib/firefox-addons/searchplugins/en-US/google.xml /usr/lib/firefox-addons/searchplugins/en-US/google.xml.org
                      

Open in new window


Create a copy of the file and rename it:
sudo cp /usr/lib/firefox-addons/searchplugins/en-US/google.xml /usr/lib/firefox-addons/searchplugins/en-US/ip6.google.xml
                      
                      edit copied/renamed file
                      [code]
                      sudo vi /usr/lib/firefox-addons/searchplugins/en-US/ip6.google.xml
                      

Open in new window


Find these 2 lines:
  <ShortName>Google</ShortName>
                        <Description>Google Search</Description>
                        <Url type="text/html" method="GET" template="http://www.google.com/search">
                      
                      the template=URL might not be the same, you might have search or cse:
                        <Url type="text/html" method="GET" template="http://www.google.com/cse">
                      

Open in new window


Modify the lines to read:
  <ShortName>Google IPv6</ShortName>
                        <Description>Google IPv6 Search</Description>
                        <Url type="text/html" method="GET" template="http://ipv6.google.com/search">
                      

Open in new window


End result will be:
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
                        <ShortName>Google IPv6</ShortName>
                        <Description>Google IPv6 Search</Description>
                        <InputEncoding>UTF-8</InputEncoding>
                        <Image width="16" height="16">data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAaRJREFUeNpiVIg5JRURw0A0YAHio943kYV%2B%2Ff33%2BdvvX7%2F%2FMjEx8nKycrGzwKXOiPKzICvdeezLhCV3jp15%2Bfv%2FX0YGhv8MDDxMX2qKTIw0RK10eYD6QYqATvoPBkt3f5K0W9Ew4fjTFz%2F%2Bw8Dm3W8UPeZxqFa%2BevsFyD0twgfVsOfkRxHrtfV9u5BVQ8Crd98%2FffkGYQM1QJ20%2FfSPv79eNxQGYfpSVJADmcvEAHbr7oOX2dj%2FERNKIA2%2F%2F%2Fz%2FxfCDhYVoDUDw5P6vf9%2B5iY0HVmZGQWm%2BN3fff%2Fn2k4eLHS739x%2FDiRs%2Ff%2F%2F5x8HO%2FOHzN3djfqgNjIwMgc6qzLx%2Fpy47j2zY%2Feff06tXhOUucgxeun33AUZGpHh4%2Bvo7t8EyIJqz%2FhpasD59%2B5dNrqdnznZIsEL9ICXCsWuBCwvTv%2FymS5PWPP32ExEALz%2F%2BB5r848cPCJcRaMP9xaYQzofPPzfuvrnj0Jst%2B5%2F8%2Bc4sLPeDkYlRgJc93VPE18NIXkYUmJYQSQMZ%2FP3379uPH7%2F%2F%2FEETBzqJ0WqLGvFpe2LCC4AAAwAyjg7ENzDDWAAAAABJRU5ErkJggg%3D%3D</Image>
                        <Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;client=firefox&amp;hl={moz:locale}&amp;q={searchTerms}"/>
                        <Url type="text/html" method="GET" template="http://ipv6.google.com/search">
                          <Param name="q" value="{searchTerms}"/>
                          <Param name="ie" value="utf-8"/>
                          <Param name="oe" value="utf-8"/>
                          <Param name="aq" value="t"/>
                          <!-- Dynamic parameters -->
                          <Param name="rls" value="{moz:distributionID}:{moz:locale}:{moz:official}"/>
                          <MozParam name="client" condition="defaultEngine" trueValue="firefox-a" falseValue="firefox"/>
                        </Url>
                        <SearchForm>http://www.google.com/firefox</SearchForm>
                      </SearchPlugin>
                      

Open in new window


Finally, you will need save the file and then restart Firefox. You will then have a new drop down menu for the search toolbars; select the newly created search box (Google IPv6).

That's it, have fun and good luck!

Billy Guthrie
0
5,529 Views

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.