[pulseaudio-discuss] play music stream on headless server
Sean Greenslade
sean at seangreenslade.com
Fri Mar 20 19:23:52 UTC 2020
On Fri, Mar 06, 2020 at 06:33:11PM -0500, sean darcy wrote:
> On 2/14/20 8:05 PM, sean darcy wrote:
> > I'm trying to play music on a headless server, on which firefox will be
> > playing a streaming channel.
> >
> > If I'm on the headless server all works well.
> >
> > But when I ssh into the server as the same user, nothing works. If I
> > start pulseaudio:
> >
> > pulseaudio -D
> >
> > pa finds no sinks:
> >
> > pacmd list-sinks
> > 1 sink(s) available.
> > * index: 0
> > name: <auto_null>
> > driver: <module-null-sink.c>
> > ...........
> > properties:
> > device.description = "Dummy Output"
> > device.class = "abstract"
> > device.icon_name = "audio-card"
> >
> > This should be common use case. How do I set it up ?
> >
> > sean
>
> Maybe I asked this incorrectly.
>
> I'd like to ssh into a headless remote machine. Start a browser which shows
> on my local machine. Use the browser to stream music, and I want the music
> to play on the _remote_ machine.
>
> I'm surprised that this doesn't Just Work, but it doesn't.
>
> Any suggestions ? Any link to a howto ?
>
> Or is this the wrong mailing list for this question ?
Hi, fellow Sean. Sorry for the super late reply, I had meant to send
this earlier.
There are a few ways of accomplishing this, depending on how your
devices are arranged. I've personally done it like this:
Machine A has the soundcard and speakers. Machine B is sourcing audio
that I want to hear on Machine A. Both machines are on the same LAN. To
do this, I enabled module-native-protocol-tcp on Machine A and
synchronized the auth cookies on both machines. Finally, on Machine B, I
ran commands with PULSE_SERVER=hostname-A set.
You can see this page for a little more detail on networking pulseaudio:
https://wiki.archlinux.org/index.php/PulseAudio/Examples#PulseAudio_over_network
The other option is if you want to run everything on the same machine.
For that, system-wide mode may be an option:
https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/
Alternatively, the Arch Wiki suggests doing something similar to the
network audio setup but with unix sockets instead:
https://wiki.archlinux.org/index.php/PulseAudio/Examples#Allowing_multiple_users_to_use_PulseAudio_at_the_same_time
I've personally never tried either of the latter two, so I can't
guarantee they'll work. Feel free to try any of these out, and if you're
still having trouble getting a working setup, let us know.
Good luck,
--Sean
More information about the pulseaudio-discuss
mailing list