Disable Photos.app Auto-Launch

Apple updated OS X to 10.10.3 last week and with it contained the new Photos app. I haven’t extensively tested Photos yet and this isn’t a review of it. However, Photos does present a complication when deploying iOS devices on a mass scale.

Whenever an iOS device is connected to a computer, the device identifies to the system as an iPad/iPhone/iPod touch and as a camera. iTunes will usually launch at this point as well as your system’s default camera import app. Another person over at the MacEnterprise Google Group mentioned that while he was deploying iPads using Apple Configurator, each time an iPad connected or reconnected Photos would launch. While iPhoto used to have an option to disable launching an app when a camera is connected, Photos only allows you to disable launching the app for that specific device. (examples shown below) iphoto-preferencesPhotos-Preference

So how do you set your Mac to not launch a camera application when plugging in an iOS device? Turns out, you have to change a ByHost preference file to achieve this functionality (or rather, turn off the functionality). ByHost preference files are XML plists that setup certai setting specific to your user account. You can find them by going to Finder > click in the menu bar on Go > and select Go to Folder… ( or push shift-command-G). Type in the following

~/Library/Preferences/ByHost/

and press return. This will take you to your account’s ByHost preferences directory. ByHost preferences are unique to your user account and the following actions will need to be repeated in all accounts where you want this setting.

In this directory you should see a file called com.apple.ImageCapture2.[your computer’s UUID].plist. Your computer’s UUID will be a long string of letters and numbers. Don’t worry if you don’t see the file there as the commands we’ll run will create it if it’s not already present.

Initially, I modified this plist file by hand. I had a copy of this file on another computer and it was easy just to move it over. However, this is not the best approach. Instead, to create/ modify this file we’ll be dipping into the command line and using the defaults command.

A great Github user, clburlison, left a comment on the proper commands for this job. Open the Terminal application on your Mac (Applications > Utilities > Terminal.app), copy and paste each line into the terminal, and then hit return on the keyboard:

defaults -currentHost write com.apple.ImageCapture2 HotPlugActionPath ""
defaults -currentHost write com.apple.ImageCapture2 LastHotPlugActionPath ""

That’s it! Restart your computer and the new preference file will keep Photos or any other camera application from auto-launching when a camera is plugged in.