10.5: Rebuild the launchservices database
Nov 15, '07 07:30:03AM
Contributed by: jebeke
It happens now and then that when you control-click on a file to use the Open With contextual menu, you'll see double entries, and even removed applications, in the list of available applicatiopns. A rebuild of the LaunchServices database is then the solution. (This also happened in Tiger.)
The path to the lsregister command needed for the rebuild has changed in 10.5. As such, the following command rebuilds the database on Leopard:
[robg adds: If you find this happening a lot on your machine, you'll probably find it much simpler to put an alias in your .profile file. You need to create the file in your user's home directory (in Terminal), and a simple way to do that is by typing pico .profile. Then type alias lsrebuild='' into the editor window. Position the cursor between the quotes, paste in the line above, and then save and quit by typing Control-X, Y (to save changes), and pressing Return. Open a new window, and you'll be able to just type lsrebuild to rebuild the database. Feel free to change lsrebuild to whatever name you'd like to use.]
Comments (5)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20071102084155353