KRDP and Apache Guacamole

Hello!
For all my remote desktop client needs, I’ve been using Apache Guacamole (sorry, I apparently cant add links), which supports connections to SSH, VNC, and RDP servers through the browser. I noticed in the KRDP Readme it doesn’t specifically say if it works or not, but it looks technically it should be supported.

In the “Known Issues and Limitations” section, the readme says “Only the NLA security type of RDP is supported,” a setting that can be set by Guacamole


and “Only the Graphics Pipeline extension of the RDP protocol is
implemented for video streaming,” which has been available in Guacamole for years (github com/apache/guacamole-server/commit/da80163e24dbf728f5c2e1245c23ded5f629917e)

However, when trying to connect, I get the following error:

krdpserver[6958]: org.kde.krdp: Client does not support graphics pipeline which is required
Full Log
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:939] [6958:72729] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_CONTINUE_NEEDED [0x00090312]
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
[previous line duplicated 20+ times]
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:039] [6958:72729] [WARN][com.winpr.negotiate] - AcceptSecurityContext status SEC_I_COMPLETE_NEEDED [0x00090313]
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
[previous line duplicated 100+ times]
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:250] [6958:15089] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:250] [6958:15089] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:250] [6958:15089] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.connection] - Accepted client: Guacamole RDP
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.connection] - Accepted channels:
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.connection] -  cliprdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.connection] -  rdpdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.connection] -  rdpsnd
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:04:458] [6958:15089] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:223] [6958:16081] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:223] [6958:16081] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:223] [6958:16081] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.connection] - Accepted client: Guacamole RDP
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.connection] - Accepted channels:
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.connection] -  cliprdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.connection] -  rdpdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.connection] -  rdpsnd
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:08:38:428] [6958:16081] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:48:788] [6958:16199] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:48:788] [6958:16199] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:48:788] [6958:16199] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.connection] - Accepted client: Guacamole RDP
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.connection] - Accepted channels:
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.connection] -  cliprdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.connection] -  rdpdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.connection] -  rdpsnd
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [21:09:49:992] [6958:16199] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:11:869] [6958:72636] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:11:869] [6958:72636] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:11:869] [6958:72636] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.connection] - Accepted client: Guacamole RDP
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.connection] - Accepted channels:
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.connection] -  cliprdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.connection] -  rdpdr
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.connection] -  rdpsnd
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.gcc] - Active rdp encryption level: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:12:077] [6958:72636] [INFO][com.freerdp.core.gcc] - Selected rdp encryption method: NONE
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:935] [6958:72729] [INFO][com.freerdp.core.connection] - Client Security: NLA:1 TLS:1 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:935] [6958:72729] [INFO][com.freerdp.core.connection] - Server Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:935] [6958:72729] [INFO][com.freerdp.core.connection] - Negotiated Security: NLA:1 TLS:0 RDP:0
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:140] [6958:72729] [INFO][com.freerdp.core.connection] - Accepted client: Guacamole RDP
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:29:140] [6958:72729] [INFO][com.freerdp.core.connection] - Accepted channels:
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis krdpserver[6958]: [23:58:libva info: va_openDriver() returns 0
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: va_openDriver() returns 0
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:29 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:30 Nemesis krdpserver[6958]: org.kde.krdp: Client does not support graphics pipeline which is required
Jul 02 23:58:30 Nemesis krdpserver[6958]: [23:58:30:942] [6958:72729] [ERROR][com.freerdp.core.transport] - transport_check_fds: transport->ReceiveCallback() - -1
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: va_openDriver() returns 0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: va_openDriver() returns 0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: va_openDriver() returns 0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: VA-API version 1.21.0
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-nonfree/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri-freeworld/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
Jul 02 23:58:30 Nemesis krdpserver[6958]: libva info: Found init function __vaDriverInit_1_0
Jul 02 23:58:31 Nemesis krdpserver[6958]: libva info: va_openDriver() returns 0
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated
Jul 02 23:58:31 Nemesis plasmashell[6613]: kf.svg: findInCache with a lastModified timestamp of 0 is deprecated

Is this an actual incompatibility with Guacamole (and if so, what is missing), or is this a bug?

2 Likes

I got the same issue of having problems connecting to Krdp with Guacamole.

Maybe somebody already achieved it and can share his/her expertise here.

As far as i can debug it’s a krdpserver issue, it only support h264 streaming/accelerated/video … and guacamole does not support that.

the h264 is the “graphics pipeline”…

i found some indication of they where working on it a few years back… but i can’t find it in the documentation.

Progress! Guacamole 1.6 (still a dev build) has added graphics pipeline support. The 1.6-dev docker image doesn’t work due to missing H.264 codecs for freerdp, but I was able to update the dockerfile to build them and have it running. I’m needing to run krdpserver from the command line to specify a single monitor.

Hey, can you share your Dockerfile and docker-compose file that got this working please? Thank you!!! Been trying this for ages

For all of this, I may have added too many support libraries, but it works for me so I did not go back and start removing extras.

Dockerfile:

#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

#
# Dockerfile for guacamole-server
#

# The Alpine Linux image that should be used as the basis for the guacd image
# NOTE: Using 3.18 because the required openssl1.1-compat-dev package was
# removed in more recent versions.
ARG ALPINE_BASE_IMAGE=3.18

# The target architecture of the build. Valid values are "ARM" and "X86". By
# default, this is detected automatically.
ARG BUILD_ARCHITECTURE

# The number of processes that may run simultaneously during the build. By
# default, this is detected automatically.
ARG BUILD_JOBS

# The directory that will house the guacamole-server source during the build 
ARG BUILD_DIR=/tmp/guacamole-server

# FreeRDP version (default to version 3)
ARG FREERDP_VERSION=3

# The final install location for guacamole-server and all dependencies. NOTE:
# This value is hard-coded in the entrypoint. Any change to this value must be
# propagated there.
ARG PREFIX_DIR=/opt/guacamole

#
# Automatically select the latest versions of each core protocol support
# library (these can be overridden at build time if a specific version is
# needed)
#
ARG WITH_FREERDP="${FREERDP_VERSION}(\.\d+)+"
ARG WITH_LIBSSH2='libssh2-\d+(\.\d+)+'
ARG WITH_LIBTELNET='\d+(\.\d+)+'
ARG WITH_LIBVNCCLIENT='LibVNCServer-\d+(\.\d+)+'
ARG WITH_LIBWEBSOCKETS='v\d+(\.\d+)+'

#
# Default build options for each core protocol support library, as well as
# guacamole-server itself (these can be overridden at build time if different
# options are needed)
#

ARG FREERDP_ARM_OPTS=""

ARG FREERDP_OPTS="\
    -DBUILTIN_CHANNELS=OFF \
    -DCHANNEL_URBDRC=OFF \
    -DWITH_ALSA=OFF \
    -DWITH_CAIRO=ON \
    -DWITH_CHANNELS=ON \
    -DWITH_CLIENT=ON \
    -DWITH_CUPS=OFF \
    -DWITH_DIRECTFB=OFF \
    -DWITH_FFMPEG=ON \
    -DWITH_FUSE=OFF \
    -DWITH_GSM=OFF \
    -DWITH_GSSAPI=OFF \
    -DWITH_IPP=OFF \
    -DWITH_JPEG=ON \
    -DWITH_KRB5=ON \
    -DWITH_LIBSYSTEMD=OFF \
    -DWITH_MANPAGES=OFF \
    -DWITH_OPENH264=OFF \
    -DWITH_OPENSSL=ON \
    -DWITH_OSS=OFF \
    -DWITH_PCSC=OFF \
    -DWITH_PKCS11=OFF \
    -DWITH_PULSE=OFF \
    -DWITH_SERVER=OFF \
    -DWITH_SERVER_INTERFACE=OFF \
    -DWITH_SHADOW_MAC=OFF \
    -DWITH_SHADOW_X11=OFF \
    -DWITH_SWSCALE=ON \
    -DWITH_WAYLAND=ON \
    -DWITH_X11=OFF \
    -DWITH_X264=ON \
    -DWITH_XCURSOR=ON \
    -DWITH_XEXT=ON \
    -DWITH_XI=OFF \
    -DWITH_XINERAMA=OFF \
    -DWITH_XKBFILE=ON \
    -DWITH_XRENDER=OFF \
    -DWITH_XTEST=OFF \
    -DWITH_XV=OFF \
    -DWITH_ZLIB=ON"

ARG FREERDP_X86_OPTS=""

ARG GUACAMOLE_SERVER_ARM_OPTS=""

ARG GUACAMOLE_SERVER_OPTS="\
    --disable-guaclog \
    CPPFLAGS=-Wno-error=deprecated-declarations"

ARG GUACAMOLE_SERVER_X86_OPTS=""

ARG LIBSSH2_ARM_OPTS=""

ARG LIBSSH2_OPTS="\
    -DBUILD_EXAMPLES=OFF \
    -DBUILD_SHARED_LIBS=ON"

ARG LIBSSH2_X86_OPTS=""

ARG LIBTELNET_ARM_OPTS=""

ARG LIBTELNET_OPTS="\
    --disable-static \
    --disable-util"

ARG LIBTELNET_X86_OPTS=""

ARG LIBVNCCLIENT_ARM_OPTS=""

ARG LIBVNCCLIENT_OPTS=""

ARG LIBVNCCLIENT_X86_OPTS=""

ARG LIBWEBSOCKETS_ARM_OPTS=""

ARG LIBWEBSOCKETS_OPTS="\
    -DDISABLE_WERROR=ON \
    -DLWS_WITHOUT_SERVER=ON \
    -DLWS_WITHOUT_TESTAPPS=ON \
    -DLWS_WITHOUT_TEST_CLIENT=ON \
    -DLWS_WITHOUT_TEST_PING=ON \
    -DLWS_WITHOUT_TEST_SERVER=ON \
    -DLWS_WITHOUT_TEST_SERVER_EXTPOLL=ON \
    -DLWS_WITH_STATIC=OFF"

ARG LIBWEBSOCKETS_X86_OPTS=""

#
# Base builder image that will be used by subsequent build stages, including
# for building dependencies of guacamole-server.
#

FROM alpine:${ALPINE_BASE_IMAGE} AS builder
ARG BUILD_DIR

# Install build dependencies
RUN apk add --no-cache                \
        autoconf                      \
        automake                      \
        build-base                    \
        cairo-dev                     \
        cjson-dev                     \
        cmake                         \
        cunit-dev                     \
        git                           \
        grep                          \
        krb5-dev                      \
        libjpeg-turbo-dev             \
        libpng-dev                    \
        libtool                       \
        libwebp-dev                   \
        make                          \
        openssl1.1-compat-dev         \
        pango-dev                     \
        pulseaudio-dev                \
        sdl2-dev                      \
        sdl2_ttf-dev                  \
        util-linux-dev                \
        webkit2gtk-dev                \
        x264-dev                      \
        openh264-dev                  \
        ffmpeg-dev

# Copy generic, automatic build script
COPY ./src/guacd-docker/bin/autobuild.sh ${BUILD_DIR}/src/guacd-docker/bin/

#
# Build dependency: libssh2
#

FROM builder AS libssh2
ARG BUILD_DIR
ARG LIBSSH2_ARM_OPTS
ARG LIBSSH2_OPTS
ARG LIBSSH2_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBSSH2

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBSSH2" \
    "https://github.com/libssh2/libssh2"

#
# Build dependency: libtelnet
#

FROM builder AS libtelnet
ARG BUILD_DIR
ARG LIBTELNET_ARM_OPTS
ARG LIBTELNET_OPTS
ARG LIBTELNET_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBTELNET

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBTELNET" \
    "https://github.com/seanmiddleditch/libtelnet"

#
# Build dependency: libvncclient
#

FROM builder AS libvncclient
ARG BUILD_DIR
ARG LIBVNCCLIENT_ARM_OPTS
ARG LIBVNCCLIENT_OPTS
ARG LIBVNCCLIENT_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBVNCCLIENT

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBVNCCLIENT" \
    "https://github.com/LibVNC/libvncserver"

#
# Build dependency: libwebsockets
#

FROM builder AS libwebsockets
ARG BUILD_DIR
ARG LIBWEBSOCKETS_ARM_OPTS
ARG LIBWEBSOCKETS_OPTS
ARG LIBWEBSOCKETS_X86_OPTS
ARG PREFIX_DIR
ARG WITH_LIBWEBSOCKETS

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "LIBWEBSOCKETS" \
    "https://github.com/warmcat/libwebsockets"

#
# Build dependency: FreeRDP
#

FROM builder AS freerdp
ARG BUILD_DIR
ARG FREERDP_ARM_OPTS
ARG FREERDP_OPTS
ARG FREERDP_X86_OPTS
ARG PREFIX_DIR
ARG WITH_FREERDP

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "FREERDP" \
    "https://github.com/FreeRDP/FreeRDP"

#
# STAGE 7: Collect dependencies built by previous stages and build
# guacamole-server.
#

FROM builder AS guacamole-server
ARG BUILD_DIR
ARG FREERDP_VERSION
ARG GUACAMOLE_SERVER_ARM_OPTS
ARG GUACAMOLE_SERVER_OPTS
ARG GUACAMOLE_SERVER_X86_OPTS
ARG PREFIX_DIR

# Copy dependencies built in previous stages
COPY --from=freerdp ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libssh2 ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libtelnet ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libvncclient ${PREFIX_DIR} ${PREFIX_DIR}
COPY --from=libwebsockets ${PREFIX_DIR} ${PREFIX_DIR}

# Use guacamole-server source from build context
COPY . ${BUILD_DIR}

RUN ${BUILD_DIR}/src/guacd-docker/bin/autobuild.sh "GUACAMOLE_SERVER" "${BUILD_DIR}"

# Determine location of the FREERDP library based on the version.
ARG FREERDP_LIB_PATH=${PREFIX_DIR}/lib/freerdp${FREERDP_VERSION}

# Record the packages of all runtime library dependencies
RUN ${BUILD_DIR}/src/guacd-docker/bin/list-dependencies.sh \
        ${PREFIX_DIR}/sbin/guacd               \
        ${PREFIX_DIR}/lib/libguac-client-*.so  \
        ${FREERDP_LIB_PATH}/*guac*.so   \
        > ${PREFIX_DIR}/DEPENDENCIES

#
# STAGE 8: Final, runtime image.
#

# Use same Alpine version as the base for the runtime image
FROM alpine:${ALPINE_BASE_IMAGE} AS runtime
ARG PREFIX_DIR

# Copy build artifacts into this stage
COPY --from=guacamole-server ${PREFIX_DIR} ${PREFIX_DIR}

# Bring runtime environment up to date and install runtime dependencies
RUN apk add --no-cache                \
        ca-certificates               \
        font-noto-cjk                 \
        ghostscript                   \
        netcat-openbsd                \
        shadow                        \
        terminus-font                 \
        ttf-dejavu                    \
        ttf-liberation                \
        ffmpeg                        \
        x264                          \
        openh264                      \
        util-linux-login && \
    xargs apk add --no-cache < ${PREFIX_DIR}/DEPENDENCIES

# Runtime environment
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib

# Checks the operating status every 5 minutes with a timeout of 5 seconds
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z 127.0.0.1 4822 || exit 1

# Create a new user guacd
ARG UID=1000
ARG GID=1000
RUN groupadd --gid $GID guacd
RUN useradd --system --create-home --shell /sbin/nologin --uid $UID --gid $GID guacd

# Run with user guacd
USER guacd

# Expose the default listener port
EXPOSE 4822

COPY ./src/guacd-docker/bin/entrypoint.sh /opt/guacamole/
ENTRYPOINT [ "/opt/guacamole/entrypoint.sh" ]

Compose:

I used the standard compose and added the following to guacd environmental variables:
RDP_GFX_H264: true
RDP_GFX_YUV420: true

1 Like

Thank you! I will try this out with my configuration. I appreciate you replying.

I was able to build guacamole-server and added env variables to guacamole-server in docker-compose

environment:
RDP_GFX_H264: “true”
RDP_GFX_YUV420: “true”

I had to add quotes otherwise it errors out. Does not seem to be working, is this how your compose is configured?

I have the below for my backend in compose:

services:
  guacd:
    container_name: guacamole_backend
    image: guacamole-server-x264:latest
    networks:
      guacamole_net:
    environment:
      PUID: 1000
      PGID: 1000
      TZ: Australia/Melbourne
      LOG_LEVEL: debug
      RDP_GFX_H264: true
      RDP_GFX_YUV420: true
    restart: always
    volumes:
    - /opt/appdata/guacamole/drive:/drive:rw
    - /opt/appdata/guacamole/record:/record:rw

What’s your error? I was running krdpserver on the command line to watch for issues. If x264 support is not working you’ll get the following from KRDP:

org.kde.krdp: Received caps:
org.kde.krdp:   RDPGFX_CAPVERSION_8 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_81 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_10 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_101 AVC: true YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_102 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_103 AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_104 AVC: false YUV420: true
org.kde.krdp:   RDPGFX_CAPVERSION_105 AVC: false YUV420: true
org.kde.krdp:   RDPGFX_CAPVERSION_106 AVC: false YUV420: true
org.kde.krdp:   UNKNOWN_VERSION AVC: false YUV420: false
org.kde.krdp:   RDPGFX_CAPVERSION_107 AVC: false YUV420: true
org.kde.krdp: Client does not support H.264 in YUV420 mode!

Once I got the build correct, AVC switched to true in my output for all except CAPVERSION_8 and krdp proceeded using CAPVERSION_107.

Docker-compose:

services:                                                                                                                                                                                   
  # guacd                                                                                                                                                                                   
  guacamole-server:                                                                                                                                                                         
    environment:                                                                                                                                                                            
        RDP_GFX_H264: true
        RDP_GFX_YUV420: true
    container_name: guacamole_server_compose                                                                                                                                                
    build: ./guacamole-server                                                                                                                                                               
    networks:                                                                                                                                                                               
      - guacnetwork_compose                                                                                                                                                                 
    restart: always                                                                                                                                                                         
    volumes:                                                                                                                                                                                
      - ./drive:/drive:rw                                                                                                                                                                   
      - ./record:/record:rw           

docker-compose up -d gives the error

ERROR: The Compose file './docker-compose.yml' is invalid because:
services.guacamole-server.environment.RDP_GFX_H264 contains true, which is an invalid type, it should be a string, number, or a nul

ERROR: The Compose file ‘./docker-compose.yml’ is invalid because:services.guacamole-server.environment.RDP_GFX_H264 contains true, which is an invalid type, it should be a string, number, or a null

From what I’m reading, compose needs the quotes. I’m using a portainer stack which is fine without them. Did it work when you added quotes?

Just confirmed that the connection works just fine without these flags in compose. Sorry for the red herring. Again, I started off by throwing everything at it to get it working instead of the smart method of figuring out exactly what is needed.

Hi. I’m trying to get krdp working with Guacamole but I’m struggling. Does this still work for you?

I’ve done the following:

  1. Cloned the repository
  2. Replaced the Dockerfile with your version of it
  3. Build and run the Docker container successfully (with and without the mentioned environment variables)

But I’m always receiving Client does not support H.264 in YUV420 mode!

Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp:   RDPGFX_CAPVERSION_104 AVC: false YUV420: true
Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp:   RDPGFX_CAPVERSION_105 AVC: false YUV420: true
Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp:   RDPGFX_CAPVERSION_106 AVC: false YUV420: true
Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp:   UNKNOWN_VERSION AVC: false YUV420: false
Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp:   RDPGFX_CAPVERSION_107 AVC: false YUV420: true
Sep 29 16:17:51 f-vlpc-01 krdpserver[76589]: org.kde.krdp: Client does not support H.264 in YUV420 mode!

In Guacamole I’m using a default rdp connection, except for “Security mode: NLA”. Did I miss something?