DirectNET

Data Center Management Solutions including UPS Systems, Data Center Cooling, KVM over IP & IP Power Strips, Server Racks and Server Rack accessories; KVM Switches and KVM Extenders; Rackmount Monitors and Rackmount Keyboards.


NAVIGATION
Home
Store
INSIDE MAC
Television Shows
Broadcast Shows
Daily News Shows
Special Shows
EVENTS
DAILY TIPS
Design
Mac OS X
Mac OS X UNIX
COMMUNITY
Forums
Surveys
NEWS
Current
Press
Archive
FEATURES
Editorial
Dr. Mac
Reviews
Reader Reports
RESOURCES
FAQ
Documentation
Learning Center
MAN pages
Glossary
Tutorials
Tips
Links

OUR PARTNERS

OSXFAQ Mac OS X Tip-of-the-Day  

Trouble-Shooting IV (Advanced) - Launch Services

By Adrian Mayo - Editor - OSXFAQ

This week's tips give some advanced trouble-shooting tips, mostly involving the terminal and single-user mode.

Week 28 February, Trouble-Shooting (Applications) considers trouble-shooting a particular application that is not behaving as it should.

Week 7 March, Trouble-Shooting II (System) concentrates on trouble-shooting system problems that affect many applications, or the system in general.

Week 21 March, Trouble-Shooting III (Hardware) considers hardware problems like disc corruption and faulty memory.

The Finder, and the command line based 'open' command, both use Launch Services to associate documents with applications. The Finder also uses this information to associate icons with documents.

The 'lsregister' command can be launched from the command-line, and gives scope for manual maintenance of the Launch Services database.

Problems involving incorrect icons or documents failing to open (with the proper application) can be solved using 'lsregister'

$ /System/Library/Frameworks/
ApplicationServices.framework/Versions/A/
Frameworks/LaunchServices.framework/Versions/
Current/Support/lsregister

(all on one line)

lsregister: [OPTIONS] [-domain { system | local | user | network }]... [path]...

Search the paths for application bundles and add each found item to the Launch Services database. For domain specifications, ask CF for the list of application locations in the given domain(s).

-kill Reset the global Launch Services database before doing anything else
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-load Load the LaunchServices service plugin if it's not already loaded.
-lazy n Sleep for n seconds before registering apps if the local cache is aleady populated.
-r Recursively register directory contents, do not recurse into packages or invisible directories.
-R Recursively register directory contents, including the contents of packages and invisible directories.
-f force-update registration info even if mod date is unchanged
-v Display progress information.
-dump Display full database contents after registration.
-h Display this help.

Issuing the command:

...the/long/path/lsregister -kill -r -domain system -domain local -domain user

will repair the Launch Services database.

I've not investigated this command much, but it does have potential for querying, maintaining, and resetting the LS database.

Enjoy !! :-)

Panther 10.3.8

To discuss this tip in the OSXFAQ Mac OS X Tip-of-the-Day Forum, click here:

http://forums.osxfaq.com/viewforum.php?f=100

E-mail your comments or suggestions to webmaster@osxfaq.com

Copyright © 2000-2008 Inside Mac Media, Inc. All rights reserved.
Apple assumes no responsibility with regard to the selection, performance, or use of the products or services. All understandings, agreements, or warranties, if any, take place directly between the vendors and prospective users.
Apple, the Apple logo, Mac, PowerMac G4, PowerMac G5, Xserve, Xserve RAID, PowerBook, iBook, Airport, AirPort Extreme, iMac, eMac, iLife, iMovie, iCal, iPhoto, iTunes, QuickTime, FireWire, iPod, iSight, AppleWorks, Macintosh, Jaguar, Panther, Mac OS, Mac OS X and Mac OS X Server are trademarks of Apple Computer, Inc.