Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Change the default web search page in 10.2 Web Browsers
Apple took the user interface for setting the default Web Search page out of the Internet preferences panel. That means you have to override the built-in default in each Web browser, if you don't want to use Excite. I prefer Google, so my example uses Google. To change the default search page, open Terminal, and enter the following (immensely complicated) command all on one line:
defaults write com.apple.internetconfig "Version 2.5.3" = 
  { "ic-added" = { WebSearchPagePrefs = {"ic-data" =
  "http://www.google.com/"; }; }; }; "ic-deleted" = (); };
Unfortunately, this hint will break when Apple bumps the version number. To learn the version number, do this:
defaults find Version | grep -2 internetconfig
Shame on Apple for removing this from the GUI.
    •    
  • Currently 2.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[7,093 views]  

Change the default web search page in 10.2 | 4 comments | Create New Account
Click here to return to the 'Change the default web search page in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change the default web search page in 10.2
Authored by: mervTormel on Jun 02, '03 11:51:16AM

in this case, one can refrain from the commando wrangling and open the plist with /Developer/Applications/Property List Editor.app, navigate to the name and change it there

$ open ~/Library/Preferences/com.apple.internetconfig.plist



[ Reply to This | # ]
Merv...oh Merv....
Authored by: macubergeek on Jun 02, '03 02:00:43PM

You being an old VMS maven should know better ;-)
Why do anything the easy way when theres a geekier way ;-)

Heres a script that enables you to change the default search engine on the fly between google, altavista and dogpile

Be sure to back up the plist file first then run this script.
Verify line formatting etc etc.
[code]
#!/bin/sh

######################################## ##
##This script overrides the system wide default search engine so that
## it is your choice without having to reset multiple web browsers.
## This script enables you to switch between google, altavista, and
## dogpile on the fly. If you want to add another just add another
## whatever) etc etc statement to the case statement below.
## Useage: -*>script by macubergeek<*-
## dsearch "http://google.com"
#######################################



sudo cp -p /Users/$USER/Library/Preferences/com.apple.internetconfig.plist \
/Users/$USER/Library/Preferences/Backup.com.apple.internetconfig.plist

echo "Backing up original preference file..."

case $1 in
google) defaults write com.apple.internetconfig "Version 2.5.3" = \
{ "ic-added" = { WebSearchPagePrefs = {"ic-data" = \
"http://www.google.com/"; }; }; }; }; "ic-deleted" = (); };;;
altavista) defaults write com.apple.internetconfig "Version 2.5.3" = \
{ "ic-added" = { WebSearchPagePrefs = {"ic-data" = \
"http://www.google.com/"; }; }; }; }; "ic-deleted" = (); };;;
dogpile) defaults write com.apple.internetconfig "Version 2.5.3" = \
{ "ic-added" = { WebSearchPagePrefs = {"ic-data" = \
"http://www.google.com/"; }; }; }; }; "ic-deleted" = (); };;;
esac

[/code]



[ Reply to This | # ]
Merv...oh Merv....
Authored by: uurf on Jun 02, '03 02:50:29PM

heh - that's funny.



[ Reply to This | # ]
Editing internetconfig.plist not a good idea
Authored by: ptejad on Jun 08, '03 02:48:16PM

It's probably not a good idea to just edit the internetconfig.plist file directly. It is actually a disk representation of a data structure that is kept in memory by the OS and many internet applications, any one of which can then overwrite your changes at will with what they thought internet config preferences looked like when they launched. The OS also needs to be notified that the preferences were changed so that it's copy in memory is up to date. The defaults write method seems like it would probably do all the right things for the IC API. Also, if you mess up the data structure just a little bit, the OS will reset internet config preferences to a clean, default set.

Coming soon from me is a command line tool to interface to Internet Config directly to address several data types that cannot be represented easily using a defaults write command.



[ Reply to This | # ]