Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Remove the Google search box in Safari 3 Web Browsers
I love URL keywords in Firefox, but I use Safari. Thankfully there are a handful of Safari plug-ins that bring keyword functionality to Safari (Sogudi, Keywurl, Saft, etc). These make the search box somewhat redundant. Previous to Safari 3, we were able to remove the search bar by just deleting it from the toolbar's NIB file. This doesn't work with Safari 3, however. I did a little poking around, and figured out a way to get it to disappear.

Note: You must have Apple's developer tools installed, specifically Interface Builder. Here's what to do:
  1. Locate Safari.app in the Applications folder, control-click (or right-click) on it and choose Show Package Contents from the pop-up menu.
  2. Open Contents » Resources » English.lproj
  3. Make a backup copy of Toolbaritems.nib.
  4. Open Toolbaritems.nib; it should open in Interface Builder. The following steps are from within Interface Builder.
  5. Open the Window panel
  6. If the Inspector isn't already open, hit Shift-Command-I
  7. Select one of the location/search bar SplitViews by single-clicking on the split handle between the two fields. The location and search bar should both be highlighted.
  8. In the Inspector, uncheck Attributes » Split View » Layout » Vertical.
  9. Select the search bar only by single-clicking it. It should only highlight the search bar in blue.
  10. In the Inspector, uncheck Control » State » Enabled and check View » Drawing » Hidden.
  11. Save and quit; you're done
Because the location/search bar is a SplitView, there's going to be a little space to the right of the location bar. As far as I know this is unavoidable.

[robg adds: I haven't tested this one. I did, however, confirm with the author that he hasn't had any keychain-related issues in 10.5 (due to Safari being a signed application).]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[13,217 views]  

Remove the Google search box in Safari 3 | 12 comments | Create New Account
Click here to return to the 'Remove the Google search box in Safari 3' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Remove the Google search box in Safari 3
Authored by: diamondsw on Fri, Jan 18 2008 at 7:56AM PST
Don't do this on Leopard - you'll invalidate the code signature as described in this hint. Even NIB modifications will do it - sad, as I'm used to mucking about with Interface Builder freely.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: maxbook on Fri, Jan 18 2008 at 8:41AM PST
I tried it. But the searchbar is still there.

I use Safari 3 with Leopard 10.5.1.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: maxbook on Fri, Jan 18 2008 at 8:45AM PST
Sorry. Everything allright. My default language is german. So I had to change the ToolbarItems in the German.lproj - Folder.

Now it works fine. Thanks!

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: yogipatel on Fri, Jan 18 2008 at 1:53PM PST
I thought it would, but I haven't had any sort of issues so far. The codesign tool does notice that something has changed, but you still have access to your keychain.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: ephraim on Fri, Jan 18 2008 at 10:09AM PST
I know there are reasons in favour of getting rid of the box, but I highly recommend giving Inquisitor a shot -- it's downright fantastic.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: kiwiiano on Fri, Jan 18 2008 at 10:22AM PST
WHAAAT!!! Remove one of the most useful features of Safari? I couldn't survive without Acid Search, that opens that field up to search anything I choose as well as Google.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: asmeurer on Fri, Jan 18 2008 at 3:12PM PST
I agree. The months between me upgrading to Leopard and Acid Search being upgraded to Leopard were quite painful for me. It's much easier to type a keyboard shortcut for a search engine and type than to select the address bar, enter a few letters and a space, and type.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: jediknil on Fri, Jan 18 2008 at 4:35PM PST
Hey, thanks for reminding me I can do this! I already understood it (as a developer), but the Horizontal/Hidden makes it very clean. Nice work!

(Sogudi user)

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: bdm on Sun, Jan 20 2008 at 1:24AM PST
So how does one add a New Tab button these days? The old method doesn't work and maybe there are new signature problems too.

Brendan.

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: Fairly on Sun, Jan 20 2008 at 9:01AM PST
Great tip. Thanks! I don't know if I want to try this but can't you just remove the split view?

[ Reply to This | # ]
Remove the Google search box in Safari 3
Authored by: Stormchild on Thu, Jun 26 2008 at 9:29AM PDT

This works, but your console log starts filling up with errors, one of which suggests it may be wasting resources doing extra redraws to work around the broken split view, so I reverted to the backup for now. I'm gonna mess around with it later and see if there's a cleaner way to do this.

6/26/08 09:07:56 Safari[60303] : the delegate was sent -splitView:resizeSubviewsWithOldSize: and left the subview frames in an inconsistent state:

6/26/08 09:07:56 Safari[60303] The outer edges of the subview frames are supposed to line up with the split view's bounds' edges. NSSplitView is working around the problem, perhaps at the cost of more redrawing. (This message is only logged once per NSSplitView.)



[ Reply to This | # ]
Works w/ 4.0 public beta
Authored by: bryanc on Fri, Apr 24 2009 at 9:36AM PDT
I can confirm this hint still works in Safari 4.0 Public Beta.

[ Reply to This | # ]