I am trying to use scripts such as sox and rec without the mic | Ask Ubuntu and recording from PulseAudio | outflux.net
If I ssh into the box and try to run any command such as
pactl list short sources
I get back
root@blue:~# pactl list short sources
No protocol specified
xcb_connection_has_error() returned true
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
root@blue:~#
I get the same if I try parec. Now if I try it from the desktop it works fine. I am using Ubuntu 16.0.4. Any idea what would cause this? Doing the same on CentOS 7 has no such issue.