You should definitely *not* set "force-lossless" to "true" if intending
to support video.
With "force-lossless" set to "true", Guacamole's ability to adjust the
compression used for things like video will be entirely disabled. It
will instead be forced use compression that is slower and ill-suited for
video content.
Without "force-lossless" set, Guacamole will automatically recognize
video-like content and compress it using a lossy format like WebP,
dynamically adjusting the quality based on rendering latency.
- Mike
On 10/4/2023 3:06 AM, Adrian Owen wrote:
Play YouTube over guacamole connection is always slow. Frame by frame
video compression is required.
Run test again, with no play video.
Adrian
*From:*Pierre Bastola
*Sent:* 04 October 2023 01:13
*To:* user@guacamole.apache.org
*Subject:* Using XRDP over Microsoft RDP client is much faster than
using it over Guacamole
Hi there,
I am struggling with a problem related to Guacamole RDP. Please help me
if possible:
--Start of question--
I am building a web client that can RDP into remote VMs. I am running a
guacd server locally (on my macbook) using docker.
I am using a JS script in the frontend to connect to a Java backend
using WebSockets, which in turn creates a tunnel to the guacd server
This is the standard Guacamole Web Client flow from what I have read.
These are the configurations I use when connecting to the guacd server.
This is java code:
|- guacConfig.setParameter("ignore-cert", "true");|||
|- guacConfig.setParameter("force-lossless", "true");|
||
|try {|
| GuacamoleSocket socket = new ConfiguredGuacamoleSocket(|
| new InetGuacamoleSocket(hostname, port),|
| guacConfig|
| );|
| GuacamoleTunnel tunnel = new SimpleGuacamoleTunnel(socket);|
| return tunnel;|
| } catch (Exception e) {|
| System.out.println(e);|
| return null;|
|}|
This is the JS script in the index.html that uses Web sockets to connect
to Java tomcat:
| /* | let guacTunnel = new
Guacamole.WebSocketTunnel("websocketendpoint");|
| var guac = new Guacamole.Client(|
| guacTunnel|
| );|
||
| // Add client to display div|
| display.appendChild(guac.getDisplay().getElement());|
||
|// Error handler|
| guac.onerror = function(error) {|
| alert(error);|
| console.log(error)|
| };|
||
| // Connect|
| guac.connect();|
||
| // Disconnect on close|
| window.onunload = function() {|
| console.log("disconnecting");|
| guac.disconnect();|
| }|
||
| // Mouse|
| var mouse = new
Guacamole.Mouse(guac.getDisplay().getElement());|
||
| mouse.onEach(['mousedown', 'mouseup', 'mousemove'],
function sendMouseEvent(e) {|
| guac.sendMouseState(e.state);|
| });|
||
| // Keyboard|
| var keyboard = new Guacamole.Keyboard(document);|
||
| keyboard.onkeydown = function (keysym) {|
| guac.sendKeyEvent(1, keysym);|
| };|
||
| keyboard.onkeyup = function (keysym) {|
| guac.sendKeyEvent(0, keysym);|
| };|
||
| /* ]]> */ |
I run the following commands in the remote VM to start xrdp:
| sudo apt-get update|
| sudo apt update|
| sudo ufw enable|
| sudo ufw allow ssh|
| sudo ufw allow 3389/tcp|
| sudo ufw reload|
| sudo systemctl stop apparmor|
| sudo apt install xfce4 xfce4-goodies -y|
| sudo apt install xrdp -y|
| sudo adduser xrdp ssl-cert|
| sudo chmod +x /etc/xrdp/key.pem|
| sudo reboot|
I make the following configuration changes to the xrdp.ini file:
|tcp_send_buffer_bytes=8388608|||
|crypt_=none|
I also change the value of the net.core.wmem_max to allow more traffic
to passthrough to the network:
|sudo sysctl -w net.core.wmem_max=8388608|||
And I stop composting. I read that this makes it run faster.
|xfconf-query --channel=xfwm4 --property=/general/use_compositing
--type=bool --set=false --create|||
When I rdp into the VM using my web client, it runs quite slowly. If I
rdp using the Microsoft Remote Desktop, it runs quite smoothly. Here are
two videos comparing them. The first one is from the Microsoft Remote
Desktop client where I play a YouTube video and the second is from my
web application.
Viewed from