Thursday, March 17, 2011

How to really disable spotlight and save your old mac

I have one of the first generation of Mac Book Intel. This machine has been working really good for the past five years.
Since I bought it I've been steadily upgrading it with more RAM and faster and bigger hard-disk.
With the last hard-disk, I was happy to have all my 500Go desktop files with me, everywhere I go.
But with Snow Leopard and a bigger hard-disk came the problem of the dreadful mds process. It was just dragging my 1.8 MHz duo core to its knees; until the whole laptop overheat till reboot.
So I figured out it was related to spotlight which I never used (I much prefer the unix commands to do complicated searches).
And suddenly came Snow Leopard 10.6.6. which made removing spotlight much harder...

So if you have a old mac laptop you don't want to trash with a lot of files and you don't know what is spotlight, this is what you should do:

1 - enable the superuser (root) account (by doing this)

2 - start a unix terminal Applications>Utilities>Terminal

3 - verify the mds process is the reason why your computer is overheating by typing
top -o cpu

into the Terminal. If it shows 100% and stay like this for too long (5-30mn) it means this process should be disabled

4 - create a nomds.sh script that turns spotlight indexing off
#!/bin/sh
mdutil -a -i off


5 - run this script (nomds.sh) as root
login root
(type your password)
chmod 755 nomds.sh
chown root nomds.sh
mv nomds.sh /usr/bin/
nomds.sh

should be enough (Terminal prompting "Indexing disabled.") if you run osx prior to 10.6.6. But on 10.6.6 mds is like a phoenix always coming back even after you ask the system to uninstall it. So I added a daemon that just kill it every minutes. To do so:

6 - add a launchd plist in /Library/LaunchDaemons/. Call this file com.devdaily.nomds.plist

and copy/paste the following text into it

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>label</key>
<string>com.devdaily.nomds</string>

<key>ProgramArguments</key>
<array>
<string>/usr/bin/nomds.sh</string>
</array>

<key>OnDemand</key>
<false/>

<key>Nice</key>
<integer>1</integer>

<key>StartInterval</key>
<integer>60</integer>

<key>StandardErrorPath</key>
<string>/tmp/AlTest1.err</string>

<key>StandardOutPath</key>
<string>/tmp/AlTest1.out</string>
</dict>
</plist>



Now reboot, or if you don't want to reboot run
launchctl load /Library/LaunchDaemons/com.devdaily.nomds.plist


You should never be bothered by splotlight anymore.

I know it sounds a bit brutal to force the system like this, there might be a way to do the indexation good once and for all, or disable it gently, but as I said above I don't use any of this features, so this was the fastest and most acceptable solution I came with.

If you know what you're doing you can use this technique for a lot of other annoying processes, like all those from Adobe, but this is another matter.

Labels: , , , , , ,


Comments:
Thank You for being the member of this website. Please allow me to have the chance to show my satisfaction with Host Gator web hosting. They have professional and fast support and they also offer many [url=http://adf.ly/213105/thankyou-hostgator ]HostGator discount coupons[/url].

I love HostGator hosting, you will too.

http://skytz_website.byethost12.com/index.php?action=profile;u=11022
 
[url=http://www.kamagrashop.pl]potencja[/url], check my site.
 
I am right here to help get your internet site off to an excellent start. Do not be 1 of these that wished that they had done it greater the very first time, then take on the job, and cost, of beginning above. Your website displays what you along with your organization or hobby are all about.

I'm capable to present low-cost, user-friendly, custom made designed web sites for a broad variety of organizations, organizations and teams.It also shouldn't expense a lot of money to get you started. I will aid manual you through the method and even warn you when i believe you could be acquiring in above your head, or past your budget.

Listed below are some hight quality companies for any resonable price:

Front-End Development
Custom web site design
Affordable web site design
E-Commerce website design
Corporate Website Design
Innovative website design
Static Web Design
Website maintenance
Web site re-designs
SEO Services
Logo Design

Please look around the site for further information about the [url=http://www.adrianbotea.com]freelance web designer[/url] services that I am able to offer and to see examples of websites that I have designed

--------------------------------

[url=http://www.adrianbotea.com/seo-services][img]http://www.adrianbotea.com/seo-moz.png[/img][/url]
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?