How can I find what process is starting apps in the background?
I keep seeing CIJScannerRegister running. I'd like it to never run. Every time it appears I use launchctl
to remove its listing and that kills the app. But it reappears later. I know where CIJScannerRegister lives and could delete it, but I would rather get whatever is starting it to not start it. I've looked through /System/Library/Launch{Agents,Daemons}
and cannot find any matching entry in there. How can I find the process that is launching it and tell it to stop?
Solution 1:
CIJScannerRegister is of no use if you don't have an old Canon Inkjet, but Mavericks really wants to have it running all the time.
It's in /Library/Image Capture/Support/LegacyDeviceDiscoveryHelpers, but if you remove it it will appear again in the form of a "Canon Inkjet Printer Software Update" in the App Store.
The only solution I found was to delete the executable inside the app bundle so the OS thinks it's still installed but it can't run.
In Terminal:
killall CIJScannerRegister
cd /Library/Image\ Capture/Support/LegacyDeviceDiscoveryHelpers/CIJScannerRegister.app/Contents/MacOS/
sudo rm CIJScannerRegister
Solution 2:
You can use the PPID to find out which process started another process :
ps axo stat,ppid,pid,comm
PPID referes to the PID of the process who started it.
Solution 3:
Run Activity Monitor
(from /Applications/Utilities
), click on the CIJScannerRegister process, then press Cmd+I (or use the Inspect button or go to View > Inspect Process). You will see the Parent Process: field show the name and the process id of the process that launched it.