pulseaudio build on Debian or Ubuntu - matt335672/xrdp GitHub Wiki

Introduction

Building the pulseaudio modules is a two-stage process:-

  1. Extract internal development files from the pulseaudio server build
  2. Build the xrdp pulseaudio modules using the files obtained from stage 1

Step 1 is a complicated process. For Debian/Ubuntu however, some convenience scripts have been provided to make this process much simpler.

The internal files obtained from step 1 are OS-version specific. If your version of pulseaudio is changed during a significant upgrade, you may need to re-run the entire process.

Convenience scripts

By default, running either of these scripts results in the pulseaudio development files being written to ~/pulseaudio.src.

scripts/install_pulseaudio_sources_apt.sh

This is a low-level script which gets hold of the required pulseaudio development files by installing the pulseaudio server and configuring it

The script installs all the pulseaudio build dependencies on the source machine.

Use this script if you are a pulseaudio developer, or want to get hold of the required files as quickly as possible.

scripts/install_pulseaudio_sources_apt_wrapper.sh

This is a higher-level script which calls install_pulseaudio_sources_apt.sh in a way which makes it possible to remove all the dependencies when the build has finished.

This process is much slower than calling install_pulseaudio_sources_apt.sh, particularly on machines using older hard drive technology. However, it doesn't pollute the hard drive with dependencies you may never need again.

In general, this is the script to use. This document assumes you are using this script.

Build process

Prerequisites

The user you are using must have sudo access.

Some build tools and package development tools are required to build the pulseaudio module itself. Make sure these tools are installed:-

sudo apt install build-essential dpkg-dev libpulse-dev git

Obtaining the pulseaudio module

git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
cd pulseaudio-module-xrdp

Getting the internal pulseaudio development files

Run the required convenience script. As this uses sudo, you may be prompted once or twice for your password:-

   $ scripts/install_pulseaudio_sources_apt_wrapper.sh 
   - Creating bionic build root. Log file in /var/tmp/pa-build-mjb-debootstrap.log
   [sudo] password for xuser: <enter password>
   - Creating schroot config file /etc/schroot/chroot.d/pa-build-xuser.conf
   - Copying /etc/apt/sources.list to the root
   - Copying the wrapped script to the root
   - Building PA sources. Log file in /var/tmp/pa-build-xuser-schroot.log
   - Removing schroot config file and build root
   - All done. Configure PA xrdp module with PULSE_DIR=/home/xuser/pulseaudio.src
   

Build the xrdp pulseaudio module

./bootstrap && ./configure PULSE_DIR=~/pulseaudio.src
make
⚠️ **GitHub.com Fallback** ⚠️