Sound over network for your thin clients

Using Lubuntu 12.04 for connections to icewm on Ubuntu 12.04. The exact configuration involves hosting a pulse sound server on each thin client, and configuring applications on the remote desktop to pipe back sound to the respective thin client. A trusted environment is assumed here, so please refer to the PulseAudio Network documentation on freedesktop.org and various general security guidelines (firewalls, tunnels, IPsec, VPN, etc.) if you're planning anything serious. Thin client setup:
  1. Purge any left over configuration:
    rm -Ri ~/.pulse
  2. Install PulseAudio:
    sudo apt-get install pulseaudio dbus-x11
  3. Enable local sound access (not sure if needed):
    sudo adduser $USER pulse; sudo adduser $USER pulse-access
    then log out and log in again
  4. Give local and network access to the sound:
    cp -t ~/.pulse/ /etc/pulse/default.pa
    # APPIP="type application server IP address here"
    echo "load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1/32;$APPIP/32" >> ~/.pulse/default.pa
    pulseaudio --kill
    pulseaudio --start
  5. Test with a beep to verify if PulseAudio works locally:
    seq 1 10000|paplay --raw --playback
    Also verify if ALSA over PulseAudio works locally:
    seq 1 1000|aplay -
  6. Overwrite the Pulse authorization cookie for your user on the application server to enable connecting back to the client sound:
    scp ~/.pulse-cookie $APPIP:
Application server setup:
  1. You have two choices to use applications with sounds:
    • Set the environment variable
      PULSE_SERVER
      to the IP of the client (either globally in .bashrc et al, or each time):
      export PULSE_SERVER=$THINIP
    • cp -it ~/.pulse/ /etc/pulse/client.conf
      echo "default-server $THINIP" >> ~/.pulse/client.conf
  2. Test sound with aplay/paplay as above
  3. Test sound on an HTML5 and Flash multimedia sharing site of your choice (I tested YouTube on Chromium)
  4. Enjoy!

Comments

Popular posts from this blog

Hidden TFTP of TP-Link routers

Tftp secret of TL-WR740N uncovered

When both Google *and* AppStatus is down