lukasjapan / bt-speaker

A simple Bluetooth Speaker Daemon for the Raspberry Pi 3
GNU General Public License v3.0
495 stars 95 forks source link

Unable to create directories in bt_speaker user directory? #22

Open theFisher86 opened 7 years ago

theFisher86 commented 7 years ago

When I check the sudo systemctl status bt_speaker.service I see this error. It seems there are some permissions issues for the btspeaker user?

Oct 22 11:01:07 retropie systemd[1]: Started "Simple bluetooth speaker for the Raspberry Pi".
Oct 22 11:01:09 retropie bt_speaker.py[13467]: Failed to create secure directory (/home/btspeaker/.config/...tory
Oct 22 11:01:09 retropie bt_speaker.py[13467]: Failed to create secure directory (/home/btspeaker/.config/...tory
Oct 22 11:01:09 retropie pulseaudio[13476]: [pulseaudio] authkey.c: Failed to open cookie file '/home/btsp...tory
Oct 22 11:01:09 retropie pulseaudio[13475]: [pulseaudio] authkey.c: Failed to open cookie file '/home/btsp...tory
Oct 22 11:01:09 retropie pulseaudio[13476]: [pulseaudio] authkey.c: Failed to load authorization key '/hom...tory
Oct 22 11:01:09 retropie pulseaudio[13475]: [pulseaudio] authkey.c: Failed to load authorization key '/hom...tory
Oct 22 11:01:09 retropie pulseaudio[13476]: [pulseaudio] authkey.c: Failed to open cookie file '/home/btsp...tory
Oct 22 11:01:09 retropie pulseaudio[13475]: [pulseaudio] authkey.c: Failed to open cookie file '/home/btsp...tory
Oct 22 11:01:09 retropie pulseaudio[13476]: [pulseaudio] authkey.c: Failed to load authorization key '/hom...tory
Hint: Some lines were ellipsized, use -l to show in full.
theFisher86 commented 7 years ago

I was able to fix this by manually creating the /home/btspeaker/.config/pulse/ directory and giving btspeaker ownership on the entire /home/btspeaker/directory

lukasjapan commented 6 years ago

I think it is because pulseaudio changes the default behaviour of aplay. It will route audio to the pulseaudio daemon instead of sending it directly to sound card. Pulse then needs a valid home directory.