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.

121 lines
3.7 KiB

  1. [![Build Status](https://travis-ci.org/neutrinolabs/pulseaudio-module-xrdp.svg?branch=travis)](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 / Ubuntu
  28. This instruction also should be applicable to the Ubuntu family.
  29. ### Prerequisites
  30. Some build tools and package development tools are required. Make sure install
  31. the tools.
  32. apt install build-essential dpkg-dev
  33. ### Prepare & build
  34. Install pulseaudio and requisite packages to build pulseaudio.
  35. apt install pulseaudio
  36. apt build-dep pulseaudio
  37. Fetch the pulseaudio source. You'll see `pulseaudio-11.1` directory in your
  38. current directory.
  39. apt source pulseaudio
  40. Enter into the directory and build the pulseaudio package.
  41. cd pulseaudio-11.1
  42. ./configure
  43. Finally, let's build xrdp source / sink modules. You'll have two .so files
  44. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  45. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  46. cd pulseaudio-module-xrdp
  47. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  48. make
  49. ## Other distro
  50. First off, find out your pulseaudio version using `pulseaudio --version`
  51. command. Download the tarball of the pulseaudio version that you have.
  52. * https://freedesktop.org/software/pulseaudio/releases/
  53. After downloading the tarball, extract the tarball and `cd` into the source
  54. directory, then run `./configure`.
  55. wget https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.xz
  56. tar xf pulseaudio-11.1.tar.xz
  57. cd pulseaudio-11.1
  58. ./configure
  59. If additional packages are required to run `./configure`, install requisite
  60. packages depending on your environment.
  61. Finally, let's build xrdp source / sink modules. You'll have two .so files
  62. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  63. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  64. cd pulseaudio-module-xrdp
  65. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  66. make
  67. # Install
  68. Just `make install` should install built modules to the correct directory.
  69. You can confirm if the modules properly installed by following command:
  70. ```
  71. ls $(pkg-config --variable=modlibexecdir libpulse)
  72. ```
  73. If you can see lots of `module-*.so` and `module-xrdp-sink.so`,
  74. `module-xrdp-source.so`, PulseAudio modules should be properly built and
  75. installed.
  76. Enjoy!
  77. # See if it works
  78. To see if it works, run `pavumeter` in the xrdp session. Playback any YouTube
  79. video in Firefox. You'll see "Showing signal levels of **xrdp sink**" and
  80. volume meter moving.