Hi,
I've been playing around with using snapclient on my Pi's (version 3) with snapserver running on either Ubuntu via MPD or on our main Kodi libreelec system. I'm using RuneAudio version 0.5 (build: janui-20180903)
As far as compiling snapclient and listening to synced music/tv this has been very successful.
This was achieved by connecting to the Pi via SSH and manually starting the service using systemctl start snapclient
My issue is in trying to make it usable for the Mrs
Trying to keep it as simple as possible, I have added an on/off button to the features section of the settings display.
In settings_ctl.php, it either tries to start or stop the service but it is failing.
The runeui log shows me the following output:
PHP message: ### sysCmd($str) ### systemctl start snapclient
PHP message: ### sysCmd() output: ### $data type = array
PHP message: ### sysCmd() output: ### ['0'] => Failed to start snapclient.service: Interactive authentication required.
PHP message: ### sysCmd() output: ### ['1'] => See system logs and 'systemctl status snapclient.service' for details.
By running systemctl status snapclient.service I get:
Apr 14 07:14:47 pergola-pi systemd[1]: Starting Snapcast client...
Apr 14 07:14:47 pergola-pi snapclient[20698]: daemon started
Apr 14 07:14:47 pergola-pi systemd[1]: Started Snapcast client.
Apr 14 07:15:22 pergola-pi snapclient[20698]: Received SIGTERM signal.
Apr 14 07:15:22 pergola-pi systemd[1]: Stopping Snapcast client...
Apr 14 07:15:27 pergola-pi snapclient[20698]: daemon terminated.
Apr 14 07:15:27 pergola-pi systemd[1]: Stopped Snapcast client.
This is not hugely helpful.
It would appear the PHP is not running as root and thus is being denied access to starting the service.
Can anybody point out how I should be starting the service ?
I have tried changing /etc/default/snapclient to run as a different user (snapclient) but that is not allowing the service to start either.
When configured to use the user snapclient, it doesn't throw an error in the log...
Cheers
Matt
PS: Not sure if this is related but i needed to update the version of glibc to 2.28 to allow snapclient to run. This does not appear to affect RuneAudio. At least not in the way i have been using it.