How to Compile xRDP+X11RDP on Ubuntu

Here you find some notes how to compile and run XRDP with X11RDP and sound redirection working…

Package required:

sudo apt-get build-dep xserver-xorg-core
apt-get install autoconf libtool pkg-config
apt-get install libssl-dev libpam0g-dev libjpeg-dev libx11-dev libxfixes-dev flex bison libxml2-dev intltool xsltproc xutils-dev python-libxml2 xutils libpulse-dev

If you what to use GIT:

apt-get install git

then create a folder, go into and

git clone git://github.com/FreeRDP/xrdp.git

Or download and extract xrdp-master.zip from https://github.com/FreeRDP/xrdp

Compile XRDP:
go to xrp subfolder and run these commands.

./bootstrap
./configure --enable-jpeg --enable-simplesound
make
make install

Compile X11RDP:
go to xorg/X11R7.6 subfolder and run this command

./buildx.sh /opt/X11rdp

create a symbolic link for sesman:

ln -s /opt/X11rdp/bin/X11rdp /usr/local/bin/X11rdp

start service on boot:

cp /etc/xrdp/xrdp.sh /etc/init.d/
update-rc.d xrdp.sh defaults

copy rsa key from the folder where you extract the source:

sudo cp ../xrdp/rsakeys.ini /etc/xrdp

Compile Pulse sink (need to make sound redirection working):

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

Download and extract pulseaudio source from here http://freedesktop.org/software/pulseaudio/releases/:

tar -zxvf pulseaudio-3.0.tar.gz

cd into and run

./configure

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 to build the pulse sink.

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

make

copy xrdp module to pulse module folder:

sudo cp module-xrdp-sink.so /usr/lib/pulse-3.0/modules/

..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.
Edit /etc/asound.conf

pcm.pulse {
type pulse
}

ctl.pulse {
type pulse
}

pcm.!default {
type pulse
}

ctl.!default {
type pulse
}

Edit /etc/pulse/default.pa

.nofail
.fail
load-module module-augment-properties
load-module module-xrdp-sink
load-module module-native-protocol-unix

reboot…

Advertisements

2 thoughts on “How to Compile xRDP+X11RDP on Ubuntu

  1. Sylla says:

    Hi!!it’s 1month that i try to compile x11rdp in my ordi but this command ./configure –enable-jpeg –enable-simplesound doesn’t run!!i’m too tired and i need to be helped.

  2. Sylla says:

    we’re a team that works in this problem sound redirection printer and usb …but it’s several days that we have problem to run this command ./configure –enable-jpeg –enable-simplesound and if you can help us for printer and usb redirection we’re ready to give all our energy in order to success.th@nks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s