How does the Mac system remove a duplicate item from the right mouse button menu?

Source: Internet
Author: User
Tags versions

I am a loyal Mac fan, I love my Mac, and her time is always good. But sometimes she does something weird, like when I right-click on a file and I'm looking for the right app to open, I find out that she's showing some repetitive options. Although it does not affect the use, but for me, this is to drive me crazy rhythm.

It turned out that the solution to the problem was fairly easy. We just need to use the "terminal" application.

To delete a right-click menu duplicate item by using terminal

First step: Open the terminal application.

Step Two: Enter the following command.

/system/library/frameworks/coreservices.framework/versions/a/frameworks/launchservices.framework/versions/a/ Support/lsregister-kill-r-domain Local-domain User

The third step: press the "return" key.

Now when you right-click a file again and hover over the "open with" option, you'll notice that the duplicate right menu items have been cleaned up and refreshed.

The next time the right-click menu repeats itself, be sure to try the command.

One might think that this tutorial is over. Oh no......

Given that someone will forget this terminal command, we can use the Automator application to create an application or a right-click menu service. Because of my previous article how to exit all open applications tutorial has demonstrated how to create a Automator application. This time we're going to create a right-click menu service so that when you find duplicates in the right-click menu, you can move directly to the bottom of the right button menu. Service "Item to find this feature.

Don't say much nonsense, we started to do it.

Using "automator" to create service menu items

First step: Open the Automator application.

The second step: Select the "Services" option, click on the lower right of the "select" button.

The third step: Select the "service" input source, where we choose the "Files and folders" option.

Step Fourth: Type the "run" keyword in the Automator search box, select "Run the applescript" option, and drag it to the workflow on the right. "

Fifth step: Edit AppleScript, enter the following content can be.

On run {input, parameters}

Do shell script

"/system/library/frameworks/coreservices.framework/frameworks/launchservices.framework/support/lsregister-kill -r-domain local-domain system-domain User "

return input

End Run

Note: In fact you only need to change the middle bracket in the "*your script goes here*" that part can be.

Sixth step: Press "command + s" shortcut key, pop-up service naming panel, here we will name it "clear duplicates."

Well, the next time you find the right key menu duplicate options, just go to the bottom of the "Services" option, select "Clear Duplicates" can be.

Of course, you can also assign shortcut keys to this service.

Create a keyboard shortcut for the Service menu

First step: Open System Preferences.

Step Two: Select the keyboard option.

Step three: Select the Shortcuts tab.

Step Fourth: Select the service item in the left column, then go to the right column to find the "purge duplicates" that you just created.

Fifth step: Click the "Add Shortcut" button to assign shortcut keys.

Note: So where is the service that you just created? Which day do I want to delete it? Don't worry, you just open the Finder application and find the path "~/library/services/" to see all the items you've added.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.