You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
6.2 KiB

  1. [![Build Status](https://travis-ci.org/neutrinolabs/pulseaudio-module-xrdp.svg?branch=devel)](https://travis-ci.org/neutrinolabs/pulseaudio-module-xrdp)
  2. The latest version of this document can be found at wiki.
  3. * https://github.com/neutrinolabs/pulseaudio-module-xrdp/wiki/README
  4. # Overview
  5. xrdp implements Audio Output redirection using PulseAudio, which is a sound
  6. system used on POSIX operating systems.
  7. The server to client audio redirection is implemented as per **Remote Desktop
  8. Protocol: Audio Output Virtual Channel Extension
  9. [[MS-RDPEA]](https://msdn.microsoft.com/en-us/library/cc240933.aspx)** specs,
  10. which means it is interoperable with any RDP client which implements it
  11. (most of them including: MS RDP clients, FreeRDP).
  12. However, our Microphone redirection (client to server) implementation is
  13. proprietary and doesn't implement the
  14. [[MS-RDPEAI]](https://msdn.microsoft.com/en-us/library/dd342521.aspx)
  15. specs. Its only supported by the following clients so far: NeutrinoRDP client
  16. and rdesktop.
  17. Here is how to build pulseaudio modules for your distro, so you can have audio
  18. support through xrdp.
  19. In this instruction, pulseaudio version is **11.1**. You need to **replace the
  20. version number in this instruction** if your environment has different
  21. versions. You can find out your pulseaudio version executing the following
  22. command:
  23. pulseaudio --version
  24. or
  25. pkg-config --modversion libpulse
  26. # How to build
  27. ## Debian 9
  28. ### Prerequisites
  29. Some build tools and package development tools are required. Make sure install
  30. the tools.
  31. apt install build-essential dpkg-dev
  32. ### Prepare & build
  33. Install pulseaudio and requisite packages to build pulseaudio.
  34. apt install pulseaudio
  35. apt build-dep pulseaudio
  36. Fetch the pulseaudio source. You'll see `pulseaudio-11.1` directory in your
  37. current directory.
  38. apt source pulseaudio
  39. Enter into the directory and build the pulseaudio package.
  40. cd pulseaudio-11.1
  41. ./configure
  42. Finally, let's build xrdp source / sink modules. You'll have two .so files
  43. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  44. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  45. cd pulseaudio-module-xrdp
  46. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  47. make
  48. ## Ubuntu 18.04 family
  49. ### Prerequisites
  50. Some build tools and package development tools are required. Make sure install
  51. the tools.
  52. i```
  53. sudo -s
  54. apt install build-essential dpkg-dev xrdp-pulseaudio-installer
  55. ```
  56. ### Prepare & build
  57. Install pulseaudio and requisite packages to build pulseaudio.
  58. apt install pulseaudio
  59. apt build-dep pulseaudio
  60. Fetch the pulseaudio source. You'll see `pulseaudio-11.1` directory in your
  61. current directory.
  62. apt source pulseaudio
  63. Enter into the directory and build the pulseaudio package.
  64. cd pulseaudio-11.1
  65. ./configure
  66. apt install libpulse-dev
  67. Finally, let's build xrdp source / sink modules. You'll have two .so files
  68. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  69. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  70. cd pulseaudio-module-xrdp
  71. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  72. make
  73. ## CentOS 7.x (7.5 or later requires this build procedure)
  74. ### Prerequisites
  75. Some build tools and package development tools are required. Make sure install
  76. the tools.
  77. yum groupinstall "Development Tools"
  78. yum install rpmdevtools yum-utils
  79. rpmdev-setuptree
  80. ### Prepare & build
  81. Install pulseaudio and requisite packages to build pulseaudio.
  82. yum install pulseaudio pulseaudio-libs pulseaudio-libs-devel
  83. yum-builddep pulseaudio
  84. Fetch the pulseaudio source and extract. You'll see `~/rpmbuild/BUILD/
  85. yumdownloader --source pulseaudio
  86. rpm --install pulseaudio*.src.rpm
  87. Build the pulseaudio source. In this phase, pulseaudio is not necessarily needed to be built but
  88. configured however there's no way to do only configure.
  89. rpmbuild -bb --noclean ~/rpmbuild/SPECS/pulseaudio.spec
  90. Finally, let's build xrdp source / sink modules. You'll have two .so files
  91. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  92. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  93. cd pulseaudio-module-xrdp
  94. ./bootstrap && ./configure PULSE_DIR=~/rpmbuild/BUILD/pulseaudio-10.0
  95. make
  96. ## Other distro
  97. First off, find out your pulseaudio version using `pulseaudio --version`
  98. command. Download the tarball of the pulseaudio version that you have.
  99. * https://freedesktop.org/software/pulseaudio/releases/
  100. After downloading the tarball, extract the tarball and `cd` into the source
  101. directory, then run `./configure`.
  102. wget https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.xz
  103. tar xf pulseaudio-11.1.tar.xz
  104. cd pulseaudio-11.1
  105. ./configure
  106. If additional packages are required to run `./configure`, install requisite
  107. packages depending on your environment.
  108. Finally, let's build xrdp source / sink modules. You'll have two .so files
  109. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  110. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  111. cd pulseaudio-module-xrdp
  112. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  113. make
  114. # Install
  115. ## Ubuntu 18.04 family
  116. ```
  117. make install
  118. cd $(pkg-config --variable=modlibexecdir libpulse)
  119. chmod 644 module-xrdp-s*
  120. cp -a module-xrdp-s* /var/lib/xrdp-pulseaudio-installer/
  121. reboot
  122. ```
  123. `module-xrdp-sink.la` and `module-xrdp-source.la` may be installed to the
  124. target directory, these files are not necessary and you can remove them safely.
  125. Enjoy!
  126. ## Other distro
  127. Just `make install` should install built modules to the correct directory.
  128. You can confirm if the modules properly installed by following command:
  129. ```
  130. ls $(pkg-config --variable=modlibexecdir libpulse)
  131. ```
  132. If you can see lots of `module-*.so` and `module-xrdp-sink.so`,
  133. `module-xrdp-source.so`, PulseAudio modules should be properly built and
  134. installed.
  135. `module-xrdp-sink.la` and `module-xrdp-source.la` may be installed to the
  136. target directory, these files are not necessary and you can remove them safely.
  137. Enjoy!
  138. # See if it works
  139. To see if it works, run `pavumeter` in the xrdp session. Playback any YouTube
  140. video in Firefox. You'll see "Showing signal levels of **xrdp sink**" and
  141. volume meter moving.