You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by brian mullan <bm...@gmail.com> on 2018/09/07 13:48:24 UTC

Fwd: ubuntu 18.04 w guacd, pulseaudio, xrdp, pavucontrol shows xrdp audio output but no sound locally

I have a cloud server with

ubuntu 18.04
guacamole v0.9.14 installed
pulseaudio 11.1
latest xrdp, xorgxrdp and the 2 pulseaudio .so files built & installed for
xrdp pulseaudio connectivity.

Before trying to login to the remote desktop using  Chrome & Guacamole I
tested just logging in directly using xfreerdp on my local machine:

xfreerdp /cert-ignore /u:bmullan /p:xxxxxxxx /sound:sys:alsa
/v:X.X.X.X:3389

and Audio *DOES* work !

So next I used Chrome to log into the remote Ubuntu Desktop with
Guacamole.  Login works ok and I execute pavucontrol on the cloud server so
I can see if audio is playing

I then execute:
$ aplay /usr/share/sounds/alsa/*

and although pavucontrol does show audio output from xrdp from the aplay
guacamole is not playing that audio on my local chrome (or firefox) browser.

I've attached a short screen capture video showing this.

And although Nick's comment in this thread
<http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/adding-audio-support-for-vnc-connections-td3494.html>

was about Guacamole's VNC & I am using Guacamole's RDP w/xrdp on the
Ubuntu... I was more interested in "how" guacd comsumes the remote audio
and gets it back to the local client machine running the Browser that
connects to it.

Okay, a couple of points of clarification, here.  First, the changes made
> to the default.pa file and (re)starting the PulseAudio service only need
> to be done on the *VNC Server*, not on the system running guacd (unless
> those two happen to be the same system, which I gather is *not* the case in
> your setup).  So, make those changes on the VNC server and restart the
> PulseAudio service, there.  Also, as far as the 0.0.0.0/0, you don't need
> that to allow all Guacamole clients to have audio - you only need to allow
> the system that's running guacd in that ACL.  *Basically, PulseAudio
> needs to be accessible by the system running guacd, and then the Guacamole
> protocol (between Tomcat and guacd) takes care of encapsulating all of the
> audio and video for a connection - so guacd converts from PulseAudio to
> Guacamole and back, sending it over to the Guacamole Client, which then
> sends it to your browser.*
>
> On the system running guacd, you really only need to make sure that guacd
> is compiled with PulseAudio support - so, depending on your Linux
> distribution, make sure the pulseaudio development packages are installed,
> and then ./configure guacd and make sure it specifies that PulseAudio is
> enabled, compile, and (re)install.
>

Per the above comment I made sure my cloud server login's .profile
contained:

export PULSE_SERVER="127.0.0.1"

and I modified /etc/pulse/default.pa to contain:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1
auth-anonymous=1

I suspected perhaps xrdp's capture of pulseaudio  via its own sink/source
modules:
/var/lib/xrdp-pulseaudio-installer/module-xrdp-sink.so
/var/lib/xrdp-pulseaudio-installer/module-xrdp-source.so

So I first commented out /etc/xrdp/sesman.ini's config command which
executes its own xrdp pulseauidio default.pa and then removed the above 2
modules and rebooted

Again, pavucontrol shows audio when I execute aplay but again I do *NOT*
hear audio locally on my client machine?

So my questions are:

When using xrdp, where it too captures audio via its loading its own
modules and the pavucontrol shows it outputting audio successfully I am
guessing xrdp is sending the audio via rdpsnd, what might be causing Guacd
to fail encapsulating the audio and returning it to the local client
browser ?

Also, why if I remove xrdp's pulseaudio modules and xrdp's own default.pa
and just use the /etc/pulseaudio/default.pa & reboot do I still *NOT* hear
audio locally via my Browser & Guacamole ?

thanks or any ideas/suggestions etc

Brian

Re: ubuntu 18.04 w guacd, pulseaudio, xrdp, pavucontrol shows xrdp audio output but no sound locally

Posted by brian mullan <bm...@gmail.com>.
Nick
I figured out what was wrong.

I have had my own script for quite awhile that installed guacamole, nginx,
tomcat, freerdp & xrdp automatically and in MY script I had the following
commands:

# Add links for FreeRDP depending on architecture

*mkdir /usr/lib/x86_64-linux-gnu/freerdp/ln -s
/usr/local/lib/freerdp/guac*.so /usr/lib/x86_64-linux-gnu/freerdp/*

However, for the last couple weeks I was helping someone else out with some
fixes for their script (https://github.com/MysticRyuujin/guac-install)
I just realized that his script does not fully install all the RDP support
and thus did not have the above commands to link the guac .so to the
freerdp.

I just did the above manually and it seems to work now.

Jeez I'd forgotten I'd used his script to install guacamole on this cloud
server and kept wondering why things were broken ...

Thanks gain tho' as your comment was what made me look and realize this.

Brian



On Fri, Sep 7, 2018 at 3:38 PM brian mullan <bm...@gmail.com> wrote:

> Thanks Nick !!
>
> I don't have any Windows machines to try this with but as to your second
> suggestion:
>
> Did you correctly link the Guacamole RDP plugins to the FreeRDP lib
>> directory?  These are the .so files in the lib/freerdp directory where
>> guacd is installed - in some cases those need to be linked into
>> /usr/lib64/freerdp (RHEL/CentOS) or /usr/lib/freerdp, etc.
>>
>
> I'll have to start the cloud server up again and check.
>
> Thanks for the ideas though as I was getting at a loss for what else might
> be causing the problem.
>
> Brian
>
> On Fri, Sep 7, 2018 at 2:28 PM Nick Couchman <vn...@apache.org> wrote:
>
>> On Fri, Sep 7, 2018 at 9:49 AM brian mullan <bm...@gmail.com>
>> wrote:
>>
>>> I have a cloud server with
>>>
>>> ubuntu 18.04
>>> guacamole v0.9.14 installed
>>> pulseaudio 11.1
>>> latest xrdp, xorgxrdp and the 2 pulseaudio .so files built & installed
>>> for xrdp pulseaudio connectivity.
>>>
>>> Before trying to login to the remote desktop using  Chrome & Guacamole I
>>> tested just logging in directly using xfreerdp on my local machine:
>>>
>>> xfreerdp /cert-ignore /u:bmullan /p:xxxxxxxx /sound:sys:alsa
>>> /v:X.X.X.X:3389
>>>
>>> and Audio *DOES* work !
>>>
>>> So next I used Chrome to log into the remote Ubuntu Desktop with
>>> Guacamole.  Login works ok and I execute pavucontrol on the cloud server so
>>> I can see if audio is playing
>>>
>>> I then execute:
>>> $ aplay /usr/share/sounds/alsa/*
>>>
>>> and although pavucontrol does show audio output from xrdp from the aplay
>>> guacamole is not playing that audio on my local chrome (or firefox) browser.
>>>
>>> I've attached a short screen capture video showing this.
>>>
>>> And although Nick's comment in this thread
>>> <http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/adding-audio-support-for-vnc-connections-td3494.html>
>>>
>>> was about Guacamole's VNC & I am using Guacamole's RDP w/xrdp on the
>>> Ubuntu... I was more interested in "how" guacd comsumes the remote audio
>>> and gets it back to the local client machine running the Browser that
>>> connects to it.
>>>
>>
>> The methods used for audio playback are very different between the
>> protocols.  VNC does not have any built-in audio support, which is why this
>> method of modifying PulseAudio and forwarding through that exists.  So, for
>> VNC connections, guacd sets up a separate link to the PulseAudio daemon
>> running on the VNC server and then takes care of translating the VNC +
>> PulseAudio streams into the Guacamole protocol, which is then redirected to
>> the browser.
>>
>> When using the RDP protocol with Guacamole, no such link to PulseAudio
>> exists - this is because RDP already includes the ability to forward audio
>> as part of the protocol, and so guacd is able to pick up the audio from the
>> RDP stream and there's no need to work around the lack of support as in the
>> VNC protocol.
>>
>> The fact that you can hear the audio when connecting with xfreerdp means
>> that xrdp is correctly passing audio through the RDP protocol to the
>> client, so you just need to figure out why guacd isn't picking it up.  I
>> have a couple of initial things for you to try/verify:
>> - Does audio work through Guacamole when you connect to a Windows server,
>> but not to the Linux server (xrdp)?
>> - Did you correctly link the Guacamole RDP plugins to the FreeRDP lib
>> directory?  These are the .so files in the lib/freerdp directory where
>> guacd is installed - in some cases those need to be linked into
>> /usr/lib64/freerdp (RHEL/CentOS) or /usr/lib/freerdp, etc.
>>
>> -Nick
>>
>>>

Re: ubuntu 18.04 w guacd, pulseaudio, xrdp, pavucontrol shows xrdp audio output but no sound locally

Posted by brian mullan <bm...@gmail.com>.
Thanks Nick !!

I don't have any Windows machines to try this with but as to your second
suggestion:

Did you correctly link the Guacamole RDP plugins to the FreeRDP lib
> directory?  These are the .so files in the lib/freerdp directory where
> guacd is installed - in some cases those need to be linked into
> /usr/lib64/freerdp (RHEL/CentOS) or /usr/lib/freerdp, etc.
>

I'll have to start the cloud server up again and check.

Thanks for the ideas though as I was getting at a loss for what else might
be causing the problem.

Brian

On Fri, Sep 7, 2018 at 2:28 PM Nick Couchman <vn...@apache.org> wrote:

> On Fri, Sep 7, 2018 at 9:49 AM brian mullan <bm...@gmail.com>
> wrote:
>
>> I have a cloud server with
>>
>> ubuntu 18.04
>> guacamole v0.9.14 installed
>> pulseaudio 11.1
>> latest xrdp, xorgxrdp and the 2 pulseaudio .so files built & installed
>> for xrdp pulseaudio connectivity.
>>
>> Before trying to login to the remote desktop using  Chrome & Guacamole I
>> tested just logging in directly using xfreerdp on my local machine:
>>
>> xfreerdp /cert-ignore /u:bmullan /p:xxxxxxxx /sound:sys:alsa
>> /v:X.X.X.X:3389
>>
>> and Audio *DOES* work !
>>
>> So next I used Chrome to log into the remote Ubuntu Desktop with
>> Guacamole.  Login works ok and I execute pavucontrol on the cloud server so
>> I can see if audio is playing
>>
>> I then execute:
>> $ aplay /usr/share/sounds/alsa/*
>>
>> and although pavucontrol does show audio output from xrdp from the aplay
>> guacamole is not playing that audio on my local chrome (or firefox) browser.
>>
>> I've attached a short screen capture video showing this.
>>
>> And although Nick's comment in this thread
>> <http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/adding-audio-support-for-vnc-connections-td3494.html>
>>
>> was about Guacamole's VNC & I am using Guacamole's RDP w/xrdp on the
>> Ubuntu... I was more interested in "how" guacd comsumes the remote audio
>> and gets it back to the local client machine running the Browser that
>> connects to it.
>>
>
> The methods used for audio playback are very different between the
> protocols.  VNC does not have any built-in audio support, which is why this
> method of modifying PulseAudio and forwarding through that exists.  So, for
> VNC connections, guacd sets up a separate link to the PulseAudio daemon
> running on the VNC server and then takes care of translating the VNC +
> PulseAudio streams into the Guacamole protocol, which is then redirected to
> the browser.
>
> When using the RDP protocol with Guacamole, no such link to PulseAudio
> exists - this is because RDP already includes the ability to forward audio
> as part of the protocol, and so guacd is able to pick up the audio from the
> RDP stream and there's no need to work around the lack of support as in the
> VNC protocol.
>
> The fact that you can hear the audio when connecting with xfreerdp means
> that xrdp is correctly passing audio through the RDP protocol to the
> client, so you just need to figure out why guacd isn't picking it up.  I
> have a couple of initial things for you to try/verify:
> - Does audio work through Guacamole when you connect to a Windows server,
> but not to the Linux server (xrdp)?
> - Did you correctly link the Guacamole RDP plugins to the FreeRDP lib
> directory?  These are the .so files in the lib/freerdp directory where
> guacd is installed - in some cases those need to be linked into
> /usr/lib64/freerdp (RHEL/CentOS) or /usr/lib/freerdp, etc.
>
> -Nick
>
>>

Re: ubuntu 18.04 w guacd, pulseaudio, xrdp, pavucontrol shows xrdp audio output but no sound locally

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Sep 7, 2018 at 9:49 AM brian mullan <bm...@gmail.com> wrote:

> I have a cloud server with
>
> ubuntu 18.04
> guacamole v0.9.14 installed
> pulseaudio 11.1
> latest xrdp, xorgxrdp and the 2 pulseaudio .so files built & installed for
> xrdp pulseaudio connectivity.
>
> Before trying to login to the remote desktop using  Chrome & Guacamole I
> tested just logging in directly using xfreerdp on my local machine:
>
> xfreerdp /cert-ignore /u:bmullan /p:xxxxxxxx /sound:sys:alsa
> /v:X.X.X.X:3389
>
> and Audio *DOES* work !
>
> So next I used Chrome to log into the remote Ubuntu Desktop with
> Guacamole.  Login works ok and I execute pavucontrol on the cloud server so
> I can see if audio is playing
>
> I then execute:
> $ aplay /usr/share/sounds/alsa/*
>
> and although pavucontrol does show audio output from xrdp from the aplay
> guacamole is not playing that audio on my local chrome (or firefox) browser.
>
> I've attached a short screen capture video showing this.
>
> And although Nick's comment in this thread
> <http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/adding-audio-support-for-vnc-connections-td3494.html>
>
> was about Guacamole's VNC & I am using Guacamole's RDP w/xrdp on the
> Ubuntu... I was more interested in "how" guacd comsumes the remote audio
> and gets it back to the local client machine running the Browser that
> connects to it.
>

The methods used for audio playback are very different between the
protocols.  VNC does not have any built-in audio support, which is why this
method of modifying PulseAudio and forwarding through that exists.  So, for
VNC connections, guacd sets up a separate link to the PulseAudio daemon
running on the VNC server and then takes care of translating the VNC +
PulseAudio streams into the Guacamole protocol, which is then redirected to
the browser.

When using the RDP protocol with Guacamole, no such link to PulseAudio
exists - this is because RDP already includes the ability to forward audio
as part of the protocol, and so guacd is able to pick up the audio from the
RDP stream and there's no need to work around the lack of support as in the
VNC protocol.

The fact that you can hear the audio when connecting with xfreerdp means
that xrdp is correctly passing audio through the RDP protocol to the
client, so you just need to figure out why guacd isn't picking it up.  I
have a couple of initial things for you to try/verify:
- Does audio work through Guacamole when you connect to a Windows server,
but not to the Linux server (xrdp)?
- Did you correctly link the Guacamole RDP plugins to the FreeRDP lib
directory?  These are the .so files in the lib/freerdp directory where
guacd is installed - in some cases those need to be linked into
/usr/lib64/freerdp (RHEL/CentOS) or /usr/lib/freerdp, etc.

-Nick

>