Disable auto launching of Photos application on Mac OSX Yosemite & El Capitan

11

4

I'm aware that there are solutions existing that allow you to prevent auto launch of applications such as iphoto or the newer replacement, Photos on a per device basis through the UI of Photos itself, and more comprehensive control (can set what application opens) through Image Viewer, but my question is if there is a way to stop Photos from auto-launching universally (no matter what removable media I mount), preferably by issuing a default write command or disabling a launchd plist or similar.

I tried figuring this out on my own, using an article from lifehacker "How to Find Hidden Features in Mac Applications".

I've issued the following commands:

strings /Applications/Photos.app/Contents/MacOS/Photos > Desktop/photosstrings.txt

class-dump /Applications/Photos.app/Contents/MacOS/Photos > Desktop/photosclassdump.txt

strings /Applications/Photos.app/Contents/MacOS/PhotosRelauncher > Desktop/photosrelauncherstrings.txt

class-dump /Applications/Photos.app/Contents/MacOS/PhotosRelauncher > Desktop/photosrelauncherclassdump.txt

Output of above can be viewed/downloaded via Gist

I've tried out a few stabs with promising strings such as:

defaults write com.apple.Photos canAutoLaunch = 0

defaults write com.apple.Photos shouldAutoLaunch = 0

No luck so far. I did a:

defaults read com.apple.Photos

which shows the two writes did get written, but they're not doing anything obvious, and definitely not what I was going for.

I'm not sure what service to do killall on for quicker testing, rebooting to test is kinda overkill. Activity Monitor shows the following with "photo" as the search term:

Photos Agent
com.apple.CloudPhotosConfiguration
Photolibraryd
com.apple.photomoments
com.apple.photomodel
Photos

I've tried doing a defaults read on Photos Agent and so on even escaping characters and other variations and whatever with no luck either.

Would appreciate help in achieving the desired effect. Would love education along the way too if that's not too much to ask.

adamlogan

Posted 2015-05-27T09:33:45.050

Reputation: 273

Answers

4

This worked for me in Yosemite.

# -currentHost is not technically required
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES

It came from answer to a similar question on AskDifferent:

https://apple.stackexchange.com/questions/188212/prevent-photos-app-on-osx-yosemite-from-starting-when-plugging-in-device

Interestingly the UI setting in Image Capture doesn't do anything but this does.

John Faughnan

Posted 2015-05-27T09:33:45.050

Reputation: 277

Looked promising, but unfortunately it doesn't seem to work (on 10.9.5, even after reboot, with or without the -currentHost option). – mivk – 2016-01-31T13:22:32.800

4

Steps to disable automatic launch of the new Photos app on OS X Yosemite (10.10) or El Capitan (10.11):

  1. Connect your camera or iDevice (iPhone, iPod, iPad, etc.)
  2. Open the Image Capture app
  3. Click on your camera or iDevice under "DEVICES" in the upper left corner
  4. Find "Connecting this (device) opens:" in the lower left corner
  5. Click on the dropdown list and select "No application"

Screenshot of Image Capture showing dropdown list, with "No application" selected

Miles Erickson

Posted 2015-05-27T09:33:45.050

Reputation: 1 079

2

On my machine with OS X 10.9.5, it was Image Capture which opened automatically instead of Photos. But anyway, the solution may be the same.

The solution in the accepted answer unfortunately didn't work for me. But this worked:

defaults -currentHost write com.apple.ImageCapture2 HotPlugActionPath ''

Not sure if -currentHost is really needed, or if it would also work without it.

Maybe it depends on the OS version.

mivk

Posted 2015-05-27T09:33:45.050

Reputation: 2 270

Worked perfectly well for 10.11.5 too. – techraf – 2016-05-29T10:11:06.183

2

From the Terminal, go into /Applications/Photos.app/Contents/MacOS

type:

sudo mv Photos Photos.old 

press Enter. You will be prompted for the root password.

That should disable Photos completely. If you want Photos to work again, type

sudo mv Photos.old Photos 

glenn

Posted 2015-05-27T09:33:45.050

Reputation: 21

2

Rather than fumble around trying to find potential strings, I'd just use Image Capture or RCDefaultApp to switch off the 'insert media' issue

Set these all to 'Ignore'
enter image description here

& Secrets pref pane for the 'undiscovered' ones.

enter image description here

Tetsujin

Posted 2015-05-27T09:33:45.050

Reputation: 22 456

1

In response to a colorful description of these autostart features, I found the following commands to disable Photos to have worked for my troubles with camera SD cards:

defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES
defaults -currentHost write com.apple.Photos disableHotPlug -bool YES

user2943160

Posted 2015-05-27T09:33:45.050

Reputation: 181