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


Click here to return to the 'A safer, non-hack way to do this' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A safer, non-hack way to do this
Authored by: Rainy Day on Dec 29, '05 02:40:14PM
A safer way is simply to edit /etc/hostconfig with your favorite GUI or CLI editor (or a perl one-liner) and change:

  SPOTLIGHT=-YES-

to:

  SPOTLIGHT=-NO-

With this change, on boot-up, Spotlight will not start.

Note: The file is writable only by root, so this will require you either fiddle with permissions in the Finder's Get Info, have an editor that knows how to authenticate itself, or use sudo in the Terminal.

[ Reply to This | # ]

perl one-liner for this
Authored by: Rainy Day on Dec 29, '05 02:58:01PM
The perl one-liner would look something like this:

  sudo perl -pi'.orig' -e 's/SPOTLIGHT=-YES-/SPOTLIGHT=-NO-/' /etc/hostconfig

This line edits the file, and creates a backup copy of the original with a ".orig" extension.

[ Reply to This | # ]

perl one-liner for this (w/improved HTML formatting)
Authored by: Rainy Day on Dec 29, '05 03:04:48PM
The perl one-liner would look something like this:

  sudo perl -pi'.orig' -e 's/SPOTLIGHT=-YES-/SPOTLIGHT=-NO-/' /etc/hostconfig

This line edits the file, and creates a backup copy of the original with a ".orig" extension.

 

[ Reply to This | # ]

HELP! This made me loose all searching capabilities
Authored by: bcometa on Jan 11, '06 11:21:43AM

Can someone plz post the inverse of this perl command... I typed it into terminal and now I can't search in finder (endlessly searches to no avail) OR using spotlight (doesn't react when i type something in the drop down text box), and the spotlight icon is still on the upper right hand corner of my screen.

Thanks in advance!

Brian



[ Reply to This | # ]
Here's one way to undo it
Authored by: Rainy Day on Jan 12, '06 09:44:31PM
To undo it, simply exchange the YES and NO, like this:

   sudo perl -pi'.orig' -e 's/SPOTLIGHT=-NO-/SPOTLIGHT=-YES-/' /etc/hostconfig

Between the first set of slashes is the "search for" parameter, and the "replace with" is between the second set of slashes (they share the common middle slash).

[ Reply to This | # ]
A safer, non-hack way to do this
Authored by: vlbrown on Jan 11, '06 03:00:08PM

This method doesn't make the menu item go away :-(



[ Reply to This | # ]
Reboot is required
Authored by: Rainy Day on Jan 12, '06 09:36:50PM
Forgot to to say "reboot." The perl script just edits the /etc/hostconfi file. That file is generally only read on system startup, which is why the reboot is necessary.

[ Reply to This | # ]