NextFire / apple-music-discord-rpc

🎵 Discord Rich Presence Client for the macOS Apple Music app and iTunes
MIT License
559 stars 37 forks source link

Launch Agents #51

Closed Finnasaurus closed 1 year ago

Finnasaurus commented 1 year ago

as far as I'm aware (which is little), brew install doesn't actually automatically create the plist in launch agent anymore on the M1 Mac, I've tried reinstalling too but to no avail.

had to resort to adding the app to apple's startup app manually, any suggestion to do it more elegantly?

the error in question is Error: Permission denied @ rb_sysopen - /Users/finn/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist

but upon looking through the folder "LaunchAgents", the plist file doesn't even exist

NextFire commented 1 year ago

Can you try rm -f /Users/finn/Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist (you may need to sudo it) brew services stop apple-music-discord-rpc brew services start apple-music-discord-rpc and report me the output of brew services

Finnasaurus commented 1 year ago
Name                    Status User File
apple-music-discord-rpc none   root
NextFire commented 1 year ago

Send me brew services info apple-music-discord-rpc

Finnasaurus commented 1 year ago

sorry, was busy for the week

apple-music-discord-rpc (homebrew.mxcl.apple-music-discord-rpc)
Running: ✘
Loaded: ✘
Schedulable: ✘
NextFire commented 1 year ago

Hmm, re-execute brew services start apple-music-discord-rpc and resend me brew services info apple-music-discord-rpc. If everything goes well, the output should be

apple-music-discord-rpc (homebrew.mxcl.apple-music-discord-rpc)
Running: ✔
Loaded: ✔
Schedulable: ✘
User: <...>
PID: <...>
Finnasaurus commented 1 year ago

hey man, the problem was that I couldn't launcher with brew services start

Untitled 4

NextFire commented 1 year ago

Well, let's try fixing the perms

sudo chown -R $(id -u):$(id -g) ~/Library/LaunchAgents/
chmod 755 ~/Library/LaunchAgents/
rm -f Library/LaunchAgents/homebrew.mxcl.apple-music-discord-rpc.plist
brew services start apple-music-discord-rpc

If it still not works, it may be a homebrew bug

Finnasaurus commented 1 year ago

this seemed to have helped with the loading issue

finn@Mac-mini ~ % brew services info apple-music-discord-rpc
apple-music-discord-rpc (homebrew.mxcl.apple-music-discord-rpc)
Running: ✘
Loaded: ✔
Schedulable: ✘
NextFire commented 1 year ago

You may have to restart the system then confirm it is working fine