Scripts Part 5: New Spotlight Disabler
Someone recently commented that my script to disable Spotlight was no longer functioning in v. 10.4.5 of Tiger. When I went to check on the functionality of the old script, I realized I'd been working on a new and improved version awhile back, and that I'd intended to post it, but completely forgot to. So I went in and finished up this spiffy new version, and I'm posting it today for anyone who's interested, or for anyone for whom the previous version had stopped working.
This new version comes with the same disclaimers as the other one (which are now listed in the script itself), but gives you a few more options for disabling Spotlight. In particular, you can now choose to disable/enable Spotlight on either a single volume, or an all volumes. The script will also report the Spotlight status of all currently mounted volumes before asking you what you want to do.
Enjoy!
SpotlightEnableDisable Script
See the code
This new version comes with the same disclaimers as the other one (which are now listed in the script itself), but gives you a few more options for disabling Spotlight. In particular, you can now choose to disable/enable Spotlight on either a single volume, or an all volumes. The script will also report the Spotlight status of all currently mounted volumes before asking you what you want to do.
Enjoy!
SpotlightEnableDisable Script
See the code
Labels: Scripts, ScriptSharing, Tiger
Argh!
How about what to do when MDUTIL does not work? My spotlight stopped working, and when I try to manually turn it on I get:
localhost:/ root# mdutil -i on /Volumes/
/Volumes/:
Could not set indexing status for volume.
I erased the .Spotlight folder, and ran permissions fix (nothing fixed). My problem must be something deeper?
RIch
Richard.Cooke at turnkeyautomation.net
12:47 PM
Richard,
It looks like you're applying mdutil to the /Volumes folder. You need to apply mdutil to a specific volume listed within that folder, like so:
mdutil -i on /Volumes/Your_Volume
Or, you can apply mdutil to all the volumes in /Volumes, using a wildcard (*), as I do in one part of my script:
mdutil -i on /Volumes/*
To get the Spotlight status of all mounted volumes, run this:
mdutil -s on /Volumes/*
It may also help to erase (and subsequently rebuild by running the above commands) the Spotlight index:
mdutil -E /Volumes/*
And of course you need to do all this as root, or with sudo, which it looks like you're doing.
Hope that helps.
-systemsboy
12:46 PM
I've tried this script, but it seems to disable all seaching; the script gave me an error message that it couldn't set the indexing status for a volume, regardless of whether I opted to disable for a single volume or all volumes. Iit can't even find a document on my Desktop, even though I gave it the exact name and location.
So I don't see how this is an improvement over just removing Spotlight from the /System/Library/CoreServices folder.
Ideas or suggestions?
6:31 PM
Sounds to me like something's wrong with your system. Or that's my best guess. Especially with regards to that error message. That shouldn't happen. When I run the script it behaves as it should and certainly does not disable searching altogether. Perhaps when you moved Spotlight from CoreServices something got hosed? Really don't know.
Sorry.
-systemsboy
8:09 AM
The link to both the zip file and the .command file appear to be broken.
Could you please, please fix this?!
Thanks again for this (hopefully) great script!
2:56 PM
x-user,
They seem to work fine for me. I've tested them in Firefox, Camino and Safari. Try right-clicking (or control-clicking) the .zip file and saving it to your computer ("Save Link As..." or "Download Link Target..." or "Download Linked File..." respectively).
Or if you can let me know what happens when you click these links that might help me figure out the problem. But right now I can't reproduce it. It works fine for me. So I can't really find a solution.
-systemsboy
1:46 PM
They don't work for me either. I tested with Safari and Camino.
Earthlink Page Not Found
HOW CAN WE HELP YOU?
Sorry. It looks like there isn’t a page on our website at the address you requested (or it may be temporarily unavailable).
SUGGESTIONS...
* Check your typing if you manually entered the URL
* Enter 1 or more keywords in the Google search box above
7:22 PM
Um, as per my front page, all my scripts got deleted when I moved.
http://systemsboy.blogspot.com/2008/06/whats-going-on.html
I don't know when I'll be able to get them back online. Please bear with me during the interim.
Thanks!
-systemsboy
» Post a Comment