10 Replies Latest reply: Apr 22, 2013 3:42 PM by eipi
eipi Level 1 Level 1 (0 points)

I used the command

 

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

 

to try to solve a problem I was having (right-clicking on a file, the "open with" menus were often displaying multiple entries for the same app). This command seems to have solved that problem but now I have a new issue as a result:

 

After restarting my mac, trying to open a file with an app I've used many time before (the app is the pdf reader Skim), I get a message from the OS that I am opening the app for the first time and whether I wish to proceed. For some reason, each time I restart  my mac, it forgets I have previously used this app. (This behavior also occurs with a few other apps, but not all apps are effected.)

 

Have I screwed things up by using the lsregister command? Is there a way to fix this?


iMac (27-inch, Late 2012), OS X Mountain Lion (10.8.3)
  • 1. Re: used lsregister, now keep getting app first time opening warnings
    Linc Davis Level 10 Level 10 (118,360 points)

    Launch the application by double-clicking its icon in the Applications folder.

  • 2. Re: used lsregister, now keep getting app first time opening warnings
    eipi Level 1 Level 1 (0 points)

    Hi Linc,

     

    Thanks for the reply.

     

    If I restart my mac and launch the app as you suggested, the OS does NOT give me the warning.  ???

     

    (If I then restart my mac again and now try to open a pdf in my usual manner (double-clicking on the pdf), I once again get the warning.)

  • 3. Re: used lsregister, now keep getting app first time opening warnings
    Linc Davis Level 10 Level 10 (118,360 points)

    Boot in safe mode.* This will cause certain caches maintained by the system to be rebuilt. The instructions provided by Apple are as follows:

     

    1. Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    2. When you see the gray Apple logo, release the shift key.

     

    Safe mode is much slower to boot than normal.

     

    When the login screen appears, reboot as usual (not in safe mode) and test. There's no need to log in while in safe mode.

     

    *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode.

  • 4. Re: used lsregister, now keep getting app first time opening warnings
    eipi Level 1 Level 1 (0 points)

    Thanks for the suggestion. I followed your instructions but I am still get the same behavior unfortunately.

     

    Not sure if this is helpful or not:

     

    Apps giving me problems include Skim, LibreOffice, Xee, MplayerX.

     

    Apps NOT giving me problems are Pages, Xcode, Firefox, Thunderbird, Alfred, Picasa, iPhoto, QuickTime Player, VLC, ...

  • 5. Re: used lsregister, now keep getting app first time opening warnings
    Linc Davis Level 10 Level 10 (118,360 points)

    Back up all data.

      

    If you have more than one user account, you must be logged in as an administrator to carry out these instructions.

      

    Select the text on the line below by dragging across it. Don't include the blank space at the end of the line. Only the text should be highlighted.

     

    sudo xattr -d -r com.apple.quarantine

      

    Copy the selected text to the Clipboard (command-C).

      

    Launch the Terminal application in any of the following ways:

     

    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

     

    ☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

     

    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

     

    Paste into the Terminal window (command-V), then press the space bar.

      

    Now switch to the Finder and and select the item(s) that are causing the problem. Drag the items into the Terminal window. More text will be added to what you entered.

     

    Click in the Terminal window to activate it, then press return.

     

    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. You don't need to post the warning. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.

     

    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear. You can then quit Terminal.

  • 6. Re: used lsregister, now keep getting app first time opening warnings
    eipi Level 1 Level 1 (0 points)

    Linc, thanks again for your help.

     

    I haven't as yet setup full backups for my system, and it will probably be a while before I do so. Is there anything else I might be able to try?

  • 7. Re: used lsregister, now keep getting app first time opening warnings
    Linc Davis Level 10 Level 10 (118,360 points)

    You need to back up before you do anything else. That's a higher priority than solving the problem in your original post.

  • 8. Re: used lsregister, now keep getting app first time opening warnings
    eipi Level 1 Level 1 (0 points)

    OK - lets leave it for now. Once I have a full back up in place I'll respond again to this thread. Hopefully you'll still be available/happy to help me out at that time.

     

    By the way, if you don't mind, could you briefly outline what you believe has happened? Is the problem indeed a result of the lsregister command or could it have a different cause? (I'm new to macs and only used the lsregister command after others had mentioned they had had success with it.)

  • 9. Re: used lsregister, now keep getting app first time opening warnings
    Linc Davis Level 10 Level 10 (118,360 points)

    You seem to have some applications with the quarantine attribute set, which causes the warnings. What that has to do with the Launch Services reset is not clear.

  • 10. Re: used lsregister, now keep getting app first time opening warnings
    eipi Level 1 Level 1 (0 points)

    Well I no longer have this problem - it seems to have corrected itself. (I haven't done anything to try to correct the problem since I last posted here.) Perhaps it was some sort of cache issue?

     

    Using

     

    ls -l@ /Applications

     

    all the apps that were giving me problems still have a

     

    com.apple.quarantine

     

    entry. Not sure if that is normal or not.