Support Center

Your questions answered

Knowledge Base

Searching in: Articles & FAQs
Filter the search results
Applies to:
Last update:
Searching in: Articles & FAQs
ID: AR11E00491
Applies to: NX Server Products
Added on: 2007-11-29
Last update: 2015-05-27
How to enable ESD sound support on Linux distributions not shipping the Enlightened Sound Daemon

This article mainly applies to NX 3.5.0 which relies on ESD to enable multimedia support. NoMachine 4 instead integrates its audio framework with PulseAudio sound server and ALSA (on Linux):

If you still need to use ESD, please note that some Linux distributions such as Fedora 8 and Ubuntu 7.10 have replaced the Enlightened Sound Daemon with the PulseAudio sound server.

What to do if you are running RHEL 6 or another recent Linux distribution shipping only Pulse and not ESD

This procedure should work for every OS with PulseAudio server. We have, in any case, kept an earlier article we wrote specifically for Fedora 8. This is further down.

How to configure PulseAudio server to work with NX:

1. Start NX session.

   If NX Client is on Linux with PulseAudio, launch it from command line by

    $ padsp /usr/NX/bin/nxclient

2. Load EsounD Output module for PulseAudio and configure to NX:

$ pactl load-module module-esound-sink server=$ESPEAKER sink_name=nxaudio

3. Write down Default Sink name:

$ pactl stat

Output should be similar to:

Currently in use: 79 blocks containing 495.4 KiB bytes total.

Allocated during whole lifetime: 49474 blocks containing 163.8 MiB bytes total.

Sample cache size: 138.3 KiB

User name: nomachine

Host Name: vb-CentOS-6-32

Server Name: pulseaudio

Server Version: 0.9.21

Default Sample Specification: s16le 2ch 44100Hz

Default Channel Map: front-left,front-right

Default Sink: alsa_output.pci-0000_00_05.0.analog-stereo

Default Source: alsa_input.pci-0000_00_05.0.analog-stereo

Cookie: 4d8923f5

4. Load Loopback module for PulseAudio to route audio for EsoundD Output

$ pactl load-module module-loopback source=<DefaultSink>.monitor

NOTE: You need to replace <DefaultSink> with proper name from above

In this example a whole string will look like:

$ pactl load-module module-loopback
source=alsa_output.pci-0000_00_05.0.analog-stereo.monitor sink=nxaudio

After that audio should work in NX.

If you want to make this automatic with a script, you can use the following as an example:


pactl load-module module-esound-sink server=$ESPEAKER sink_name=nxaudio

defaultSink=$(pactl stat | grep "Default Sink: " | sed -e "s/Default Sink: //g")

pactl load-module module-loopback source="$defaultSink".monitor sink=nxaudio

What to do if you are running an earlier Linux distribution with no ESD shipped.

If you want to forward sound from within the NX session to the local PC, you need to add ESD plugins to your favorite sound applications on the server side.

What follows is a sample how-to for adding ESD plugins to GStreamer multimedia framework to enable sound in GNOME and various other applications which use GStreamer on Fedora 8.

Install dependency libraries required to compile the ESD plugin for GStreamer:

# yum install liboil-devel esound-devel gstreamer-devel

Download the ESD plugin, i.e. gst-plugins-good:

 # wget

Decompress and untar the archive:

# tar zxvf gst-plugins-good-0.10.6.tar.gz

Change directory:

# cd gst-plugins-good-0.10.6

Configure gst-plugins-good to compile only one external plugin, i.e. ESD:

# ./configure --disable-examples  --disable-directdraw
--disable-directsound --disable-oss --disable-sunaudio
--disable-osx_audio --disable-osx_video --disable-gst_v4l2 --disable-x
--disable-xshm --disable-xvideo --disable-aalib --disable-aalibtest
--disable-annodex --disable-cairo --disable-cdio  --disable-flac
--disable-hal --disable-jpeg --disable-libcaca --disable-libdv
--disable-libpng --disable-dv1394 --disable-shout2 --disable-shout2test
--disable-speex --disable-taglib --disable-wavpack --disable-zlib
--disable-gconf --disable-gdk_pixbuf

Copy the compiled ESD plugin to the GStreamer directory:

# cp ./ext/esd/.libs/ /usr/lib/gstreamer-0.10/

Now, you should be able to set ESD as a output plugin in the GNOME Sound Preferences (System -> Preferences -> Hardware -> Sound).

A related article about what to do to play sound inside the NX 3.5.0 session is: