Ubuntu 14.04。我将 PulseAudio 作为守护程序运行,并配置为进行流式传输。在/etc/pulse/default.pa
我添加了以下内容以接受 TCP 连接:
load-module module-native-protocol-tcp auth-ip-acl=192.168.1.0/24 auth-anonymous=1
Guacamole 的 VNC 支持通过与 PulseAudio 服务器的连接来获取音频。请参阅有关鳄梨酱音频支持的相关文章(通过 PulseAudio)。尽管在/etc/guacamole/user-mapping.xml
. 例如:
<!-- First user -->
<authorize username="user1" password="abcd">
<connection name="vnc">
<protocol>vnc</protocol>
<param name="hostname">localhost</param>
<param name="port">5903</param>
<param name="password">abcd</param>
<param name="enable-audio">true</param>
<param name="audio-servername">localhost</param>
</connection>
</authorize>
<!-- Second user -->
<authorize username="user2" password="abcd">
<!-- First authorized connection -->
<connection name="vnc">
<protocol>vnc</protocol>
<param name="hostname">localhost</param>
<param name="port">5904</param>
<param name="password">abcd</param>
<param name="enable-audio">true</param>
<param name="audio-servername">localhost</param>
</connection>
</authorize>
PulseAudio 正在接受端口 4713 上的连接。
$ netstat -ln | grep 4713
tcp 0 0 0.0.0.0:4713 0.0.0.0:* LISTEN
tcp6 0 0 :::4713 :::* LISTEN
PulseAudio 是否处理多个 Guacamole VNC 用户?
由于 Guacamole 记录到 /var/log/syslog,我已经隔离了两个连接实例的日志。这些是日志。
第一个连接是一个叫 guacamole_guest 的用户,它没有声音。
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Protocol "vnc" selected
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Connection ID is "$299e5678-59de-4dbd-9408-ad256785f732"
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: VNC server supports protocol version 3.8 (viewer 3.8)
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: We have 2 security types to read
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: 0) Received security type 2
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Selecting security type 2 (0/2 in the list)
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: 1) Received security type 16
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Selected Security Scheme 2
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: VNC authentication succeeded
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Desktop name "guacamole_guest's X desktop (lubuntu-ThinkCentre-M58p:3)"
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Connected to VNC server, using protocol version 3.8
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: VNC server default format:
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: 32 bits per pixel.
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Least significant byte first in each pixel.
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: TRUE colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Audio will be encoded as audio/ogg
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Starting audio stream
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Connecting to PulseAudio...
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Starting client
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Authorizing PulseAudio connection...
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Sending client name...
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: PulseAudio now ready
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Will use default sink: "auto_null"
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: Starting streaming from "Dummy Output"
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: PulseAudio stream being created...
Oct 23 02:31:23 lubuntu-ThinkCentre-M58p guacd[18848]: PulseAudio stream now ready
Oct 23 02:31:33 lubuntu-ThinkCentre-M58p guacd[18848]: Client disconnected
Oct 23 02:31:33 lubuntu-ThinkCentre-M58p guacd[18848]: Audio stream finished
Oct 23 02:31:33 lubuntu-ThinkCentre-M58p kernel: [1207939.582306] guacd[18848]: segfault at 67452305 ip b6b7ce15 sp bfd99cc0 error 4 in libguac-client-vnc.so.0.0.0[b6b73000+e000]
第二个用户称为 lubuntu。它有声音。
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Protocol "vnc" selected
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Connection ID is "$6344d2fb-c5fe-4073-82d7-88dea358b8f6"
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: VNC server supports protocol version 3.8 (viewer 3.8)
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: We have 2 security types to read
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: 0) Received security type 2
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Selecting security type 2 (0/2 in the list)
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: 1) Received security type 16
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Selected Security Scheme 2
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: VNC authentication succeeded
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Desktop name "lubuntu's X desktop (lubuntu-ThinkCentre-M58p:2)"
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Connected to VNC server, using protocol version 3.8
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: VNC server default format:
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: 32 bits per pixel.
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Least significant byte first in each pixel.
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: TRUE colour: max red 255 green 255 blue 255, shift red 16 green 8 blue 0
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Audio will be encoded as audio/ogg
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Starting audio stream
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Connecting to PulseAudio...
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Authorizing PulseAudio connection...
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Sending client name...
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Starting client
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: PulseAudio now ready
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Will use default sink: "auto_null"
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: Starting streaming from "Dummy Output"
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: PulseAudio stream being created...
Oct 23 02:31:37 lubuntu-ThinkCentre-M58p guacd[18871]: PulseAudio stream now ready
Oct 23 02:31:43 lubuntu-ThinkCentre-M58p guacd[18871]: Client disconnected
Oct 23 02:31:43 lubuntu-ThinkCentre-M58p guacd[18871]: Audio stream finished
Oct 23 02:31:43 lubuntu-ThinkCentre-M58p kernel: [1207949.566374] guacd[18871]: segfault at 67452305 ip b6b7ce15 sp bfd99cc0 error 4 in libguac-client-vnc.so.0.0.0[b6b73000+e000]
从表面上看,它们看起来一样。不知道从哪里开始。段错误看起来不太好,但在这两种情况下都会发生。