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.

160 lines
5.0 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 / 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. ## CentOS 7.x (7.5 or later requires this build procedure)
  50. ### Prerequisites
  51. Some build tools and package development tools are required. Make sure install
  52. the tools.
  53. yum groupinstall "Development Tools"
  54. yum install rpmdevtools yum-utils
  55. rpmdev-setuptree
  56. ### Prepare & build
  57. Install pulseaudio and requisite packages to build pulseaudio.
  58. yum install pulseaudio pulseaudio-libs pulseaudio-libs-devel
  59. yum-builddep pulseaudio
  60. Fetch the pulseaudio source and extract. You'll see `~/rpmbuild/BUILD/
  61. yumdownloader --source pulseaudio
  62. rpm --install pulseaudio*.src.rpm
  63. Build the pulseaudio source. In this phase, pulseaudio is not necessarily needed to be built but
  64. configured however there's no way to do only configure.
  65. rpmbuild -bb --noclean ~/rpmbuild/SPECS/pulseaudio.spec
  66. Finally, let's build xrdp source / sink modules. You'll have two .so files
  67. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  68. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  69. cd pulseaudio-module-xrdp
  70. ./bootstrap && ./configure PULSE_DIR=~/rpmbuild/BUILD/pulseaudio-10.0
  71. make
  72. ## Other distro
  73. First off, find out your pulseaudio version using `pulseaudio --version`
  74. command. Download the tarball of the pulseaudio version that you have.
  75. * https://freedesktop.org/software/pulseaudio/releases/
  76. After downloading the tarball, extract the tarball and `cd` into the source
  77. directory, then run `./configure`.
  78. wget https://freedesktop.org/software/pulseaudio/releases/pulseaudio-11.1.tar.xz
  79. tar xf pulseaudio-11.1.tar.xz
  80. cd pulseaudio-11.1
  81. ./configure
  82. If additional packages are required to run `./configure`, install requisite
  83. packages depending on your environment.
  84. Finally, let's build xrdp source / sink modules. You'll have two .so files
  85. `module-xrdp-sink.so` and `module-xrdp-source.so`.
  86. git clone https://github.com/neutrinolabs/pulseaudio-module-xrdp.git
  87. cd pulseaudio-module-xrdp
  88. ./bootstrap && ./configure PULSE_DIR=/path/to/pulseaudio-11.1
  89. make
  90. # Install
  91. Just `make install` should install built modules to the correct directory.
  92. You can confirm if the modules properly installed by following command:
  93. ```
  94. ls $(pkg-config --variable=modlibexecdir libpulse)
  95. ```
  96. If you can see lots of `module-*.so` and `module-xrdp-sink.so`,
  97. `module-xrdp-source.so`, PulseAudio modules should be properly built and
  98. installed.
  99. `module-xrdp-sink.la` and `module-xrdp-source.so` may be installed to the
  100. target directory, these files are not necessary and you can remove them safely.
  101. Enjoy!
  102. # See if it works
  103. To see if it works, run `pavumeter` in the xrdp session. Playback any YouTube
  104. video in Firefox. You'll see "Showing signal levels of **xrdp sink**" and
  105. volume meter moving.