Skip to content

GUACAMOLE-2268: Gate VNC UTF-8 (Extended Clipboard) support behind config check.#671

Merged
necouchman merged 1 commit into
apache:staging/1.6.1from
bbennett-ks:GUACAMOLE-2268-VNC-UTF8-libvncclient-fix
May 8, 2026
Merged

GUACAMOLE-2268: Gate VNC UTF-8 (Extended Clipboard) support behind config check.#671
necouchman merged 1 commit into
apache:staging/1.6.1from
bbennett-ks:GUACAMOLE-2268-VNC-UTF8-libvncclient-fix

Conversation

@bbennett-ks
Copy link
Copy Markdown
Contributor

SendClientCutTextUTF8 and rfbClient.GotXCutTextUTF8 are only available in libvncserver/libvncclient 0.9.15+.

This adds configure checks for the UTF-8 (Extended Clipboard) APIs and guards the affected call sites with #ifdefs. When unavailable, the VNC client falls back to the classic SendClientCutText path.

Testing

libvncserver version 0.9.15:

autoreconf -I
./configure
…
checking for rfbClient.requestedResize... yes
checking for rfbClient.GotXCutTextUTF8... yes
…

libvncserver version 0.9.15:

autoreconf -I
./configure
…
checking for rfbClient.requestedResize... yes
checking for rfbClient.GotXCutTextUTF8... no
…

Comment thread configure.ac
Comment on lines +734 to +745
have_vnc_extended_clipboard=yes
AC_CHECK_MEMBERS([rfbClient.GotXCutTextUTF8],
[], [have_vnc_extended_clipboard=no],
[[#include <rfb/rfbclient.h>]])

if test "x${have_vnc_extended_clipboard}" = "xyes"
then
AC_DEFINE([LIBVNC_CLIENT_HAS_EXTENDED_CLIPBOARD],,
[Whether rfbClient supports the Extended Clipboard pseudo-encoding (UTF-8).])
fi

fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just FYI - this is fine, and I will merge as-is, but this can be simpler - the AC_CHECK_MEMBERS macro will automatically define HAVE_RFBCLIENT_GOTXCUTTEXTUTF8 for you. For example, we use this with RDP support and the VerifyCertificateEx:

# Updated certificate verification callback (introduced with 2.0.0, not present
# in 2.0.0-rc4 or earlier)
if test "x${have_freerdp}" = "xyes"
then
AC_CHECK_MEMBERS([freerdp.VerifyCertificateEx],,,
[[#include <freerdp/freerdp.h>]])
fi

Obviously the defines end up a little less nicely-named than what you have, but the configure.ac ends up a little simpler.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the tip! I modeled the fix based on support for libVNCserver support for the requestedResize. I'll keep this in mind for next my.

FYI, I implemented similar support for libVNCServer support FinishedFrameBufferUpdate. Once I began to test it, I realized the the base libVNCServer in GitHub supported FinishedFrameBufferUpdate so config support was not necessary.

@necouchman necouchman merged commit 8e16cf2 into apache:staging/1.6.1 May 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants