How to Compile xRDP+X11RDP on Ubuntu

Luca's Space

God@Linux:~# emerge universe

How to Compile xRDP+X11RDP on Ubuntu

May 27, 2013

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值