0

I installed sleepwatcher using Homebrew. Everything worked well as it seems, here's the output:

josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$ brew install sleepwatcher
==> Downloading https://homebrew.bintray.com/bottles/sleepwatcher-2.2.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring sleepwatcher-2.2.el_capitan.bottle.tar.gz
==> Caveats
For SleepWatcher to work, you will need to read the following:

  /usr/local/Cellar/sleepwatcher/2.2/ReadMe.rtf

Ignore information about installing the binary and man page,
but read information regarding setup of the launchd files which
are installed here:

  /usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist
  /usr/local/Cellar/sleepwatcher/2.2/de.bernhard-baehr.sleepwatcher-20compatibility.plist

These are the examples provided by the author.

To have launchd start sleepwatcher now and restart at login:
  brew services start sleepwatcher
==> Summary
🍺  /usr/local/Cellar/sleepwatcher/2.2: 8 files, 53.3K

I wanted to run the service as suggested in the output, but got the following error:

josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$ brew services start sleepwatcher
==> Tapping homebrew/services
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-services'...
remote: Counting objects: 7, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 7 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), done.
Checking connectivity... done.
Tapped 0 formulae (32 files, 46.4K)
Error: Formula `sleepwatcher` not installed, #startup_plist not implemented or no plist file found
josh@Macbuech:~/Documents/Work/Access4All/projects/a4aa2/src$

I'm unsure now. Did I miss something important? I read the README but it's confusing to me, I have no experience with launchd, daemons, services...

I want sleepwatcher to always run on my computer so it executes ~/.sleep and ~/.wakeup when going to sleep or wake up.

Update

I made sure that brew service is available, but didn't make it work.

josh@Macbuech:~/Documents/Work/MuheimWebdesign/tests/tilt$ brew tap homebrew/services
josh@Macbuech:~/Documents/Work/MuheimWebdesign/tests/tilt$ brew services start sleepwatcher
Error: Formula `sleepwatcher` not installed, #startup_plist not implemented or no plist file found

1 Answer 1

0

Did you install brew service first? If not, you will need to do it just for one time,

brew tap homebrew/services

After that you should be able to

brew services start sleepwatcher

without any error.

Hope this helps.

8
  • Thanks, but didn't work out, look at my updated question. May 12, 2016 at 9:35
  • Thanks for your update. Now I would suspect if your user doesn't have the privilege to drive the linking of plist file. Just for testing, can you try with sudo brew services sleepwatcher and see if the output is different?
    – hkdtam
    May 12, 2016 at 10:00
  • Giving me the same error. May 12, 2016 at 11:38
  • Thanks for your feedback, now probably need to unwrap brew services and run those behind the scene stuff manually to understand more, please try the following ln -sfv /usr/local/Cellar/sleepwatcher/2.2/*.plist ~/Library/LaunchAgents and then launchctl load ~/Library/LaunchAgents/de.bernhard-baehr.sleepwatcher-20compatibility.plist
    – hkdtam
    May 13, 2016 at 5:40
  • Thank you. I executed both commands, and they seemed to work as expected. But brew services start sleepwatcher still returns Formula sleepwatcher` not installed`. May 17, 2016 at 8:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .