Safely turn off Spotlight and remove from menu bar in OS X Snow Leopard

I don’t like the Spotlight indexing and search that is included in Mac OS X. I use Quicksilver instead but have been procrastinating turning off Spotlight.

Well I finally got around to disabling Spotlight and wanted to go about it in a safe way. I came across too many forum posts doing dangerous things to disable Spotlight. I also wanted and easy way to remove it from the menu bar. Below are aliases I added to my bash profile to conveniently enable and disable spotlight. I am not a bash scripting master, so feedback is welcome and appreciated.

Step 1 – Add aliases
Open your bash profile (location: ~/.bash_profile ) and add these lines:

alias spotlight-off='sudo mdutil -a -i off && sudo mv /System/Library/CoreServices/Search.bundle/ /System/Library/CoreServices/SearchOff.bundle/'
alias spotlight-on='sudo mdutil -a -i on && sudo mv /System/Library/CoreServices/SearchOff.bundle/ /System/Library/CoreServices/Search.bundle/'

Step 2 – Source your bash profile

source ~/.bash_profile

Step 3 – Run command
In your shell, run

$ spotlight-off

Step 4 – Restart SystemUIServer Process

$ ps aux | grep SystemUIServer.app
# take note of the PID which is the first number you will see
$ kill -HUP <insert PID here>

You could potentially restart your computer instead of performing Step 4, but that is inconvenient. Let me know if you have any comments or a nice way to include everything in one script. I didn’t have time to condense this process further.

No TweetBacks yet. (Be the first to Tweet this post)
Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • MySpace
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis

If you enjoyed this post, make sure you subscribe to my RSS feed!

This entry was posted in Software and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Brandon Fryslie
    Posted January 4, 2011 at 10:25 am | Permalink

    Thanks! Exactly what I was looking for, and you even made Bash aliass for me.

    For your step 4, you can use ‘killall SystemUIServer’ rather than greping the pid and using kill.

    My next step is to bind QuickSilver to a keyboard shortcut so I can launch it sans spotlight when it crashes. I plan to use the program titled “This Service” to add the script to the Services menu.

  2. Posted November 10, 2011 at 1:36 pm | Permalink

    Below a list of interesting links that I found this week: Interaction: Test Usability By Embracing Other

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">