diff --git a/README.md b/README.md index 2901fff..34a994f 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,43 @@ The latest version of this document can be found at wiki. -* https://github.com/neutrinolabs/xrdp/wiki/How-to-set-up-audio-redirection +* https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README # Overview -xrdp supports audio redirection using PulseAudio, which is a sound system for -POSIX operating systems. Server to client redirection is compliant to Remote -Desktop Procol standard [[MS-RDPEA]](https://msdn.microsoft.com/en-us/library/cc240933.aspx) -but client to server redirection implementation is proprietary. Accordingly, -server to client redirection is available with many of RDP clients including -Microsoft client but client to server redirection requires NeutrinoRDP client, -not available with other clients. +xrdp implements Audio Output redirection using PulseAudio, which is a sound +system used on POSIX operating systems. + +The server to client audio redirection is implemented as per **Remote Desktop +Protocol: Audio Output Virtual Channel Extension +[[MS-RDPEA]](https://msdn.microsoft.com/en-us/library/cc240933.aspx)** specs, +which means it is interoperable with any RDP client which implements it +(most of them including: MS RDP clients, FreeRDP). + +However, our Microphone redirection (client to server) implementation is +proprietary and doesn't implement the +[[MS-RDPEAI]](https://msdn.microsoft.com/en-us/library/dd342521.aspx) +specs. Its only supported by the following clients so far: NeutrinoRDP client +and rdesktop. Here is how to build pulseaudio modules for your distro, so you can have audio support through xrdp. -In this instruction, pulseaudio version is **11.1**. You need to **replace the version -number in this instruction** if your environment has different versions. You can find -out your pulseaudio version executing the following command: +In this instruction, pulseaudio version is **11.1**. You need to **replace the +version number in this instruction** if your environment has different +versions. You can find out your pulseaudio version executing the following +command: pulseaudio --version +or + + pkg-config --modversion libpulse + # How to build ## Debian 9 / Ubuntu -This instruction also should be applicable to Ubuntu family. +This instruction also should be applicable to the Ubuntu family. ### Prerequisites @@ -41,7 +53,7 @@ Install pulseaudio and requisite packages to build pulseaudio. apt install pulseaudio apt build-dep pulseaudio -Fetch the pulseaudio source . You'll see `pulseaudio-11.1` directory in your +Fetch the pulseaudio source. You'll see `pulseaudio-11.1` directory in your current directory. apt source pulseaudio @@ -51,12 +63,13 @@ Enter into the directory and build the pulseaudio package. cd pulseaudio-11.1 ./configure -Finally, let's build xrdp source / sink modukes. You'll have two .so files `module-xrdp-sink.so` and -`module-xrdp-source.so`. +Finally, let's build xrdp source / sink modules. You'll have two .so files +`module-xrdp-sink.so` and `module-xrdp-source.so`. - git clone https://github.com/neutrinolabs/pulseaudio-modules.git - cd pulseaudio-modules - make PULSE_DIR="~/pulseaudio-11.1" + git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git + cd pulseaudio-module-xrdp + ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1 + make ## Other distro @@ -65,45 +78,39 @@ command. Download the tarball of the pulseaudio version that you have. * https://freedesktop.org/software/pulseaudio/releases/ -After downloading the tarball, extact the tarball and `cd` into the source +After downloading the tarball, extract the tarball and `cd` into the source directory, then run `./configure`. wget https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.xz - tar xf pulseaudio-11.1.tar.gz + tar xf pulseaudio-11.1.tar.xz cd pulseaudio-11.1 ./configure If additional packages are required to run `./configure`, install requisite packages depending on your environment. -Finally, let's build xrdp source / sink modukes. You'll have two .so files `module-xrdp-sink.so` and -`module-xrdp-source.so`. +Finally, let's build xrdp source / sink modules. You'll have two .so files +`module-xrdp-sink.so` and `module-xrdp-source.so`. - git clone https://github.com/neutrinolabs/pulseaudio-modules.git - cd pulseaudio-modules - make PULSE_DIR="~/pulseaudio-11.1" + git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git + cd pulseaudio-module-xrdp + ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1 + make # Install -Install process is not distro specific except for install destination. Install -built two .so files into the pulseaudio modules directory. Typically, -`/usr/lib/pulse-11.1/modules` for Debian, `/usr/lib64/pulse-10.0/modules` for -CentOS 7. Other distro might have different path. Find out the right path and -version that matches your distro/system. - -Look into the directory with `ls` command. You'll see lots of `module-*.so` -files. There's the place! now `cd` to `pulseaudio-modules` directory and copy them. - - cd pulseaudio-modules - for f in *.so; do install -s -m 644 $f /usr/lib/pulse-11.1/modules; done - -This command is equivalent to following: +Just `make install` should install built modules to the correct directory. - install -s -m 644 module-xrdp-sink.so /usr/lib/pulse-11.1/modules - install -s -m 644 module-xrdp-source.so /usr/lib/pulse-11.1/modules +You can confirm if the modules properly installed by following command: +``` +ls $(pkg-config --variable=modlibexecdir libpulse) +``` -Well done! Pulseaudio modules should be properly built and installed. +If you can see lots of `module-*.so` and `module-xrdp-sink.so`, +`module-xrdp-source.so`, PulseAudio modules should be properly built and +installed. +Enjoy! # See if it works