This hint describes a way of changing Safari's default search engine. Unlike the method which was posted a couple of days ago, this method does not block normal access to google.com. This hint assumes you are familiar with the vi text editor. First, quit Safari and make a backup copy of the application. Then follow these steps:
Launch Terminal, and use the vi editor to open the Safari executable file. The command will probably look like this for most users:
Code:
% vi /Applications/Safari.app/Contents/MacOS/Safari
Search for the text google. The first occurrence will be a string that looks like this:
Code:
http://%@.google.com/%@?q=%@&ie=UTF-8&oe=UTF-8
This is the string that needs to be modified.
Change the string to the search engine you'd like to use. When changing this string, two things need to be kept in mind. First, the length of the new string must be the exact same length as the original. Second, you need to have two %@ sequences in the string. The second %@ should represent where your "query" would go in the URL. Here is an example. To make Yahoo! the default search engine, replace the string:
Code:
http://%@.google.com/%@?q=%@&ie=UTF-8&oe=UTF-8
with:
Code:
http://%@@search.yahoo.com/bin/search?p=%@&a=0
The way I figured this out was by performing a search at yahoo.com for "apple". The URL of the results page was:
Code:
http://search.yahoo.com/bin/search?p=apple
So to keep my length constant, I needed to expand the string a little. I added a %@@ at the beginning of the URL. Putting "something@" at the beginning of a URL will not affect the loading of a site. This allowed me to take care of the first %@ sequence I needed to retain. Then I replaced apple with another %@. This is obviously where my 'query' fits into the URL. Finally, I needed to add a bogus (unused) form field to the URL, so that the string would be the correct length. I added &a=0. So if you take a look at the original string, and the new one, the lengths of both strings are identical, as seen above.
Save your changes and quit the editor.
The next time you use Safari's search box, your favorite search engine will be used.
Note that if the string you enter is not of the correct length, Safari will fail to launch.
Quelle: macosxhints.com
Abgesehen davon, dass im Gegensatz zu Sogudi nur
eine SearchEngine favorisiert werden kann, halte ich die Suche via Sogudi für wesentlich komfortabler.
Dylan
::edit:: Lunde war schneller.
Auch bitte auf die von Lunde angesprochene Korrektur achten!