Ubuntu articles

Sending local audio to another computer with PulseAudio

First, you need to have PulseAudio installed, and working. You can consider that be pretty done if you’re using any recent Ubuntu version such as 10.10. Now, to avoid having to manually edit config files, let’s make sure you also install two nifty GUIs: padevchooser and paprefs:

sudo apt-get install padevchooser paprefs

Do that in both computers (the ’emitter’ and the ‘receiver’).

The fun starts now!

In the computer that will be playing the sounds (the receiver or, technically, server), go to System ⟶ Preferences ⟶ Pulse Audio Preferences and:

  • Under the “Network server” tab, check
    1. “Enable network access to local sound devices”,
    2. “Allow other machines on the LAN to discover local sound devices” and
    3. “Don’t require authentication”

And in the computer that will be sending the sounds (the emitter, or technically, client), go to System ⟶ Preferences ⟶ Pulse Audio Preferences and:

  • Under the “Network access” tab, check “Make discoverable PulseAudio network sound devices available locally”

We still need to tell the client computer that it needs to send its output to somewhere else other than its speakers. To do this, open Applications ⟶ Sound and Video ⟶ PulseAudio Device Chooser, and a new icon will show in your tray. At the time of writing this, it seems it’s actually missing the icon, so it shows a “forbidden” icon instead of a proper tray icon. So click that (left mouse button) and in the pop menu that shows up, select Default Sink ⟶ user@server: Internal Audio Analog Stereo, or something similar. user should be the name of the user logged in that computer, and server the name of the computer. For example, maria@marias-laptop.

If you don’t get any entry under Default Sink, make sure both computers are connected to the same network. Maybe try to ping them? 🙂

I have also found that once you open a program that plays audio, if you change the Default Sink to something else that program won’t stop sending its output to the sink that was marked as default at the time it started playing.

And that’s all! Hope you enjoy it and have some fun sharing audio between computers with PulseAudio!