Hello! Can someone help me to prevent an application from auto-connecting a camera?

Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
First of all, hello Mac Forum! This is my first post on the forum although I have often read posts on here before. Nice to meet you all :)

Forgive me for introducing myself at the same time as asking a question. However, I was hoping someone might be able to help me?

I need to run 2 separate applications on my Mac to complete a task. One is a driver/application that launches an application in a web browser and the other is a photo tethering software. They both allow you to shoot/tether directly to the Mac. Part of what they do auto-connects any supported camera attached via USB/Thunderbolt.

Because I am having to perform a workaround ie use 2 applications to perform the task (instead of using just the one application), I was hoping someone could help me to somehow disable the auto-connect of one of the applications. If they both make a connection to the camera it means the camera cannot shoot in any of the applications because the Mac gets confused.

I have used a Terminal hack before to achieve a similar affect and hoped I might be able to do the same thing this time. Would this work?
https://petapixel.com/2015/12/21/stop-apple-photos-from-auto-launching-in-os-x-with-one-command/[/url]

PetaPixel Terminal hack:
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES

And the one to disable it and go back to default:
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool NO

If this would work, how do I find the path to the application I wish to disable? The application which I hope to disable the camera auto-connecting on is called 'photorobot-driver.app'. Ideally it needs to keep it from connecting/trying to connect at all.

If it will not work, does anyone have any other suggestions?

Any help greatly appreciated.

Thanks, Mark
 
Last edited:

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
Welcome to our forums.

If this would work, how do I find the path to the application I wish to disable? The application which I hope to disable the camera auto-connecting on is called 'photorobot-driver.app'. Ideally it needs to keep it from connecting/trying to connect at all.

That application (photorobot-driver.app) is very likely loading its driver upon startup probably by a "kext" (kernel extension). What you can try is use a search to find the driver, and once found, disable it by renaming. Spotlight searches are not the best to use so you might want to try a third party search engine instead. "Find Any File" and "Easy Find" are two apps that do a much better thorough search.

Give that a try and let us know.
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Hi chscag, thanks for the quick reply and advice. I downloaded Easy Find and did some searches as suggested (photorobot driver & .kext). I did not find any .kext files though. There was a 'Photorobot driver' in the hidden Library / Application Support folder though (see screengrab). However I could not find any .kext files in these folders. Do you have any other ideas of what else I should look for, or maybe another search term I can try? Thanks again for your help. Cheers, Mark Screen Shot 2018-12-12 at 23.38.38.png
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
That's probably not what's loading the driver. Drivers are usually never loaded from the hidden user library, instead they load from the system. If you can't find the driver, you may have to uninstall the application. In the meantime try renaming or removing the "photorobot-driver". If you remove it, do not empty the trash in case that doesn't work.

Don't worry about find a kext file. It could be that the program is loading the driver directly when the program is run.
 
Joined
Nov 28, 2007
Messages
25,564
Reaction score
486
Points
83
Location
Blue Mountains NSW Australia
Your Mac's Specs
Silver M1 iMac 512/16/8/8 macOS 11.6
Anything installed in System Preferences > Users & Groups > Login Items?
 
Joined
Nov 1, 2007
Messages
1,246
Reaction score
80
Points
48
Location
Swansea - South Wales
Your Mac's Specs
21 M1 Pro 14" MBP, 23 M2 Pro Mac Mini (MacOS 14), iPhone 15 Pro Max (iOS 17), iPad 6 (iPadOS 17)
That's probably not what's loading the driver. Drivers are usually never loaded from the hidden user library, instead they load from the system. If you can't find the driver, you may have to uninstall the application. In the meantime try renaming or removing the "photorobot-driver". If you remove it, do not empty the trash in case that doesn't work.

Don't worry about find a kext file. It could be that the program is loading the driver directly when the program is run.


Isn't there a simpler solution in the Image Capture App.

Open it, connect a camera and then click on the arrow icon at the bottom left and then click on "No Application" in answer to the question "Connecting a camera opens..."
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Hi everyone, thanks for all your help so far. I have an update on how the software driver and hardware (CUG5 Controllers and Robots for 360 Spin Photography) are configured. Apparently the hardware is designed/configured using NVT programming. According to them I would need to find someone who knew how to programme NVT. Anyone have experience with this type of programming and know how it could be used to disable the camera connecting via the software? Any help greatly appreciated. Thanks, Mark
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Isn't there a simpler solution in the Image Capture App.

Open it, connect a camera and then click on the arrow icon at the bottom left and then click on "No Application" in answer to the question "Connecting a camera opens..."

Hi, thanks for your post. I think in Image Capture there is this option, but the hack was better. I am not trying to disable this software unfortunately...but something else and was hoping to use a similar approach. Looks like this is unlikely now though. Thanks anyway. mark
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Anything installed in System Preferences > Users & Groups > Login Items?

Thanks for your post. Nothing in there unfortunately. Would you use the path Mac HD/System/Library/LoginPlugins to find this? Thanks, Mark
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Hi there, Here is a link to download the application itself. This is the software/driver which I need to somehow disable the camera connecting to.
I am not sure if analysing the software itself might provide a solution? This download is approx 70 megs and its a dmg file. Thanks, Mark
https://we.tl/t-E0eG6v0pV6
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Hi guys, not sure what I should do here? Should I create a new post asking for help with NVT programming? Cheers, Mark
 
Joined
Nov 1, 2007
Messages
1,246
Reaction score
80
Points
48
Location
Swansea - South Wales
Your Mac's Specs
21 M1 Pro 14" MBP, 23 M2 Pro Mac Mini (MacOS 14), iPhone 15 Pro Max (iOS 17), iPad 6 (iPadOS 17)
Hi guys, not sure what I should do here? Should I create a new post asking for help with NVT programming? Cheers, Mark

Yep I would :)
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
Hi everyone, I wondered if I could somehow block a specific application on mac from establishing a connection with the USB ports? Could this be done with an application, via terminal perhaps?

This could be an easier solution to my issue. Any help would be greatly appreciated. Cheers, Mark
 
OP
M
Joined
Dec 12, 2018
Messages
12
Reaction score
0
Points
1
I have an update and wondered if you guys who have already commented could help by any chance?

I just got this email from the softwares support team. The software I am trying to block connecting to the camera is called 'Controls'.

"on mac we use same drivers as the nikon software. Renaming drivers would maybe help. We do not block the camera, however we kill some processes that allow others to communicate with the camera. So that we have the actual access, which is the designed way to operate. If you were able to rename the PTPCamera to something else, it won't be killed by controls".

So I was wondering if I renamed the 'com.apple.PTPCamera.plist' file whether this would stop 'Controls' from connecting to my Nikon camera? Would it also stop my other software from connecting too? I will test this shortly to see what happens.

Would entering this into Terminal also work, be a better way of achieving this?

defaults -currentHost write com.apple.PTPCamera.plist disableHotPlug -bool YES

And this one to go back to default:
defaults -currentHost write com.apple.PTPCamera.plist disableHotPlug -bool NO

Another solution I was considering was to use Parallels, running the 3rd party Camera software in the Microsoft space and disabling the Mac space which has 'Controls' on it from connecting any devices. Could this also be an option?

Any help greatly appreciated as always.

Thanks, Mark
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top