X

Tackling a newly installed application not opening in OS X

If a newly installed application just bounces in the Dock or quits, then the system may not be handling its quarantine flag properly.

Topher Kessler MacFixIt Editor
Topher, an avid Mac user for the past 15 years, has been a contributing author to MacFixIt since the spring of 2008. One of his passions is troubleshooting Mac problems and making the best use of Macs and Apple hardware at home and in the workplace.
Topher Kessler
4 min read

When applications are opened in OS X, the system will check for the presence of a quarantine flag on the application file to determine whether the program has been downloaded from the Internet, so it can issue a warning and require confirmation before the program is executed.

This flag will prevent the system's launch services from opening the file until it is removed or the system is otherwise set to allow the program to execute. This is usually done by clicking Open within the warning dialog that appears when you first open the program. But in some instances the system may not show this dialog and programs may hang or quit at launch and never open.

Apple discussion poster "mrm312" writes:

Starting yesterday I notice that any new apps I try and install aren't launching. I tried to install the 30-day trial of Textmate and when clicking on App in Applications folder the icon just bounces on the dock permanently. Clicking it again makes it disappear form the dock. I then tried to install BetterTouchTool and when I click on that absolutely nothing happens. Any apps installed prior open up fine.
Quarantine Window
When you open a quarantined application, this warning will appear. Clicking "Open" will remove the quarantine flag from the application so this window will not show again. Screenshot by Topher Kessler/CNET

When this type of problem happens where new applications do not open, one possibility is that there is a problem with the handling of the quarantine system in which the flag is not being removed or otherwise managed properly for new applications.

If this happens, the first step to take is to open the Console utility and see if you can find a recent log entry describing the application in question in conjunction with phrases such as "posix_spawn" and "operation not permitted," which may look something like the following (in this case, when opening the media player application "VLC"):

12-03-29 8:14:03.231 AM com.apple.launchd.peruser.501: ([0x0-0xa32c31].org.videolan.vlc[5423]) posix_spawn("/Volumes/vlc-2.0.1/VLC.app/Contents/MacOS/VLC",...): Operation not permitted

Following this message, you might see others pertaining to the program, which claim the program has exited with code 1 (exit codes above 0 generally mean an error occurred), and other entries about the launch services or "LS" not being able to communicate with or quit the program. You can better isolate these messages from others in the console by searching for part or all of the program's name in the console search field.

These entries in the console confirm that the launch services are indeed not able to open the program, instead of the problem being because of a bug in the program itself.

Once you have confirmed the problem is with the launch services, check the location of the program file and determine if it is on a read-only medium, since this will prevent the system from modifying the program's quarantine flag. In the example of the VLC program mentioned above, it is evident that the program is being opened from the /Volumes/vlc-2.0.1/ directory, which means it is still on the mounted disk image containing the program. Because the disk image is a read-only filesystem, the system cannot change the quarantine flag for the program; therefore, a simple solution is to copy the program from the disk image to the /Applications folder on the computer and run it from there.

If the program is on the computer's hard drive and the problem is still occurring, then the next step is to try removing the quarantine flag manually. To do this, open the Terminal and type the following command followed by a single space (do not press enter yet):

xattr -d com.apple.quarantine

Then locate the application file and drag it to the Terminal window, which should complete the full path to the application. Pressing enter after doing this will remove the quarantine flag from the program and hopefully allow it to run properly.

The final option you can try if programs still do not open is to disable the quarantine service altogether. While the quarantine option is useful and is recommended to keep working, if you are aware of the programs and files you download from the Internet (what they are, and where they came from), then you do not need to have the system warn you about them and can turn off quarantining. To do this, again open the Terminal, followed by running the following command:

defaults write com.apple.LaunchServices LSQuarantine -bool NO

After this command is run, the system will no longer check the quarantine flag and should allow the programs to execute. Do keep in mind this will also turn off a security measure of the system, so only do this if you know you are aware of the programs you download and run (where they came from, and what they are).



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.