Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 2.33 / 5
  You rated: 2 / 5 (9 votes cast)
 
[20,176 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 whoever posted them. This site is not responsible for what they say.
Remove the Google search box in Safari 3
Authored by: diamondsw on Jan 18, '08 07:56:51AM
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 Jan 18, '08 08:41:49AM

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 Jan 18, '08 08:45:21AM

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 Jan 18, '08 01:53:42PM
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: Unsoluble on Jan 18, '08 10:09:59AM
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 Jan 18, '08 10:22:08AM

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 Jan 18, '08 03:12:02PM

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 Jan 18, '08 04:35:10PM

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 Jan 20, '08 01:24:30AM

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 Jan 20, '08 09:01:59AM

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 Jun 26, '08 09:29:37AM

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 Apr 24, '09 09:36:29AM

I can confirm this hint still works in Safari 4.0 Public Beta.



[ Reply to This | # ]