You are not logged in.
I'm trying to get the sink-inputs of a different user.
pactl list sink-inputs
--> works
sudo -u myuser pactl list sink-inputs
--> gives me the error below
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
Any idea on how I could work around this? I need to do this because I have a script (php) run as the http user, but I need the input-sinks of my current user
Offline
To save other people arriving at this from a lot of headache, the reason this doesn't work is that you also need to set XDG_RUNTIME_DIR:
sudo -u myuser env XDG_RUNTIME_DIR=/run/user/$(id -u myuser) pactl ...
Offline