LTSP | LTSP4.2 Sound

Introduction

Warning: sound on LTSP should only be contemplated by those who enjoy good health and have no history of heart disease in their family. If you are of a nervous disposition you should not attempt sound on LTSP.

Please note that this solution, at best, result in poor quality sound. High fidelity it is not.

The absolute gospel according to LTSP sound is the following web page. You may consider this page to be disjointed and contradictory, that is because it is disjointed and contradictory.

Good luck!

ESD Socket

ESD requires a socket to run, but if your server doesn’t have a sound card, then the odds are that you do not have a socket. You will need to create this manually:

$ sudo mkdir /tmp/.esd
$ sudo touch /tmp/.esd/socket

You will need some form of script and cron job in order to make this persist beyond server reboots.

#!/bin/bash
if [ ! -e /tmp/.esd/socket ]; then
    /bin/mkdir /tmp/.esd
    /bin/touch /tmp/.esd/socket
fi

Save this script somewhere, make it executable and add it to crontab.

OSS transparent redirection to esd

There are other ways of getting sound, but this seems to work. Most Linux application can use /dev/oss, KDE, RealPlayer, Skype, … support it. Also if sound redirection by OSS might not be the best quality, in order to listen voicemails and/or online training it is more than enough.

The other nice thing with OSS redirection, is that from a system admin point of view it is a piece of cake !!! After you’ve started esound server from lts.conf as explained before, make it available automatically from X11 startup. In order to do so add in /etc/X11/Xsession somewhere before it launches your window manager.

REMOTE_X11=${DISPLAY%:*}
if test "$REMOTE_X11" == ""
then
  export REMOTEX_11=false
else
  export ESPEAKER=$REMOTE_X11:16001
  export ESDDSP_MIXER=1
# export LD_PRELOAD="/usr/lib/libesddsp.so.0 /usr/lib/libesd.so.0 $LD_PRELOAD"        # Non-debian
  export LD_PRELOAD="/usr/lib/esound/libesddsp.so.0 /usr/lib/libesd.so.0 $LD_PRELOAD" # Debian
  export REMOTE_X11=true
fi

Note that the line:

export LD_PRELOAD="/usr/lib/libesddsp.so.0 /usr/lib/libesd.so.0 $LD_PRELOAD"

must be changed to

export LD_PRELOAD="/usr/lib/esound/libesddsp.so.0 /usr/lib/libesd.so.0 $LD_PRELOAD"

In order to check, connect from your LSTP client and check $ESPEAKER. It’s value should look like ltsp-client-name:16001.

$ echo $ESPEAKER
ws179.ltsp:16001

Next step is to try it, by finding a .wav file somewhere is /usr/share/sounds and run it using esdplay:

$ esdplay /usr/share/sounds/alsa/test.wav

Hopefully you heard some sound?

Flash Sound

For YouTube and other flash websites, if you want sound, you should download and run this deb:

This is experimental and unsupported, but it worked first time.

Realplayer

References

Step 1: Create download directory

$ cd ~
$ mkdir realplayer8
$ cd realplayer8

Step 2: Download Realplayer 8

$ wget http://software-dl.real.com/2241543e04bd76d81218//support/unix/rp8_linux20_libc6_i386_cs1_rpm.htm

Step 3: Correct name of downloaded file

$ mv rp8_linux20_libc6_i386_cs1_rpm.htm rp8_linux20_libc6_i386_cs1.rpm

Step 4: Convert and install deb

I have tested and the –scripts option seems to work well.

$ alien --scripts rp8_linux20_libc6_i386_cs1.rpm
$ dpkg -i rp8_linux20_libc6_i386_cs1.deb
$ sudo ln -s /usr/local/netscape/plugins/rpnp.so /usr/lib/mozilla/plugins/rpnp.so

ESound on VMWare

If Enlightenment Sound Daemon is enabled on the Linux host, the software opens the host machine’s sound device by the time X starts. When a virtual machine with sound configured is started on a host with ESD running, Workstation will not be able to access the sound device because it is in use. As a workaround, you can start the Workstation session using the esddsp wrapper. Start the session by typing esddsp vmware or esddsp <virtualmachinename>.cfg. The wrapper will pass the sound output generated by the virtual machine as an audio stream to the ESD audio server.

MPlayer

MPlayer must be configured

/etc/mplayer$ sudo nano mplayer.conf
vo=x11
ao=esd
framedrop=1

$ sudo nano /etc/mplayerplug-in.conf

# See http://mplayerplug-in.sourceforge.net/config.php
# for a description of these options
vo=x11
ao=esd
cachesize=512
cache-percent=25
dload-dir=$HOME/tmp
autostart=1
enable-wmp=1
enable-qt=1
enable-rm=1
enable-gmp=1
enable-dvx=1
enable-mpeg=1
enable-mp3=1
enable-midi=0
enable-pls=1
enable-ogg=1
enable-smil=1
enable-helix=1
nomediacache=0
nopauseonhide=0
rtsp-use-tcp=0
rtsp-use-http=0
framedrop=1
comments powered by Disqus