Disabling Spotlight in Leopard
If, like me, you disabled Spotlight under Mac OS X 10.4 but have since upgraded to 10.5, you've probably noticed that the upgrade process re-enables it. However, the procedure for disabling Spotlight under Tiger no longer works. Here's how to disable Spotlight and its helpers under Leopard.
You have to change two launchd plist files:
- /System/Library/LaunchAgents/com.apple.Spotlight.plist
- /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
Add the following key to each of them:
<key>Disabled</key>
<true/>
After that, reboot, and there should no longer be any Spotlight or mds processes. At that point, you can also remove Spotlight's data store:
$ cd / $ sudo rm -rf .Spotlight*
If you ever want to re-enable Spotlight, just remove the Disabled keys, then either reboot or reload the plist files with launchctl.
Update: Technipages has posted a slightly simpler procedure that uses only launchctl.
Tags: apple
Mon, 05 Nov 2007 23:45 UTC
Giving up on application/xhtml+xml
Until today, I had been following the recommendation of the W3C Validator and serving the XHTML pages of this blog as application/xhtml+xml (to all clients except Internet Explorer). Unfortunately, it appears that Google just doesn't like to index application/xhtml+xml, as the bizarrely incomplete search results for this site seem to confirm.
Since having my site properly indexed is more important to me than strict MIME-type adherence, I've changed my server configuration to send a content type of application/xhtml+xml only to the validator. All other user agents get Apache's default (text/html).
Apparently, I really enjoy seeing clean markup-validation results, since there doesn't seem to be any other benefit to worrying about W3C-recommended content types.
Update: Since the Google search results for this site are now sensible, it seems like my assessment of the situation was correct.
Tags: meta
Wed, 17 Oct 2007 22:56 UTC
OpenGL SuperBible Examples Using pyglet
Some recent experimentation with pyglet has gotten me interested in learning OpenGL. Over the weekend, I picked up the OpenGL SuperBible, which, despite its imposing size (over 1200 pages), seems to provide a very nice tutorial introduction.
The book includes many example programs, which are written in C++ and use the GLUT library. Rather than suffering through all the pain of building and debugging C++ programs, I've been translating them into Python using pyglet. Because pyglet provides a very lightweight wrapper around the OpenGL C API, this is mostly straightforward. However, the conversion between GLUT and pyglet is not always obvious (to my beginner's eyes, anyway).
In case others find my converted examples useful, I've made them available as a Bazaar branch. At the moment, there are only a couple scripts in that directory, but hopefully it will fill up quickly as I work through the text.