I have a .sleep script that I launch with sleepwatcher everytime my MacBook Pro goes to sleep (by closing the lid).

On Mojave, everything worked fine. Now on Catalina (10.15.5), every time I boot :

  • I have the message "can't open sleepwatcher because it's from an unidentified developer" popping up over and over again. I have to go to System -> Security -> Open Anyway in order to stop the message. (Thanks to @Allan, I managed to get sleepwatcher out of the quarantine flag).

  • to get my script back in order, I have to relaunch the .sleep manually via the command line /usr/local/sbin/sleepwatcher --verbose --sleep ~/.sleep.

How can I make my Mac remember sleepwatcher & my .sleep setting like old times ?

  • 1
    I’m thinking that the quarantine flag is still set. First, check it with the command xattr appname.app. If it comes back with com.apple.quarantine, the flag is set. Remove it with the command sudo xattr -r -d com.apple.quarantine Appname.app – Allan Jun 17 at 8:11
  • xattr sleepwatcher.app return xattr: No such file: sleepwatcher.app. sleepwatcher is connected to homebrew, could it be why there is no sleepwatcher.app ? – Edd Growl Jun 17 at 10:22
  • 1
    Make sure you're in the directory where sleepwatchet.app is located. But as far as Homebrew goes, I’ll have to research because I use MacPorts instead and my experience is limited there – Allan Jun 17 at 10:29
  • I found sleepwatcher in /usr/local/Cellar/sleepwatcher/2.2.1/sbin and it was indeed in quarantine ! However, sleepwatcher still needs to be setup manually after rebooting... any idea why ? – Edd Growl Jun 17 at 11:59
  • So you remove it, then reboot and it reverts back to quarantine status? If so, i don’t know why It’ll do that. I will have to research more. Maybe it’s one of the sleepwatcher dependencies that’s also quarantined. Is there a way in homebrew to list an app’s dependencies? – Allan Jun 17 at 12:46

You must log in to answer this question.

Browse other questions tagged .