-
Notifications
You must be signed in to change notification settings - Fork 42
Build on Fedora
This process has been tested on the following operating systems:-
- Fedora 34
- Fedora 35 (Needs release 0.6)
Pipewire is not directly supported. You will need to use pulseaudio to get sound in and out of your xrdp sessions.
To build the xrdp pulseaudio module, we need access to the pulseaudio
sources and configuration files. This is because the xrdp pulseaudio module makes use of internal pulseaudio
interfaces. The simplest known way to obtain all of this is to build pulseaudio
on the target machine.
We use the mock
tool to build pulseaudio
. This allows us to get the pulseaudio
sources and configuration simply, and also allows the developer to clean up easily after building the module. It also allows developers to use (for example) a Fedora workstation to build a CentOS 8 module if this is desired.
The mock
tool can be a security risk. If this is a consideration in your environment, make sure you remove it after building the module.
Allow 2G of disk space for the mock root in /var/lib/mock
.
It is assumed that you will be building and installing the package using an existing user account with sudo
privileges.
Use these commands to install the mock
package, and add the current user to the mock
group:-
sudo dnf install mock
sudo usermod -a -G mock $USER
Log out and log in again as the current user, and use the id -Gn
command to check you are on the mock
group:-
$ id -Gn ... wheel mock
Make a temporary directory to hold sources while we are working:-
mkdir xrdp-tmp
cd xrdp-tmp
Download the source RPMs you need to build pulseaudio
, and build them together:-
dnf download --source pulseaudio
mock ./pulseaudio-*.src.rpm
The last command can take a while to execute. Allow 20-30 minutes on a slow machine.
The build is made in a sub-directory of /var/lib/mock
. This can be fairly deep, so is best located with a find
command:-
find /var/lib/mock -type d -name pulseaudio-\* 2>/dev/null /var/lib/mock/fedora-35-x86_64/root/builddir/build/BUILD/pulseaudio-15.0
Assign this directory to the environment variable PULSE_DIR
. On your system, this value may well be different:-
PULSE_DIR=/var/lib/mock/fedora-35-x86_64/root/builddir/build/BUILD/pulseaudio-15.0
Finally, let's build xrdp source / sink modules. You'll have two .so files
module-xrdp-sink.so
and module-xrdp-source.so
.
sudo dnf install autoconf automake make libtool libtool-ltdl-devel pulseaudio-libs-devel git
git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
cd pulseaudio-module-xrdp
./bootstrap && ./configure PULSE_DIR=$PULSE_DIR
make
See the README for installation instructions.
You can clean up the build machine completely if required:-
- Undo the last DNF installation action (installing the build packages) with
dnf history undo last
- Use
mock --clean
to remove themock
chroot - Delete the
xrdp-tmp
directory - Remove the user from the
mock
group - Remove the
mock
RPM.