xrdp pulseaudio sink and source PDF Print E-mail
Written by Jay Sorg   
Tuesday, 07 May 2013 19:06


Pulse Audio is a sound system for Linux systems.

Here is how to build an xrdp sink for Pulse Audio.

This is a temporary manual build procedure.  I hope to make this easier in the future.  Any help would be appreciated.


First we need to build xrdp pulse sink for your distro.
You need to build this using the pulseaudio source code.
(We don't need to install pulse from source, we just need the source code for the structures and header)


To get the source code for your distro, first make sure you have pulse installed.  Check by doing
pulseaudio –version
at the command prompt.


and grab the closes version to what you have.

Debian 6

jay@system76-x86:~$ pulseaudio --version
pulseaudio 0.9.21-rebootstrapped-dirty
From this I know to download


Debian 7

jay@system76-x86:~$ pulseaudio --version
pulseaudio 2.0

From this I know to download



CentOS 6.4

[speidy@centos ~]$ pulseaudio --version
pulseaudio 0.9.21
From this I know to download

extract and cd into pulseaudio source dir, then run



to get ./configure on pulse source to run, you might need to install


apt-get install libjson0-dev
apt-get install libsndfile1-dev
apt-get install libspeex-dev
apt-get install libspeexdsp-dev


yum install libtool-ltdl-devel intltool libsndfile-devel speex-devel

Once you get ./configure to run, you are done with this part.  You don't need to actually build the downloaded pulse audio.


Now, cd into xrdp/sesman/chansrv/pulse

You need to edit the Makefile in order to build the pulse sink.

Edit PULSE_DIR at the top of the file to point to pulseaudio source directory you extracted to above.

Then run make.

Then copy the file to pulseaudio system modules directory


or whatever your version is.


Now, you need to change the pulse and alsa setting on the terminal server.

Note, this will break any local sound as all audio will go to the xrdp sink.


Create or change these files to look like this.  Make a backup first in case you want to go back.  Note, don't put the long lines of minus in the file, that is a seperator for this document.


pcm.pulse {
type pulse

ctl.pulse {
type pulse

pcm.!default {
type pulse

ctl.!default {
type pulse

load-module module-augment-properties
load-module module-xrdp-sink
load-module module-native-protocol-unix


More notes into sesman/chansrv/pulse/module-xrdp-sink.c

Have fun!




Last Updated on Monday, 26 May 2014 22:46