Skip to content


Leopard “このアプリケーションで開く”メニューの修復方法

Leopardを使い続けていると

ファイル上で右クリック→『このアプリケーションで開く』

で展開されるメニューに古いバージョンだったり既に外してしまったアプリケーションの情報が残って非常に見苦しくなってきます。

そんな時のターミナルでの修復方法をひとつ…


cd /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support
./lsregister -kill -r -domain system -domain local -domain user

 
1行目はcdコマンドで’lsregister’コマンドがある場所まで移動、
2行目でオプションを付けて’lsregister’コマンドを実行しています。
ちなみにこれはLeopardでしか通用しません。

Tigerの場合は場所が違うので…


cd /System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support
./lsregister -kill -r -domain system -domain local -domain user

 
とやってやればOKです。

コマンド詳細は下記の通り。

lsregister: [OPTIONS] [ <path>... ]
   [ -apps <domain>[,domain]… ]
   [ -libs <domain>[,domain]… ]
   [ -all <domain>[,domain]… ]

Paths are searched for applications to register with the Launch Service database.
Valid domains are “system”, “local”, “network” and “user”. Domains can also
be specified using only the first letter.

-kill Reset the Launch Services database before doing anything else
-seed If database isn’t seeded, scan default locations for applications and libraries to register
-lint Print information about plist errors while registering bundles
-convert Register apps found in older LS database files
-lazy n Sleep for n seconds before registering/scanning
-r Recursive directory scan, do not recurse into packages or invisible directories
-R Recursive directory scan, descending into packages and invisible directories
-f force-update registration even if mod date is unchanged
-u unregister instead of register
-v Display progress information
-dump Display full database contents after registration
-h Display this help

ターミナル???cd?????な場合はやらぬが吉です。

Posted in メモ. Tagged with , , .

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.