Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On the overview in gnome-shell, there are two search buttons for Google and Wikipedia. Is it possible to create a similar button for Ask Ubuntu?

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

I have found fossfreedom's answer to create a DuckDuckGo search button in gnome-shell to be useful and I have used it as a base to answer this question.

To create a new search provider, copy the google.xml file as a template.

11.10

sudo cp /usr/share/gnome-shell/search_providers/google.xml /usr/share/gnome-shell/search_providers/askubuntu.xml

12.04

sudo cp /usr/share/gnome-shell/open-search-providers/google.xml /usr/share/gnome-shell/open-search-providers/askubuntu.xml

Change the following XML tags in the askubuntu.xml file:

<ShortName>Ask Ubuntu</ShortName>
<Description>Ask Ubuntu Search</Description>
<Url type="text/html" method="GET" template="http://askubuntu.com/?q={searchTerms}"/>

If you have done everything right, you should be seeing the Ask Ubuntu search button in the overview.

enter image description here

share|improve this answer
2  
<Url type="text/html" method="GET" template="http://askubuntu.com/search?q={searchTerms}"/> (Use this url string instead, to make use of the search function! - Curious, no one mentioned it!!) –  v2r Apr 20 '12 at 20:03
    
@v2r Very good point indeed. Changed the URL as you mentioned. Thanks! –  jokerdino Apr 20 '12 at 22:29
    
You are welcome jokerdino! –  v2r Apr 22 '12 at 16:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.