Reply
Thread Tools
xpilz's Avatar
Posts: 9 | Thanked: 23 times | Joined on Apr 2013 @ Germany
#1
Tutorial about how to add your own search engines to the stock browser on your N9.

Hi guys. It's not possible to add a new search engine to the list from the UI. So I figured out a way to do it, via terminal. I think it's an unfinished feature, because what you have to do is pretty easy. After you finished this, the search engine will be able to be selected as an item from the list.
(If you want to change the search engine in opera, follow these instructions: http://talk.maemo.org/showthread.php?t=89244.)
In this tutorial we will add the search engine Duck Duck Go. I will also attach a proper search icon, that you can use, at the end.

First you need terminal access. Easiest way to achieve this is:
  • Settings
  • Safety
  • Developer Mode
  • Enable it and follow further instructions

Proceed with opening the terminal (icon on homescreen) and enter the following:
(note: default password is rootme)
Code:
devel-su
cd /usr/share/applications
echo "[Desktop Entry]
Version=1.0
Type=Application
Exec=/usr/bin/browser
MimeType=x-maemo-urischeme/x-web-search;
NotShowIn=X-MeeGo;
X-Maemo-Service=com.nokia.browser
Icon=icon-m-service-ddg
Name=Duck Duck Go
X-Web-Search-Key=q
X-Web-Search-Url=http://www.duckduckgo.com/" > web-search-ddg.desktop
(note: if you want to use the google button, you have to write Icon=icon-m-service-google instead of Icon=icon-m-service-ddg)

Alternatively you can copy another web-search-*.desktop to web-search-ddg.desktop and edit the specific lines.

Then you need to add this file to the UI selection menu. I have tested a bit around and saw the MimeType Parameter (written above). It contains the parameter that holds the information of the search engines (web-search files). The point is you need to edit the mimeinfo.cache file.

Code:
vi /usr/share/applications/mimeinfo.cache
#Search for web-search
#Or goto line 82
:82
#Now add web-search-ddg.desktop; at the end of the line
A
web-search-ddg.desktop;
:x
The next part is only needed if you want to use my search icon.

Get the icon on your phone. Then execute this, while still logged in as root:
(note: assuming you are, where your icon file is)
Code:
mv icon-m-service-ddg.png /usr/share/themes/blanco/meegotouch/icons
Okay nearly done. If you didn't add my icon then you can continue whatever doing before, otherwise a reboot is needed.

That's it. Thanks for reading and I'm happy for every response I get .
Attached Images
 
__________________
learning..

Last edited by xpilz; 2013-06-15 at 19:46.
 

The Following 18 Users Say Thank You to xpilz For This Useful Post:
Posts: 7 | Thanked: 7 times | Joined on May 2012
#2
That's very similar to what I've done, but as a sidenote: part of DDG's appeal is its lack of tracking. Therefore, it might also be wise to change the search URL to "https" instead of "http" to ensure that each request is encrypted. It might take longer to process because of the SSL handshaking, but that's an inconvenience I (and probably many others) are willing to take.

The other advantage to this is that when searching from the included "Search" app, your DDG search now shows up as an option, which is great for initiating other things using it's !bangs, such as Wikipedia (!w), IMDB (!imdb), Amazon (!a), or even Google (!g).
 

The Following 3 Users Say Thank You to rpcameron For This Useful Post:
knobtviker's Avatar
Posts: 665 | Thanked: 2,388 times | Joined on Feb 2012 @ Zagreb, Croatia
#3
If you want to enable direct https change the line to this in .desktop:
Code:
X-Web-Search-Url=https://duckduckgo.com/
Tested and it works.

Now why wouldn't you package this in a nice little DEB for everyone to use?
For a start. Perhaps later make an app that can generate various search .desktop files and automatically add to mimecache.
 

The Following 5 Users Say Thank You to knobtviker For This Useful Post:
xpilz's Avatar
Posts: 9 | Thanked: 23 times | Joined on Apr 2013 @ Germany
#4
Thanks for suggesting. I'm on it .
__________________
learning..
 

The Following 2 Users Say Thank You to xpilz For This Useful Post:
Posts: 126 | Thanked: 102 times | Joined on May 2013 @ Melbourne, Aus
#5
has there been any news on a deb? i'm just too stupid to do this myself successfully...
 
Posts: 673 | Thanked: 230 times | Joined on Oct 2012 @ Mumbai
#6
Would Like to have it in n9qtweak
__________________
MeeGo Wont Die
2016
 
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#7
Finally looking at basic tweaks like this for my N9 in my scraps of spare time. This was really helpful. (Modern browsers not having built in Open Search support are obscene, and this helps at least bypass the obscenity.)
__________________
If you want to donate in support of anything that I do, you can do so with either of these options:
PayPal | Bitcoin: 1J4XG2z97iFEKNZXThHdFHq6AeyWEHs8BJ | [Will add other donation options eventually]
 
Reply

Tags
browser, harmattan, search engines, tutorial

Thread Tools

 
Forum Jump


All times are GMT. The time now is 19:00.