Merge remote-tracking branch 'origin/master' into bugfix/VNC-325-hw-h-264-nvenc-performs-poorly

This commit is contained in:
Matt McClaskey 2026-06-04 15:17:43 +00:00
commit 714edd295e
No known key found for this signature in database
30 changed files with 525 additions and 64 deletions

View file

@ -3,7 +3,7 @@
# Contributor:
# Maintainer: Kasm Technologies LLC <info@kasmweb.com>
pkgname=kasmvncserver
pkgver=1.3.4
pkgver=1.5.0
pkgrel=0
pkgdesc="KasmVNC provides remote web-based access to a Desktop or application."
url="https://github.com/kasmtech/KasmVNC"

View file

@ -62,6 +62,7 @@ ConnParams::ConnParams()
supportsSetDesktopSize(false), supportsFence(false),
supportsContinuousUpdates(false), supportsExtendedClipboard(false),
supportsDisconnectNotify(false),
supportsDirectMouse(false),
supportsUdp(false),
compressLevel(2), qualityLevel(-1), fineQualityLevel(-1),
subsampling(subsampleUndefined), name_(0), cursorPos_(0, 0), verStrPos(0),
@ -151,6 +152,7 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
supportsWEBP = false;
supportsQOI = false;
supportsDisconnectNotify = false;
supportsDirectMouse = false;
compressLevel = -1;
qualityLevel = -1;
fineQualityLevel = -1;
@ -224,6 +226,10 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
supportsDisconnectNotify = true;
clientparlog("disconnectNotify", true);
break;
case pseudoEncodingDirectMouse:
supportsDirectMouse = true;
clientparlog("directMouse", true);
break;
case pseudoEncodingFence:
supportsFence = true;
clientparlog("fence", true);

View file

@ -119,6 +119,7 @@ namespace rfb {
bool supportsContinuousUpdates;
bool supportsExtendedClipboard;
bool supportsDisconnectNotify;
bool supportsDirectMouse;
bool supportsUdp;

View file

@ -36,14 +36,18 @@ namespace rfb {
rdr::U32 __unused_attr keycode,
bool __unused_attr down) { }
virtual void pointerEvent(const Point& __unused_attr pos,
const Point& __unused_attr abspos,
int __unused_attr buttonMask,
int __unused_attr buttonMask,
const bool __unused_attr skipClick,
const bool __unused_attr skipRelease,
int scrollX,
int scrollY) { }
virtual void clientCutText(const char* __unused_attr str,
int __unused_attr len) { }
virtual void directMouseEvent(int __unused_attr dx,
int __unused_attr dy,
int __unused_attr buttonMask,
int __unused_attr scrollX,
int __unused_attr scrollY) { }
};
}

View file

@ -78,6 +78,12 @@ namespace rfb {
// the relevant RFB protocol messages from clients.
// See InputHandler for method signatures.
virtual Point directMouseEventWithPosition(int dx, int dy, int buttonMask,
int scrollX, int scrollY) {
directMouseEvent(dx, dy, buttonMask, scrollX, scrollY);
return Point();
}
// handleClipboardAnnounce() is called to indicate a change in the
// clipboard on a client. Call VNCServer::requestClipboard() to
// access the actual data.

View file

@ -43,12 +43,13 @@ void SMsgHandler::setPixelFormat(const PixelFormat& pf)
void SMsgHandler::setEncodings(int nEncodings, const rdr::S32* encodings)
{
bool firstFence, firstContinuousUpdates, firstLEDState,
firstQEMUKeyEvent;
firstQEMUKeyEvent, firstDirectMouse;
firstFence = !cp.supportsFence;
firstContinuousUpdates = !cp.supportsContinuousUpdates;
firstLEDState = !cp.supportsLEDState;
firstQEMUKeyEvent = !cp.supportsQEMUKeyEvent;
firstDirectMouse = !cp.supportsDirectMouse;
cp.setEncodings(nEncodings, encodings);
@ -62,12 +63,22 @@ void SMsgHandler::setEncodings(int nEncodings, const rdr::S32* encodings)
supportsLEDState();
if (cp.supportsQEMUKeyEvent && firstQEMUKeyEvent)
supportsQEMUKeyEvent();
if (cp.supportsDirectMouse && firstDirectMouse)
supportsDirectMouse();
}
void SMsgHandler::supportsDirectMouse()
{
}
void SMsgHandler::handleClipboardAnnounceBinary(const unsigned, const char mimes[][32])
{
}
void SMsgHandler::directMouseEvent(int, int, int, int, int)
{
}
void SMsgHandler::clearBinaryClipboard()
{
}

View file

@ -54,6 +54,9 @@ namespace rfb {
virtual void enableContinuousUpdates(bool enable,
int x, int y, int w, int h) = 0;
virtual void directMouseEvent(int dx, int dy, int buttonMask,
int scrollX, int scrollY);
virtual void handleClipboardAnnounceBinary(const unsigned num, const char mimes[][32]);
virtual void clearBinaryClipboard();
virtual void addBinaryClipboard(const char mime[], const rdr::U8 *data,
@ -96,6 +99,10 @@ namespace rfb {
// handler will send a pseudo-rect back, signalling server support.
virtual void supportsQEMUKeyEvent();
// supportsDirectMouse() is called the first time we detect that the
// client supports the direct mouse extension
virtual void supportsDirectMouse();
virtual void udpUpgrade(const char *resp) = 0;
virtual void udpDowngrade(const bool) = 0;

View file

@ -108,6 +108,9 @@ void SMsgReader::readMsg()
case msgTypeKeepAlive:
readKeepAlive();
break;
case msgTypeDirectMouseEvent:
readDirectMouseEvent();
break;
default:
fprintf(stderr, "unknown message type %d\n", msgType);
throw Exception("unknown message type");
@ -242,7 +245,7 @@ void SMsgReader::readPointerEvent()
int scrollX = is->readS16();
int scrollY = is->readS16();
handler->pointerEvent(Point(x, y), Point(0, 0), mask, false, false, scrollX, scrollY);
handler->pointerEvent(Point(x, y), mask, false, false, scrollX, scrollY);
}
@ -422,3 +425,21 @@ void SMsgReader::readVideoEncodersRequest() const {
handler->videoEncodersRequest(buf);
}
void SMsgReader::readDirectMouseEvent()
{
// Wire format (9 bytes after the type byte):
// byte 0: VNC button mask. Button N uses bit N-1, so the common buttons
// are bit 0=left, bit 1=middle, bit 2=right.
// bytes 1-2: dx (int16 BE)
// bytes 3-4: dy (int16 BE)
// bytes 5-6: scroll dx (int16 BE)
// bytes 7-8: scroll dy (int16 BE)
int buttonMask = is->readU8();
int dx = is->readS16();
int dy = is->readS16();
int scrollX = is->readS16();
int scrollY = is->readS16();
handler->directMouseEvent(dx, dy, buttonMask, scrollX, scrollY);
}

View file

@ -68,7 +68,8 @@ namespace rfb {
void readSubscribeUnixRelay();
void readUnixRelay();
void readVideoEncodersRequest() const;
void readVideoEncodersRequest() const;
void readDirectMouseEvent();
SMsgHandler* handler;
rdr::InStream* is;

View file

@ -832,3 +832,9 @@ void SMsgWriter::writeDisconnectNotify(bool graceful, const char *reason)
os->writeBytes(msg, len);
endMsg();
}
void SMsgWriter::writeForceGameMode()
{
startMsg(msgTypeForceGameMode);
endMsg();
}

View file

@ -136,6 +136,7 @@ namespace rfb {
void writeUserJoinedSession(const std::string& username);
void writeUserLeftSession(const std::string& username);
void writeDisconnectNotify(bool graceful, const char *reason);
void writeForceGameMode();
protected:
void startMsg(int type);

View file

@ -85,6 +85,11 @@ rfb::BoolParameter rfb::Server::acceptPointerEvents
("AcceptPointerEvents",
"Accept pointer press and release events from clients.",
true);
rfb::BoolParameter rfb::Server::forceGameMode
("ForceGameMode",
"Send a message to newly connected clients instructing them to enable game mode "
"(direct-drive relative mouse). Useful for game-focused workspace images.",
false);
rfb::BoolParameter rfb::Server::acceptCutText
("AcceptCutText",
"Accept clipboard updates from clients.",

View file

@ -84,6 +84,7 @@ namespace rfb {
static BoolParameter disconnectClients;
static BoolParameter acceptKeyEvents;
static BoolParameter acceptPointerEvents;
static BoolParameter forceGameMode;
static BoolParameter acceptCutText;
static BoolParameter sendCutText;
static BoolParameter acceptSetDesktopSize;

View file

@ -71,7 +71,8 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s, con
needsPermCheck(false), pointerEventTime(0),
clientHasCursor(false),
accessRights(AccessDefault), startTime(time(nullptr)), frameTracking(false),
udpFramesSinceFull(0), complainedAboutNoViewRights(false), clientUsername("username_unavailable")
udpFramesSinceFull(0), complainedAboutNoViewRights(false),
clientUsername("username_unavailable")
{
setStreams(&sock->inStream(), &sock->outStream());
peerEndpoint.buf = sock->getPeerEndpoint();
@ -772,7 +773,7 @@ void VNCSConnectionST::setPixelFormat(const PixelFormat& pf)
setCursor();
}
void VNCSConnectionST::pointerEvent(const Point& pos, const Point& abspos, int buttonMask, const bool skipClick, const bool skipRelease, int scrollX, int scrollY)
void VNCSConnectionST::pointerEvent(const Point& pos, int buttonMask, const bool skipClick, const bool skipRelease, int scrollX, int scrollY)
{
pointerEventTime = lastEventTime = time(nullptr);
server->lastUserInputTime = lastEventTime;
@ -785,44 +786,7 @@ void VNCSConnectionST::pointerEvent(const Point& pos, const Point& abspos, int b
}
if (!rfb::Server::acceptPointerEvents) return;
if (!server->pointerClient || server->pointerClient == this) {
Point newpos = pos;
if (pos.x & 0x4000) {
newpos.x &= ~0x4000;
newpos.y &= ~0x4000;
if (newpos.x & 0x8000) {
newpos.x &= ~0x8000;
newpos.x = -newpos.x;
}
if (newpos.y & 0x8000) {
newpos.y &= ~0x8000;
newpos.y = -newpos.y;
}
if (newpos.x < 0) {
if (pointerEventPos.x + newpos.x >= 0)
pointerEventPos.x += newpos.x;
else
pointerEventPos.x = 0;
} else {
pointerEventPos.x += newpos.x;
if (pointerEventPos.x >= cp.width)
pointerEventPos.x = cp.width;
}
if (newpos.y < 0) {
if (pointerEventPos.y + newpos.y >= 0)
pointerEventPos.y += newpos.y;
else
pointerEventPos.y = 0;
} else {
pointerEventPos.y += newpos.y;
if (pointerEventPos.y >= cp.height)
pointerEventPos.y = cp.height;
}
} else {
pointerEventPos = pos;
}
pointerEventPos = pos;
if (buttonMask)
server->pointerClient = this;
@ -844,10 +808,34 @@ void VNCSConnectionST::pointerEvent(const Point& pos, const Point& abspos, int b
}
}
server->desktop->pointerEvent(newpos, pointerEventPos, buttonMask, skipclick, skiprelease, scrollX, scrollY);
server->desktop->pointerEvent(pos, buttonMask, skipclick, skiprelease, scrollX, scrollY);
}
}
void VNCSConnectionST::directMouseEvent(int dx, int dy, int buttonMask,
int scrollX, int scrollY)
{
pointerEventTime = lastEventTime = time(nullptr);
server->lastUserInputTime = lastEventTime;
if (!(accessRights & AccessPtrEvents)) {
recheckPerms();
return;
}
if (!rfb::Server::acceptPointerEvents)
return;
if (server->pointerClient && server->pointerClient != this)
return;
if (buttonMask)
server->pointerClient = this;
else
server->pointerClient = nullptr;
pointerEventPos =
server->desktop->directMouseEventWithPosition(dx, dy, buttonMask,
scrollX, scrollY);
}
class VNCSConnectionSTShiftPresser {
public:
@ -1212,6 +1200,12 @@ void VNCSConnectionST::supportsLEDState()
writer()->writeLEDState();
}
void VNCSConnectionST::supportsDirectMouse()
{
if (rfb::Server::forceGameMode)
writer()->writeForceGameMode();
}
bool VNCSConnectionST::handleTimeout(Timer* t)
{

View file

@ -246,7 +246,8 @@ namespace rfb {
virtual void queryConnection(const char* userName);
virtual void clientInit(bool shared);
virtual void setPixelFormat(const PixelFormat& pf);
virtual void pointerEvent(const Point& pos, const Point& abspos,int buttonMask, const bool skipClick, const bool skipRelease, int scrollX, int scrollY);
virtual void pointerEvent(const Point& pos, int buttonMask, const bool skipClick, const bool skipRelease, int scrollX, int scrollY);
virtual void directMouseEvent(int dx, int dy, int buttonMask, int scrollX, int scrollY);
virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
virtual void framebufferUpdateRequest(const Rect& r, bool incremental);
virtual void setDesktopSize(int fb_width, int fb_height,
@ -264,6 +265,7 @@ namespace rfb {
virtual void supportsFence();
virtual void supportsContinuousUpdates();
virtual void supportsLEDState();
void supportsDirectMouse() override;
bool canChangeKasmSettings() const override {
return (accessRights & (AccessPtrEvents | AccessKeyEvents)) ==

View file

@ -997,6 +997,27 @@ void VNCServerST::translateDLPRegion(rdr::U16 &x1, rdr::U16 &y1, rdr::U16 &x2, r
//slog.info("DLP_Region vals %u,%u %u,%u", x1, y1, x2, y2);
}
void VNCServerST::getDLPRegionSkipFlags(const Point& pos,
bool& skipclick, bool& skiprelease) const
{
skipclick = false;
skiprelease = false;
if (!DLPRegion.enabled)
return;
rdr::U16 x1, y1, x2, y2;
translateDLPRegion(x1, y1, x2, y2);
if (pos.x < x1 || pos.x >= x2 ||
pos.y < y1 || pos.y >= y2) {
if (!Server::DLP_RegionAllowClick)
skipclick = true;
if (!Server::DLP_RegionAllowRelease)
skiprelease = true;
}
}
void VNCServerST::blackOut()
{
// Compute the region, since the resolution may have changed

View file

@ -208,6 +208,11 @@ namespace rfb {
enum UserActionType {Join, Leave};
void notifyUserAction(const VNCSConnectionST* newConnection, std::string& user_name, const UserActionType action_type);
// Compute whether a pointer click/release at the given framebuffer
// position should be suppressed by the DLP region policy.
void getDLPRegionSkipFlags(const Point& pos,
bool& skipclick, bool& skiprelease) const;
protected:
friend class VNCSConnectionST;

View file

@ -88,6 +88,7 @@ namespace rfb {
constexpr int pseudoEncodingVideoOutTimeLevel100 = -1887;
constexpr int pseudoEncodingQOI = -1886;
constexpr int pseudoEncodingKasmDisconnectNotify = -1885;
constexpr int pseudoEncodingDirectMouse = -1884;
constexpr int pseudoEncodingHardwareProfile0 = -1170;
constexpr int pseudoEncodingHardwareProfile4 = -1166;

View file

@ -38,6 +38,7 @@ namespace rfb {
constexpr int msgTypeVideoEncoders = 184;
constexpr int msgTypeKeepAlive = 185;
constexpr int msgTypeServerDisconnect = 186;
constexpr int msgTypeForceGameMode = 187;
constexpr int msgTypeServerFence = 248;
constexpr int msgTypeUserAddedToSession = 253;
@ -67,6 +68,8 @@ namespace rfb {
//constexpr int msgTypeKeepAlive = 185;
//constexpr int msgTypeServerDisconnect = 186;
constexpr int msgTypeDirectMouseEvent = 188;
constexpr int msgTypeClientFence = 248;
constexpr int msgTypeSetDesktopSize = 251;

64
debian/changelog vendored
View file

@ -1,3 +1,67 @@
kasmvnc (1.5.0-1) unstable; urgency=medium
* Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
* Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
* Added support for overriding configuration settings via environment variables.
* Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
* Added support for Fedora 42 and 43.
* Added support for openSUSE 16.
* Added support for Alpine 3.22 and 3.23.
* Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
* FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
* Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
* Fixed bug where closing a secondary monitor would close the entire client connection.
* Fixed Kali Linux image build failures.
* Updated default STUN public IP behavior to avoid undesired external lookups.
* Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
* Bumped rollup to address security vulnerabilities.
* Updated French translations.
-- Kasm Technologies LLC <info@kasmweb.com> Mon, 25 May 2026 00:00:00 +0000
kasmvnc (1.4.2-1) unstable; urgency=medium
* Fixed bug with server-side enforced idle-timeout.
-- Kasm Technologies LLC <info@kasmweb.com> Fri, 24 Apr 2026 00:00:00 +0000
kasmvnc (1.4.1-1) unstable; urgency=medium
* Fixed bug with enforcement of server-side idle-disconnect.
* Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
* Fixed display manager UI to work on touch screens.
-- Kasm Technologies LLC <info@kasmweb.com> Mon, 01 Dec 2025 10:42:46 +0000
kasmvnc (1.4.0-1) unstable; urgency=medium
* Added new API call for retrieving active sessions.
* Added message propagation to clients other users connect or disconnect from the same session.
* Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
* Significant enhancements of multi-threading performance.
* Upgraded libwebp library to 1.5.0.
* Updated to C++ 20 standard.
* Added network.udp.payload_size to kasm yaml configuration.
* Added build for Debian Trixie.
* Refactor of code to decrease memory usage on client browsers.
* Added support for the Keyboard API for Chromium browsers.
* Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
* Fixed bug with watermark not getting displayed in certain scenarios.
* Fixed bug with case sensitivity of HTTP headers
* Fixed bug with the downloads API not escaping certain characters in returned json.
* Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
* Bug fixes with multi-monitor, adding and removing displays
* Fix bug with secondary display still showing content after session disconnect in certain scenarios.
* Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
* Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
* Fixed memory leak in Firefox.
* Fixed bug with Firefox displaying scrollbars at odd resolutions.
* Fixes to Korean translations.
* Multiple fixes to IME foreign language support.
* Fixed a race condition causing an error message to be displayed erroneously on the client.
-- Kasm Technologies LLC <info@kasmweb.com> Fri, 01 Aug 2025 10:42:46 +0000
kasmvnc (1.3.4-1) unstable; urgency=medium
* Add configuration key network.udp.payload_size.

View file

@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.3.4
Version: 1.5.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
@ -117,6 +117,54 @@ stop_vncserver_systemd_services_for_all_logged_in_users
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Mon May 25 2026 KasmTech <info@kasmweb.com> - 1.5.0-1
- Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
- Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
- Added support for overriding configuration settings via environment variables.
- Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
- Added support for Fedora 42 and 43.
- Added support for openSUSE 16.
- Added support for Alpine 3.22 and 3.23.
- Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
- FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
- Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
- Fixed bug where closing a secondary monitor would close the entire client connection.
- Fixed Kali Linux image build failures.
- Updated default STUN public IP behavior to avoid undesired external lookups.
- Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
- Bumped rollup to address security vulnerabilities.
- Updated French translations.
* Fri Apr 24 2026 KasmTech <info@kasmweb.com> - 1.4.2-1
- Fixed bug with server-side enforced idle-timeout.
* Mon Dec 01 2025 KasmTech <info@kasmweb.com> - 1.4.1-1
- Fixed bug with enforcement of server-side idle-disconnect.
- Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
- Fixed display manager UI to work on touch screens.
* Fri Aug 01 2025 KasmTech <info@kasmweb.com> - 1.4.0-1
- Added new API call for retrieving active sessions.
- Added message propagation to clients other users connect or disconnect from the same session.
- Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
- Significant enhancements of multi-threading performance.
- Upgraded libwebp library to 1.5.0.
- Updated to C++ 20 standard.
- Added network.udp.payload_size to kasm yaml configuration.
- Added build for Debian Trixie.
- Refactor of code to decrease memory usage on client browsers.
- Added support for the Keyboard API for Chromium browsers.
- Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
- Fixed bug with watermark not getting displayed in certain scenarios.
- Fixed bug with case sensitivity of HTTP headers
- Fixed bug with the downloads API not escaping certain characters in returned json.
- Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
- Bug fixes with multi-monitor, adding and removing displays
- Fix bug with secondary display still showing content after session disconnect in certain scenarios.
- Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
- Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
- Fixed memory leak in Firefox.
- Fixed bug with Firefox displaying scrollbars at odd resolutions.
- Fixes to Korean translations.
- Multiple fixes to IME foreign language support.
- Fixed a race condition causing an error message to be displayed erroneously on the client.
* Thu Mar 20 2025 KasmTech <info@kasmweb.com> - 1.3.4-1
- Add configuration key network.udp.payload_size.
- Remove support for distro versions that reached end-of-life.

View file

@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.3.4
Version: 1.5.0
Release: leap15
Summary: VNC server accessible from a web browser
@ -115,6 +115,54 @@ stop_vncserver_systemd_services_for_all_logged_in_users
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Mon May 25 2026 KasmTech <info@kasmweb.com> - 1.5.0-leap15
- Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
- Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
- Added support for overriding configuration settings via environment variables.
- Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
- Added support for Fedora 42 and 43.
- Added support for openSUSE 16.
- Added support for Alpine 3.22 and 3.23.
- Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
- FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
- Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
- Fixed bug where closing a secondary monitor would close the entire client connection.
- Fixed Kali Linux image build failures.
- Updated default STUN public IP behavior to avoid undesired external lookups.
- Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
- Bumped rollup to address security vulnerabilities.
- Updated French translations.
* Fri Apr 24 2026 KasmTech <info@kasmweb.com> - 1.4.2-leap15
- Fixed bug with server-side enforced idle-timeout.
* Mon Dec 01 2025 KasmTech <info@kasmweb.com> - 1.4.1-leap15
- Fixed bug with enforcement of server-side idle-disconnect.
- Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
- Fixed display manager UI to work on touch screens.
* Fri Aug 01 2025 KasmTech <info@kasmweb.com> - 1.4.0-leap15
- Added new API call for retrieving active sessions.
- Added message propagation to clients other users connect or disconnect from the same session.
- Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
- Significant enhancements of multi-threading performance.
- Upgraded libwebp library to 1.5.0.
- Updated to C++ 20 standard.
- Added network.udp.payload_size to kasm yaml configuration.
- Added build for Debian Trixie.
- Refactor of code to decrease memory usage on client browsers.
- Added support for the Keyboard API for Chromium browsers.
- Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
- Fixed bug with watermark not getting displayed in certain scenarios.
- Fixed bug with case sensitivity of HTTP headers
- Fixed bug with the downloads API not escaping certain characters in returned json.
- Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
- Bug fixes with multi-monitor, adding and removing displays
- Fix bug with secondary display still showing content after session disconnect in certain scenarios.
- Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
- Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
- Fixed memory leak in Firefox.
- Fixed bug with Firefox displaying scrollbars at odd resolutions.
- Fixes to Korean translations.
- Multiple fixes to IME foreign language support.
- Fixed a race condition causing an error message to be displayed erroneously on the client.
* Thu Mar 20 2025 KasmTech <info@kasmweb.com> - 1.3.4-leap15
- Add configuration key network.udp.payload_size.
- Remove support for distro versions that reached end-of-life.

View file

@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.3.4
Version: 1.5.0
Release: leap16
Summary: VNC server accessible from a web browser
@ -115,6 +115,54 @@ stop_vncserver_systemd_services_for_all_logged_in_users
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Mon May 25 2026 KasmTech <info@kasmweb.com> - 1.5.0-leap16
- Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
- Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
- Added support for overriding configuration settings via environment variables.
- Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
- Added support for Fedora 42 and 43.
- Added support for openSUSE 16.
- Added support for Alpine 3.22 and 3.23.
- Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
- FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
- Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
- Fixed bug where closing a secondary monitor would close the entire client connection.
- Fixed Kali Linux image build failures.
- Updated default STUN public IP behavior to avoid undesired external lookups.
- Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
- Bumped rollup to address security vulnerabilities.
- Updated French translations.
* Fri Apr 24 2026 KasmTech <info@kasmweb.com> - 1.4.2-leap15
- Fixed bug with server-side enforced idle-timeout.
* Mon Dec 01 2025 KasmTech <info@kasmweb.com> - 1.4.1-leap15
- Fixed bug with enforcement of server-side idle-disconnect.
- Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
- Fixed display manager UI to work on touch screens.
* Fri Aug 01 2025 KasmTech <info@kasmweb.com> - 1.4.0-leap15
- Added new API call for retrieving active sessions.
- Added message propagation to clients other users connect or disconnect from the same session.
- Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
- Significant enhancements of multi-threading performance.
- Upgraded libwebp library to 1.5.0.
- Updated to C++ 20 standard.
- Added network.udp.payload_size to kasm yaml configuration.
- Added build for Debian Trixie.
- Refactor of code to decrease memory usage on client browsers.
- Added support for the Keyboard API for Chromium browsers.
- Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
- Fixed bug with watermark not getting displayed in certain scenarios.
- Fixed bug with case sensitivity of HTTP headers
- Fixed bug with the downloads API not escaping certain characters in returned json.
- Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
- Bug fixes with multi-monitor, adding and removing displays
- Fix bug with secondary display still showing content after session disconnect in certain scenarios.
- Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
- Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
- Fixed memory leak in Firefox.
- Fixed bug with Firefox displaying scrollbars at odd resolutions.
- Fixes to Korean translations.
- Multiple fixes to IME foreign language support.
- Fixed a race condition causing an error message to be displayed erroneously on the client.
* Thu Mar 20 2025 KasmTech <info@kasmweb.com> - 1.3.4-leap15
- Add configuration key network.udp.payload_size.
- Remove support for distro versions that reached end-of-life.

View file

@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.3.4
Version: 1.5.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
@ -83,6 +83,54 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Mon May 25 2026 KasmTech <info@kasmweb.com> - 1.5.0-1
- Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
- Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
- Added support for overriding configuration settings via environment variables.
- Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
- Added support for Fedora 42 and 43.
- Added support for openSUSE 16.
- Added support for Alpine 3.22 and 3.23.
- Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
- FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
- Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
- Fixed bug where closing a secondary monitor would close the entire client connection.
- Fixed Kali Linux image build failures.
- Updated default STUN public IP behavior to avoid undesired external lookups.
- Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
- Bumped rollup to address security vulnerabilities.
- Updated French translations.
* Fri Apr 24 2026 KasmTech <info@kasmweb.com> - 1.4.2-1
- Fixed bug with server-side enforced idle-timeout.
* Mon Dec 01 2025 KasmTech <info@kasmweb.com> - 1.4.1-1
- Fixed bug with enforcement of server-side idle-disconnect.
- Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
- Fixed display manager UI to work on touch screens.
* Fri Aug 01 2025 KasmTech <info@kasmweb.com> - 1.4.0-1
- Added new API call for retrieving active sessions.
- Added message propagation to clients other users connect or disconnect from the same session.
- Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
- Significant enhancements of multi-threading performance.
- Upgraded libwebp library to 1.5.0.
- Updated to C++ 20 standard.
- Added network.udp.payload_size to kasm yaml configuration.
- Added build for Debian Trixie.
- Refactor of code to decrease memory usage on client browsers.
- Added support for the Keyboard API for Chromium browsers.
- Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
- Fixed bug with watermark not getting displayed in certain scenarios.
- Fixed bug with case sensitivity of HTTP headers
- Fixed bug with the downloads API not escaping certain characters in returned json.
- Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
- Bug fixes with multi-monitor, adding and removing displays
- Fix bug with secondary display still showing content after session disconnect in certain scenarios.
- Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
- Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
- Fixed memory leak in Firefox.
- Fixed bug with Firefox displaying scrollbars at odd resolutions.
- Fixes to Korean translations.
- Multiple fixes to IME foreign language support.
- Fixed a race condition causing an error message to be displayed erroneously on the client.
* Thu Mar 20 2025 KasmTech <info@kasmweb.com> - 1.3.4-1
- Add configuration key network.udp.payload_size.
- Remove support for distro versions that reached end-of-life.

View file

@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.3.4
Version: 1.5.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
@ -116,6 +116,54 @@ stop_vncserver_systemd_services_for_all_logged_in_users
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Mon May 25 2026 KasmTech <info@kasmweb.com> - 1.5.0-1
- Added video streaming mode with hardware and software accelerated H.264, H.265, and AV1 encoders. Hardware acceleration uses VAAPI (Intel/AMD) and NVENC (NVIDIA).
- Added support for relative mouse input mode for improved UX and application compatibility (e.g. games and apps that require raw mouse deltas).
- Added support for overriding configuration settings via environment variables.
- Optional systemd auto-start integration for deb/rpm packages, with improved upgrade and uninstall handling.
- Added support for Fedora 42 and 43.
- Added support for openSUSE 16.
- Added support for Alpine 3.22 and 3.23.
- Removed support for distro versions that reached end-of-life (Fedora 40 and 41; Alpine 3.18, 3.19, and 3.20).
- FFmpeg 8 compatibility (dropped use of removed avcodec_close API).
- Fixed crash in window manager triggered by null clipboard data during UTF-8 to Latin-1 conversion.
- Fixed bug where closing a secondary monitor would close the entire client connection.
- Fixed Kali Linux image build failures.
- Updated default STUN public IP behavior to avoid undesired external lookups.
- Improved client-side multi-monitor handling with a dedicated reference to the visible canvas.
- Bumped rollup to address security vulnerabilities.
- Updated French translations.
* Fri Apr 24 2026 KasmTech <info@kasmweb.com> - 1.4.2-1
- Fixed bug with server-side enforced idle-timeout.
* Mon Dec 01 2025 KasmTech <info@kasmweb.com> - 1.4.1-1
- Fixed bug with enforcement of server-side idle-disconnect.
- Added support for graceful disconnect, allowing the client to auto-reconnect on a non-graceful disconnect and not when the server gracefully disconnects.
- Fixed display manager UI to work on touch screens.
* Fri Aug 01 2025 KasmTech <info@kasmweb.com> - 1.4.0-1
- Added new API call for retrieving active sessions.
- Added message propagation to clients other users connect or disconnect from the same session.
- Enhanced detection of physical cores vs virtual cores for better tuning of thread counts on multi-threaded processes.
- Significant enhancements of multi-threading performance.
- Upgraded libwebp library to 1.5.0.
- Updated to C++ 20 standard.
- Added network.udp.payload_size to kasm yaml configuration.
- Added build for Debian Trixie.
- Refactor of code to decrease memory usage on client browsers.
- Added support for the Keyboard API for Chromium browsers.
- Added multi-threaded asynchronous decoding of image rects, increasing client side performance.
- Fixed bug with watermark not getting displayed in certain scenarios.
- Fixed bug with case sensitivity of HTTP headers
- Fixed bug with the downloads API not escaping certain characters in returned json.
- Fixed bug causing a segmentation fault on the get_screenshot API handler in certain conditions.
- Bug fixes with multi-monitor, adding and removing displays
- Fix bug with secondary display still showing content after session disconnect in certain scenarios.
- Fixed bug with Ctrl key not working on foreign language keyboards with Chromium based browsers.
- Fix bug with secondary display interaction not counting toward interaction with respect to the idle disconnect setting.
- Fixed memory leak in Firefox.
- Fixed bug with Firefox displaying scrollbars at odd resolutions.
- Fixes to Korean translations.
- Multiple fixes to IME foreign language support.
- Fixed a race condition causing an error message to be displayed erroneously on the client.
* Thu Mar 20 2025 KasmTech <info@kasmweb.com> - 1.3.4-1
- Add configuration key network.udp.payload_size.
- Remove support for distro versions that reached end-of-life.

View file

@ -44,6 +44,9 @@ keyboard:
# Mouse, trackpad, etc.
pointer:
enabled: true
# Force all clients into game mode (direct-drive relative mouse) on connect.
# Useful for game-focused workspace images where pointer lock is always desired.
game_mode: false
runtime_configuration:
allow_client_to_override_kasm_server_settings: true

View file

@ -1563,6 +1563,15 @@ sub DefineConfigToCLIConversion {
})
]
}),
KasmVNC::CliOption->new({
name => 'ForceGameMode',
configKeys => [
KasmVNC::ConfigKey->new({
name => "pointer.game_mode",
type => KasmVNC::ConfigKey::BOOLEAN
})
]
}),
KasmVNC::CliOption->new({
name => 'Log',
configKeys => [

View file

@ -500,23 +500,70 @@ void XserverDesktop::approveConnection(uint32_t opaqueId, bool accept,
//
// SDesktop callbacks
void XserverDesktop::pointerEvent(const Point& pos, const Point& abspos, int buttonMask,
void XserverDesktop::pointerEvent(const Point& pos, int buttonMask,
const bool skipClick, const bool skipRelease, int scrollX, int scrollY)
{
if (scrollX == 0 && scrollY == 0) {
if (pos.equals(abspos)) {
vncPointerMove(pos.x + vncGetScreenX(screenIndex), pos.y + vncGetScreenY(screenIndex));
} else {
vncPointerMoveRelative(pos.x, pos.y,
abspos.x + vncGetScreenX(screenIndex),
abspos.y + vncGetScreenY(screenIndex));
}
vncPointerMove(pos.x + vncGetScreenX(screenIndex), pos.y + vncGetScreenY(screenIndex));
vncPointerButtonAction(buttonMask, skipClick, skipRelease);
} else {
vncScroll(scrollX, scrollY);
}
}
void XserverDesktop::directMouseEvent(int dx, int dy, int buttonMask,
int scrollX, int scrollY)
{
directMouseEventWithPosition(dx, dy, buttonMask, scrollX, scrollY);
}
rfb::Point XserverDesktop::directMouseEventWithPosition(int dx, int dy,
int buttonMask, int scrollX, int scrollY)
{
// Move the X11 cursor via XTest (relative injection).
// buttonMask uses standard VNC convention (bit 0=left, 1=middle, 2=right)
// which matches X11 button numbering directly, so no remapping is needed.
int cursorX, cursorY;
vncGetPointerPos(&cursorX, &cursorY);
if (scrollX == 0 && scrollY == 0) {
const int screenX = vncGetScreenX(screenIndex);
const int screenY = vncGetScreenY(screenIndex);
const int maxX = screenX + width() - 1;
const int maxY = screenY + height() - 1;
cursorX += dx;
cursorY += dy;
if (cursorX < screenX)
cursorX = screenX;
else if (cursorX > maxX)
cursorX = maxX;
if (cursorY < screenY)
cursorY = screenY;
else if (cursorY > maxY)
cursorY = maxY;
vncPointerMoveRelative(dx, dy, cursorX, cursorY);
bool skipclick = false, skiprelease = false;
server->getDLPRegionSkipFlags(rfb::Point(cursorX - screenX,
cursorY - screenY),
skipclick, skiprelease);
vncPointerButtonAction(buttonMask, skipclick, skiprelease);
} else {
vncScroll(scrollX, scrollY);
}
rfb::Point cursorPos(cursorX - vncGetScreenX(screenIndex),
cursorY - vncGetScreenY(screenIndex));
oldCursorPos = cursorPos;
server->setCursorPos(cursorPos, false);
return cursorPos;
}
unsigned int XserverDesktop::setScreenLayout(int fb_width, int fb_height,
const rfb::ScreenSet& layout)
{

View file

@ -95,8 +95,10 @@ public:
const char* rejectMsg=0);
// rfb::SDesktop callbacks
virtual void pointerEvent(const rfb::Point& pos, const rfb::Point& abspos, int buttonMask,
virtual void pointerEvent(const rfb::Point& pos, int buttonMask,
const bool skipClick, const bool skipRelease, int scrollX = 0, int scrollY = 0);
virtual void directMouseEvent(int dx, int dy, int buttonMask, int scrollX, int scrollY);
virtual rfb::Point directMouseEventWithPosition(int dx, int dy, int buttonMask, int scrollX, int scrollY);
virtual void keyEvent(rdr::U32 keysym, rdr::U32 keycode, bool down);
virtual unsigned int setScreenLayout(int fb_width, int fb_height,
const rfb::ScreenSet& layout);

View file

@ -95,8 +95,8 @@ from the X Consortium.
#undef VENDOR_STRING
#include "version-config.h"
#define XVNCVERSION "KasmVNC 1.3.4"
#define XVNCCOPYRIGHT ("Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)\n" \
#define XVNCVERSION "KasmVNC 1.5.0"
#define XVNCCOPYRIGHT ("Copyright (C) 1999-2026 KasmVNC Team and many others (see README.me)\n" \
"See http://kasmweb.com for information on KasmVNC.\n")
#define VFB_DEFAULT_WIDTH 1024