dtcooper / raspotify

A Spotify Connect client that mostly Just Works™
https://dtcooper.github.io/raspotify
MIT License
4.62k stars 211 forks source link

How do I get my $PLAYER_EVENT to work? (trouble with the conf syntax) #591

Closed mommotti closed 1 year ago

mommotti commented 1 year ago

Due Diligence

What can we help you with?

I saved this on /etc/default/onscript.sh and did the chmod image

off.py and on.py are on /home/pi/scripts/ and both scripts work (one script is to turn on 3 blinking leds and the other is to turn it off)

This is the conf file: image

I may be failed with the conf file syntax.

Thank you in advance :)

JasonLG1979 commented 1 year ago

That will not work for a couple reasons both related to the fact that the Raspotify service runs as an unprivileged dynamic user. Because of that it can't access that location and sudo will not work.

The troubleshooting guide in the wiki (the one you said you read when you checked the box to file this bug report) says as much.

JasonLG1979 commented 1 year ago

You're args are also incorrect.

It should be:

LIBRESPOT_EMIT_SINK_EVENTS=
LIBRESPOT_ONEVENT="/path/to/your/script"

And in the future please don't post screenshots of text. Just paste the actual text. Text is searchable images of text are not.

JasonLG1979 commented 1 year ago

You can use triple backticks to quote terminal output:

like this

And you can use triple backticks followed by the language name for syntax highlighting:

def foo():
    return bar