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 2016/06/25 19:58:34 UTC
Guacamole and linux Pulseaudio
I've implemented a set of 6 scripts to install Guacamole w/NGINX, Tomcat8,
Mysql on Ubuntu 16.04 servers.
I also install Pulseaudio in the Host/Server and configure it (/etc/pulse/
default.pa) to load the Pulseaudio TCP module:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;10.0.3.0/24
auth-anonymous=1
On a server I also create multiple LXD containers each also running Ubuntu
16.04 (although they could be centos, debian, opensuse, fedora etc).
In each LXD container I install ubuntu-mate Desktop Environment and both
xrdp & x11rdp which I compiled to include pulseaudio 8 support since that's
what Ubuntu 16.04 uses.
I also add a statement to /etc/bash.bashrc
export PULSE_SERVER=10.0.3.1:4713
so that each User Account created in the Container inherits that
Environment variable which makes the Host/Server's Pulseaudio Server
available to the users of the LXD containers.
In Guacamole Web Proxy I create connections to each of the LXD containers
which all have 10.x.x.x network addresses and can access the Host/Server
via a 10.x.x.x bridge.
Each connection is configured with RDP and RDP security.
I create several test users also and give each use access to multiple LXD
container connections.
Logout of Guacamole & log back in as one of the "test" users and I can
connect to and log into Ubuntu-Mate desktop on any of the containers just
fine.
Running "pactl list modules" in any of the LXD containers shows the same
Pulseaudo "modules" loaded as the Host/Server.
However, audio/sound played in any of the LXD containers can't be heard.
example:
executing "aplay /usr/share/sounds/alsa/Front_Center.wav" in an LXD
container does show the .wav file playing but there is no sound heard via
my remote web browser.
Now my Question is this...
I *can* connect to the Host/Server's Guacamole Web Proxy via my HTML5 web
browser.
I select an RDP connection to one of the LXD container Desktops and *DO
connect* with the xrdp/x11rdp running in that Container *and DO* get the
Ubuntu-Mate desktop presented to me.
Audio/Sound *does appear* to "play" from that desktop but somewhere/somehow *it
is not picked up by my Guacamole HTML5 connection.*
How does Guacamole normally make the connection for audio in order to play
it back to the remote user over the HTML5 Browser?
I'm at a loss where between guacamole, pulseaudio, xrdp the audio
connection is not right?
Thanks for any insights.
FYI.. I am usually testing the scripts on either AWS or Digital Ocean cloud
servers.
Not sure if attachments work with this Mailer list but I'll add a picture
of what I'm doing anyway in case it does and it can help visualize what I
described.
Brian
Re: Guacamole and linux Pulseaudio
Posted by brian mullan <bm...@gmail.com>.
I had been planning to post my scripts to Github but was waiting until I'd
figured out the problem with audio in the LXD containers. I guess I'll go
ahead and post them anyway as maybe other's can help figure out what
xrdp/x11rdp's pulseaudio driver & pulseaudio in containers is.
note: although I didn't mention it in my question to the mail alias...
sound DOES work on the host & in the 2 LXD container's initially after
reboot of the cloud server(s).
However, once I log out of the Host rdp session the sound stops in the LXD
containers and also subsequent logins to the Host via RDP ... until I
reboot again? That's the problem that's been bugging me :-)
Brian
On Sun, Jun 26, 2016 at 8:17 AM, Clinton Tonge <
ctonge@northwindsolutions.com> wrote:
> Brian, I’m very interested to migrate my Guacamole setup to a new server
> with MySQL backend. Currently I have it running on a server doing double
> duty with my SCADA system, so it can’t live there forever. I’d love to get
> my hands on your scripts if you’re willing to share.
>
> Thanks!
> Clint.
>
> *Clinton Tonge*
> SCADA and Asset Performance
>
> Northwind Solutions
> 1315 North Service Road East, Suite 300
> Oakville, Ontario L6H 1A7
> O: 905.829.5757
> C: 519.835.1315
>
>
> www.northwindsolutions.com
>
> On Jun 25, 2016, at 11:16 PM, Mike Jumper <mi...@guac-dev.org>
> wrote:
>
> On Jun 25, 2016 8:03 PM, "brian mullan" <bm...@gmail.com> wrote:
> >
> > Thanks Mike for the response. I'm no wiz with RDP :-)
> >
> > Just understanding what you've described helps.
> >
> > So if I can make an RDP connection to one of the LXD containers & bring
> up the desktop OK... it should be the xrdp/x11rdp drivers in that Container
> that support that connection's job to pass the pulseaudio to RDPSND
> channel...
>
> Correct so far.
>
> > ... which should be directly sent back to the remote end-user's browser
> & played then locally because that RDPSND channel is part of the original
> browser connection to Guacamole?
> >
>
> Not quite. In spirit, yes, but:
>
> The Guacamole JavaScript client has no concept of RDP (or VNC ... or SSH
> ...). It speaks only the Guacamole protocol, which defines its own
> universal flavor of in-band audio streams.
>
> The RDP client piece that uses RDPSND sits behind guacd, as does the VNC
> client piece that uses out-of-band PulseAudio. Both of these components
> digest different protocols and different audio sources but ultimately
> produce the same type of output: Guacamole protocol with in-band audio
> streams. The only difference here is where that audio actually came from,
> but that is intentionally opaque to the client.
>
> - Mike
>
>
>
Re: Guacamole and linux Pulseaudio
Posted by Clinton Tonge <ct...@northwindsolutions.com>.
Brian, I’m very interested to migrate my Guacamole setup to a new server with MySQL backend. Currently I have it running on a server doing double duty with my SCADA system, so it can’t live there forever. I’d love to get my hands on your scripts if you’re willing to share.
Thanks!
Clint.
Clinton Tonge
SCADA and Asset Performance
Northwind Solutions
1315 North Service Road East, Suite 300
Oakville, Ontario L6H 1A7
O: 905.829.5757
C: 519.835.1315
[cid:image001.png@01D1AA16.4AC2D520]
www.northwindsolutions.com<http://www.northwindsolutions.com>
On Jun 25, 2016, at 11:16 PM, Mike Jumper <mi...@guac-dev.org>> wrote:
On Jun 25, 2016 8:03 PM, "brian mullan" <bm...@gmail.com>> wrote:
>
> Thanks Mike for the response. I'm no wiz with RDP :-)
>
> Just understanding what you've described helps.
>
> So if I can make an RDP connection to one of the LXD containers & bring up the desktop OK... it should be the xrdp/x11rdp drivers in that Container that support that connection's job to pass the pulseaudio to RDPSND channel...
Correct so far.
> ... which should be directly sent back to the remote end-user's browser & played then locally because that RDPSND channel is part of the original browser connection to Guacamole?
>
Not quite. In spirit, yes, but:
The Guacamole JavaScript client has no concept of RDP (or VNC ... or SSH ...). It speaks only the Guacamole protocol, which defines its own universal flavor of in-band audio streams.
The RDP client piece that uses RDPSND sits behind guacd, as does the VNC client piece that uses out-of-band PulseAudio. Both of these components digest different protocols and different audio sources but ultimately produce the same type of output: Guacamole protocol with in-band audio streams. The only difference here is where that audio actually came from, but that is intentionally opaque to the client.
- Mike
Re: Guacamole and linux Pulseaudio
Posted by Mike Jumper <mi...@guac-dev.org>.
On Jun 25, 2016 8:03 PM, "brian mullan" <bm...@gmail.com> wrote:
>
> Thanks Mike for the response. I'm no wiz with RDP :-)
>
> Just understanding what you've described helps.
>
> So if I can make an RDP connection to one of the LXD containers & bring
up the desktop OK... it should be the xrdp/x11rdp drivers in that Container
that support that connection's job to pass the pulseaudio to RDPSND
channel...
Correct so far.
> ... which should be directly sent back to the remote end-user's browser &
played then locally because that RDPSND channel is part of the original
browser connection to Guacamole?
>
Not quite. In spirit, yes, but:
The Guacamole JavaScript client has no concept of RDP (or VNC ... or SSH
...). It speaks only the Guacamole protocol, which defines its own
universal flavor of in-band audio streams.
The RDP client piece that uses RDPSND sits behind guacd, as does the VNC
client piece that uses out-of-band PulseAudio. Both of these components
digest different protocols and different audio sources but ultimately
produce the same type of output: Guacamole protocol with in-band audio
streams. The only difference here is where that audio actually came from,
but that is intentionally opaque to the client.
- Mike
Re: Guacamole and linux Pulseaudio
Posted by brian mullan <bm...@gmail.com>.
Thanks Mike for the response. I'm no wiz with RDP :-)
Just understanding what you've described helps.
So if I can make an RDP connection to one of the LXD containers & bring up
the desktop OK... it should be the xrdp/x11rdp drivers in that Container
that support that connection's job to pass the pulseaudio to RDPSND
channel... which should be directly sent back to the remote end-user's
browser & played then locally because that RDPSND channel is part of the
original browser connection to Guacamole?
Brian
On Sat, Jun 25, 2016 at 10:46 PM, Mike Jumper <mi...@guac-dev.org>
wrote:
> On Jun 25, 2016 12:59 PM, "brian mullan" <bm...@gmail.com> wrote:
> >
> > I've implemented a set of 6 scripts to install Guacamole w/NGINX,
> Tomcat8, Mysql on Ubuntu 16.04 servers.
> >
> > I also install Pulseaudio in the Host/Server and configure it
> (/etc/pulse/default.pa) to load the Pulseaudio TCP module:
> >
> > load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;
> 10.0.3.0/24 auth-anonymous=1
> >
> > ...
> >
> > Each connection is configured with RDP and RDP security.
> >
> > I create several test users also and give each use access to multiple
> LXD container connections.
> >
> > Logout of Guacamole & log back in as one of the "test" users and I can
> connect to and log into Ubuntu-Mate desktop on any of the containers just
> fine.
> >
> > Running "pactl list modules" in any of the LXD containers shows the
> same Pulseaudo "modules" loaded as the Host/Server.
> >
> > However, audio/sound played in any of the LXD containers can't be heard.
> >
>
> Hi Brian,
>
> Guacamole does not use PulseAudio for grabbing the audio of an RDP
> connection. It supports PulseAudio for VNC connections because VNC
> otherwise lacks its own standard support for audio, but with RDP the
> "RDPSND" channel will be used.
>
> If you wish to use RDP, then the next step would be to determine why your
> RDP server is not providing audio via RDPSND. Though XRDP may well use
> PulseAudio behind the scenes, the RDP client (in this case: Guacamole) need
> not be aware of this; the RDP-facing side of this audio should be standard
> RDPSND.
>
> Alternatively, if you are OK with using a VNC server instead of RDP, you
> could do so and then use PulseAudio as you were originally expecting.
>
> Thanks,
>
> - Mike
>
Re: Guacamole and linux Pulseaudio
Posted by Mike Jumper <mi...@guac-dev.org>.
On Jun 25, 2016 12:59 PM, "brian mullan" <bm...@gmail.com> wrote:
>
> I've implemented a set of 6 scripts to install Guacamole w/NGINX,
Tomcat8, Mysql on Ubuntu 16.04 servers.
>
> I also install Pulseaudio in the Host/Server and configure it (/etc/pulse/
default.pa) to load the Pulseaudio TCP module:
>
> load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;
10.0.3.0/24 auth-anonymous=1
>
> ...
>
> Each connection is configured with RDP and RDP security.
>
> I create several test users also and give each use access to multiple LXD
container connections.
>
> Logout of Guacamole & log back in as one of the "test" users and I can
connect to and log into Ubuntu-Mate desktop on any of the containers just
fine.
>
> Running "pactl list modules" in any of the LXD containers shows the same
Pulseaudo "modules" loaded as the Host/Server.
>
> However, audio/sound played in any of the LXD containers can't be heard.
>
Hi Brian,
Guacamole does not use PulseAudio for grabbing the audio of an RDP
connection. It supports PulseAudio for VNC connections because VNC
otherwise lacks its own standard support for audio, but with RDP the
"RDPSND" channel will be used.
If you wish to use RDP, then the next step would be to determine why your
RDP server is not providing audio via RDPSND. Though XRDP may well use
PulseAudio behind the scenes, the RDP client (in this case: Guacamole) need
not be aware of this; the RDP-facing side of this audio should be standard
RDPSND.
Alternatively, if you are OK with using a VNC server instead of RDP, you
could do so and then use PulseAudio as you were originally expecting.
Thanks,
- Mike