Send sound over the network with Pulseaudio
-
Imagine the following situation: you have a desktop computer, a laptop, and a netbook with Linux. On the desktop, you have brand new speakers that emit spectacular sound, but the laptop and netbook have ridiculous little speakers whose sound seems more like an empty soda can falling down the stairs than the music you're listening to.
Now imagine that you could use the speakers of your desktop PC without needing to physically connect them to the laptop or netbook.
Pulseaudio, that frontend that has caused us so many headaches and whose usefulness has been questioned numerous times, among other things, allows you to do that without much effort.
First, open the PA preferences on the PC where you have the good speakers by putting in the console:
paprefs

In the "Network Server" tab, select "Enable network access to local sound devices" and "Do not ask for authentication".
Now you close the window, go to the laptops and put this in the console:
pacmd load-module module-tunnel-sink server=ip_local_del_pc_donde_están_los_altavoces
Press intro and type this:
pavucontrol
In the "Playback" tab, you will see the programs that are playing audio on your laptop. If you have nothing, put something to play

Now in each program that plays audio, you can choose whether to listen through the laptop speakers or the brand new desktop speakers without needing to connect any cables. The best part is that you can have programs playing audio in one place and others in another.