Using PulseAudio as network sound server on Ubuntu and Fedora

PulseAudio Logo

When I hear word PulseAudio the first thing that comes to my mind is one sleepless summer night back in 2008. when I was up trying to make my sound work on Ubuntu Hardy Heron (8.04) PC. PulseAudio had rocky start back in 2008. when it first appeared inside Ubuntu and Fedora distros that decided to implement this new piece of code designed to expand Linux audio sky with ton of new possibilities. I think that most of us would agree that these days PulseAudio mostly works. When I say it works I mean that most users can't say is PulseAudio demon running in background or not. Sound just works. The sound worked before PulseAudio was introduced, so someone might ask what's the point in going trough all this trouble to adopt PulseAudio? In this post I will show you how to use PulseAudio the way it was meant to be used - as network sound server. Follow me...

What can you do with network sound server you might ask? You can for example play your music using speakers attached to any of the PCs inside your local network or even anywhere in the world. Cool isn't it? Setting this up in modern distros like Ubuntu and Fedora is just a few clicks away. Let me show you how.

Background

PulseAudio Client

PulseAudio client is PC that acts as source of audio. This is the PC where you will start your favorite music player (DeaDBeeF is my favorite) and play your favorite music.

PulseAudio server

Server PC is computer whose speakers will reproduce sound being played on PulseAudio network client PC. PulseAudio server can serve as many clients as you like with slightly modified setup. That way you can play your music on every speaker connected to your LAN PC if that is what you desire.

Installing PulseAudio preferences utility

First things first, if we don't want to mess with terminal to much we need to install GUI application for controlling PulseAudio - PulseAudio preferences (paprefs) . Tweaking PulseAudio from terminal is a bit more complicated but much more flexible. It's sufficient to say that everything you can do trough GUI you can do using terminal (and much more).

Fedora

If you run great Fedora operating system this is how you could install "paprefs" from terminal:

su -c 'yum install pulseaudio-module-zeroconf'
su -c 'yum install paprefs'
Ubuntu

If you happen to run Debian based user friendly operating system Ubuntu here's how to install "paprefs" from terminal:

sudo apt-get install paprefs

Tweaking PulseAudio preferences

After "paprefs" is installed we need to tweak some of the "paprefs" options on both client and server PC. Press Alt+F2 and enter "paprefs" into the "Run Application" dialog. Here are the options you should check inside "Network Access" tab inside "paprefs" interface:

PulseAudio preferences "Network Access" tab

After you are finished with "Network Access" tab", switch to "Network Server" tab and enable "Enable network access to local sound devices" option. You should also enable "Allow other machines on the LAN to discover local sound devices". If you have only trusted PCs inside your local area network like inside your home network, you can enable "Don't require authentication". This is how it should look like:

PulseAudio preferences "Network Server" tab

You should repeat all of this for everyone of your PCs. This way every PC inside your local area network can serve as PulseAudio network sound server and become client if necessary.

Using your PC as PulseAudio network client

Now you can open sound options on your client PC by pressing Alt+F2 and entering "gnome-volume-control" into the "Run Application" dialog. On the "Output" tab you should be able to select any of the devices on your server PC as well as any local sound device as output device. If you don't find all of your server sound devices on the "Output" list inside "gnome-volume-control" of your client PC, retrace your steps and make sure that all settings on the server PC as well as on the client PCs are OK. One more thing. Pulse audio is network application so restrictive firewall could get into the way of your remote audio. Also sometimes is required to reboot server and client PCs for everything to work properly after enabling PulseAudio network capabilities. If everything is OK and you have selected client sound device of your choice as the output device inside "gnome-volume-control", you can start your preferred music player on the client and listen your audio on the speakers connected to the selected client PC.

That's it. For any problems you can write here and I will once again do my best to assist you. Good luck!

DevGenii

A quality focused Magento specialized web development agency. Get in touch!

10 thoughts on “Using PulseAudio as network sound server on Ubuntu and Fedora

  1. Neal

    that’s great, but what do you do when ubuntu “all knowing” devs decided to disable it beyond normal methods and all the damn choices are greyed out in paprefs??? is there a way to fix this?

    Reply
  2. Casey

    I have installed paprefs in Ubuntu 11.10, 64-bit, but the all the options in the Network Access tab, and all other tabs besides Simultaneous Output, are grayed out and unclickable. Do I need to (re-)install something else to get the system to work? I want to stream music to my AirPort Express, having recently moved from Apple to Ubuntu on an HP Laptop.

    Thanks.

    Reply
  3. mrG

    I have installed paprefs on a Lubuntu machine running LXDE desktop, and I need to bind all output devices together; how do I enable the paprefs device from LXDE (or from a command line) — there does not appear to be a gnome-volume-control program in ubuntu 11.10

    Reply
  4. Christoph

    I love the concept and it seems to work for my setup. But do you know how we can increase the buffer size? I experience many audio lacks, when I forward sound output to another machine.

    Reply
    1. Marko Author

      Hi Christoph,
      I can confirm that with recent Pulse Audio versions and I have yet to discover solution, thus I’m also interested to find an answer to your question?

      Cheers!

      Reply
  5. Fixitmanarizona

    So, that’s the first time I’ve heard PulseAudio was designed as a NETWORK audio control only, which I DO NOT NEED… except, for some reason, to run certain versions of Firefox, apparently. Other than that it’s a nightmare. No freaking reason for this thing, it just adds complexity and another layer to confuse the user. AND it doesn’t work on some machines/setups! And this is SEVEN YEARS after the original post above!!!
    The good ol’ Alsa + Jack system was much better and easier to tame!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *