Hi,
I’m trying to setup some non default pulseaudio behaviour together with kodi. I installed pulseaudio and if I remember correctly, after installation, kodi starts pulseaudio by default at the start of the service (systemctl start mediacenter). I’m having few different audio sinks configured and I would like t switch between them dynamically. To do so, I have to access pulseuadio daemon either with pacmd or pactl. Pulseaudio daemon is running on the osmc uid, co the access should be granted, but something doesnt work. There are no files at /run/user/1000/pulse/ where there should be a pid and socket file as I understand. Anyone have ideas how to solve this? Any help and/or ideas greatly appreciated.
> osmc@glowworm:~$ pacmd
> No PulseAudio daemon running, or not running as session daemon.
> osmc@glowworm:~$ pactl info
> xcb_connection_has_error() returned true
> Connection failure: Connection refused
> pa_context_connect() failed: Connection refused
> osmc@glowworm:~$ ps aux | grep pulse
> osmc 9571 6.3 0.7 116076 5736 ? Sl 14:32 0:36 /usr/bin/pulseaudio --start --log-target=syslog
> osmc 9675 0.0 0.0 2144 524 pts/0 S+ 14:42 0:00 grep pulse
> osmc@glowworm:~$ export DISPLAY=":0"
> osmc@glowworm:~$ export PULSE_RUNTIME_PATH="/run/user/1000/pulse/"
> osmc@glowworm:~$ pacmd
> No PulseAudio daemon running, or not running as session daemon.
> osmc@glowworm:~$ pactl info
> xcb_connection_has_error() returned true
> Connection failure: Connection refused
> pa_context_connect() failed: Connection refused
> osmc@glowworm:~$ ls -al /run/user/1000/pulse/
> total 0
> drwx------ 2 osmc osmc 40 Nov 23 14:38 .
> drwx------ 4 osmc osmc 80 Nov 21 15:27 …
> osmc@glowworm:~$ pulseaudio --version
> pulseaudio 5.0
> osmc@glowworm:~$ pacmd --version
> pacmd 5.0
> Compiled with libpulse 5.0.0
> Linked with libpulse 5.0.0
> osmc@glowworm:~$ pactl --version
> pactl 5.0
> Compiled with libpulse 5.0.0
> Linked with libpulse 5.0.0