Convert Figma logo to code with AI

kasmtech logoKasmVNC

Modern VNC Server and client, web based and secure

3,032
290
3,032
74

Top Related Projects

11,395

VNC client web application

High performance, multi-platform VNC client and server

10,779

FreeRDP is a free remote desktop protocol library and clients

5,585

xrdp: an open source RDP server

Quick Overview

KasmVNC is an open-source VNC server and client implementation based on TigerVNC. It's designed for use in containerized environments and includes features like multi-user support, web-based viewing, and enhanced security measures. KasmVNC is particularly well-suited for cloud-native applications and remote desktop solutions.

Pros

  • Enhanced security features, including SSL/TLS encryption and multi-factor authentication
  • Web-based client support, allowing for easy access through modern browsers
  • Optimized for containerized environments, making it ideal for cloud deployments
  • Multi-user support, enabling shared sessions and collaborative work

Cons

  • May require more setup and configuration compared to traditional VNC solutions
  • Performance might be slightly lower than native remote desktop protocols in some scenarios
  • Limited documentation for advanced configurations and customizations
  • Potential learning curve for users familiar with other VNC implementations

Getting Started

To get started with KasmVNC, follow these steps:

  1. Clone the repository:

    git clone https://github.com/kasmtech/KasmVNC.git
    
  2. Build the project:

    cd KasmVNC
    cmake -DCMAKE_BUILD_TYPE=Release .
    make
    
  3. Run the server:

    ./server/kasmvncserver
    
  4. Connect to the server using a VNC client or a web browser by navigating to https://your-server-ip:6901

For more detailed instructions and configuration options, refer to the project's documentation in the repository.

Competitor Comparisons

11,395

VNC client web application

Pros of noVNC

  • Pure HTML5/JavaScript implementation, requiring no plugins or additional software on the client-side
  • Broader compatibility with various VNC servers and protocols
  • Extensive documentation and active community support

Cons of noVNC

  • Generally lower performance compared to native VNC clients
  • Limited advanced features and customization options out-of-the-box

Code Comparison

noVNC (JavaScript):

var rfb = new RFB(document.getElementById('screen'), 'ws://example.com:5900');
rfb.scaleViewport = true;
rfb.resizeSession = true;

KasmVNC (C++):

rfbScreenInfoPtr rfbScreen = rfbGetScreen(&argc, argv, width, height, 8, 3, bpp);
rfbScreen->desktopName = "KasmVNC";
rfbScreen->frameBuffer = (char*)malloc(width * height * bpp);
rfbInitServer(rfbScreen);
rfbRunEventLoop(rfbScreen, -1, FALSE);

KasmVNC is a fork of TigerVNC with additional features and optimizations specifically designed for containerized environments. It offers better performance and more advanced features compared to noVNC, but requires server-side installation. noVNC, being a pure web-based solution, provides greater flexibility and ease of deployment at the cost of some performance and advanced functionality.

High performance, multi-platform VNC client and server

Pros of TigerVNC

  • Mature and well-established project with a long history
  • Supports a wide range of platforms and architectures
  • Lightweight and efficient, suitable for older hardware

Cons of TigerVNC

  • Less frequent updates and slower development cycle
  • Limited built-in security features compared to modern alternatives
  • Lacks some advanced features like browser-based access

Code Comparison

TigerVNC (C++):

rfb::Region2D updateRegion;
updateRegion.assign_union(damage);
viewer->addChanged(updateRegion);

KasmVNC (JavaScript):

const updateRegion = new Region();
updateRegion.union(damage);
this.viewer.addDirtyRect(updateRegion);

Both projects use similar concepts for handling screen updates, but KasmVNC's JavaScript implementation may be more accessible for web developers. TigerVNC's C++ code might offer better performance in some scenarios.

KasmVNC focuses on modern web technologies and containerization, while TigerVNC maintains a traditional VNC approach. KasmVNC provides enhanced security features and browser-based access out of the box, making it more suitable for cloud and web-centric deployments. TigerVNC, on the other hand, excels in compatibility and resource efficiency, particularly for local network or legacy system use cases.

10,779

FreeRDP is a free remote desktop protocol library and clients

Pros of FreeRDP

  • Supports a wider range of protocols, including RDP, RemoteFX, and X11
  • More extensive platform support, including Windows, macOS, iOS, and Android
  • Actively maintained with frequent updates and bug fixes

Cons of FreeRDP

  • Lacks built-in web-based access, requiring additional setup for remote access
  • May have a steeper learning curve for configuration and customization
  • Less focus on security features compared to KasmVNC

Code Comparison

KasmVNC (C++):

void VNCServerST::processClientMessages()
{
  std::vector<rdr::U8> data;
  for (Iterator i = clients.begin(); i != clients.end(); i++) {
    Client* client = *i;
    // Process client messages
  }
}

FreeRDP (C):

BOOL freerdp_connect(freerdp* instance)
{
    rdpRdp* rdp;
    BOOL status = FALSE;
    rdp = instance->context->rdp;
    // Establish RDP connection
    return status;
}

The code snippets show different approaches to handling client connections and messages. KasmVNC focuses on processing messages from multiple clients, while FreeRDP emphasizes establishing and managing RDP connections.

5,585

xrdp: an open source RDP server

Pros of xrdp

  • Wider compatibility with various RDP clients, including native Windows support
  • Lower bandwidth usage compared to VNC-based solutions
  • Better integration with Windows environments

Cons of xrdp

  • Generally lower performance and responsiveness compared to KasmVNC
  • Less focus on modern web-based access and containerization
  • More complex setup and configuration process

Code Comparison

xrdp (C):

static int
xrdp_mm_process_login_response(struct xrdp_mm *self, struct stream *s)
{
    int rv;
    int flags;
    char *lang;
    char *domain;
    char *program;
    char *directory;
    char *client_ip;

KasmVNC (C++):

void VNCServerST::processClientMsg(rdr::InStream& is)
{
  int msgType = is.readU8();
  switch (msgType) {
  case msgTypeSetPixelFormat:
    cl->setPixelFormat(is);
    break;
  case msgTypeSetEncodings:
    cl->setEncodings(is);

KasmVNC focuses on modern web-based remote access with enhanced security features and performance optimizations for containerized environments. xrdp offers broader compatibility with RDP clients but may have lower performance in some scenarios. KasmVNC's codebase appears more oriented towards web technologies, while xrdp's C implementation is geared towards traditional desktop environments.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

KasmVNC - Linux Web Remote Desktop

KasmVNC provides remote web-based access to a Desktop or application. While VNC is in the name, KasmVNC differs from other VNC variants such as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB specification which defines VNC, in order to support modern technologies and increase security. KasmVNC is accessed by users from any modern browser and does not support legacy VNC viewer applications. KasmVNC uses a modern YAML based configuration at the server and user level, allowing for ease of management.

Kasm Technologies developed Kasm Workspaces, the Containerized Streaming Platform. Kasm has open-sourced the Workspace docker images, which include containerized full desktops and apps and base images intended for developers to create customized streaming containers. These containers can be used standalone or within the Kasm Workspaces Platform which provides a full Enterprise feature set.

Documentation

Do not use the README from the master branch, unless you are compiling KasmVNC yourself from the tip of master. Use the documentation for your specific release.

For beta releases prior to version 1.0.0, use the README in this github project on the tagged commit for that release.

Installation

You must disconnect and reconnect to the server after installation, for the group membership to apply.

Debian/Ubuntu/Kali

# Please choose the package for your distro here (under Assets):
# https://github.com/kasmtech/KasmVNC/releases
wget <package_url>

sudo apt-get install ./kasmvncserver_*.deb

# Add your user to the ssl-cert group
sudo adduser $USER ssl-cert

Oracle 8

# Please choose the package for your distro here (under Assets):
# https://github.com/kasmtech/KasmVNC/releases
wget <package_url>

# Ensure KasmVNC dependencies are available
sudo dnf config-manager --set-enabled ol8_codeready_builder
sudo dnf install oracle-epel-release-el8

sudo dnf localinstall ./kasmvncserver_*.rpm

# Add your user to the kasmvnc-cert group
sudo usermod -a -G kasmvnc-cert $USER

CentOS 7

# Please choose the package for your distro here (under Assets):
# https://github.com/kasmtech/KasmVNC/releases
wget <package_url>

# Ensure KasmVNC dependencies are available
sudo yum install epel-release

sudo yum install ./kasmvncserver_*.rpm

# Add your user to the kasmvnc-cert group
sudo usermod -a -G kasmvnc-cert $USER

Getting Started

The following examples provide basic usage of KasmVNC with the tools provided. For full documentation on all the utilities and the runtime environment, see our KasmVNC Documentation

# Start a session and be guided to setup a user and select a default desktop environment
vncserver

# Start a session with the mate desktop environment
vncserver -select-de mate

# Add a new user with read/write permissions
vncpasswd -u my_username -w -r

# Tail the logs
tail -f ~/.vnc/*.log

# Get a list of current sessions with display IDs
vncserver -list

# Kill the VNC session with display ID :2
vncserver -kill :2

Configuration

KasmVNC is configured via YAML based configurations. The server level configuration is at /etc/kasmvnc/kasmvnc.yaml. Edits to this file apply to all users. Individual users can override server global configurations by specifying them in their configuration file at ~/.vnc/kasmvnc.yaml.

The following configuration shows all default settings. Many of the encoding settings can be overridden by the client, unless the runtime_configuration.allow_client_to_override_kasm_server_settings setting is set tot false. By default the client is allowed to modify encoding settings.

For a full description of each setting see the configuration reference.

desktop:
  resolution:
    width: 1024
    height: 768
  allow_resize: true
  pixel_depth: 24
  gpu:
    hw3d: false
    drinode: /dev/dri/renderD128

network:
  protocol: http
  interface: 0.0.0.0
  websocket_port: auto
  use_ipv4: true
  use_ipv6: true
  udp:
    public_ip: auto
    port: auto
    stun_server: auto
  ssl:
    pem_certificate: /etc/ssl/certs/ssl-cert-snakeoil.pem
    pem_key: /etc/ssl/private/ssl-cert-snakeoil.key
    require_ssl: true

user_session:
  new_session_disconnects_existing_exclusive_session: false
  concurrent_connections_prompt: false
  concurrent_connections_prompt_timeout: 10
  idle_timeout: never

keyboard:
  remap_keys:
  ignore_numlock: false
  raw_keyboard: false

pointer:
  enabled: true

runtime_configuration:
  allow_client_to_override_kasm_server_settings: true
  allow_override_standard_vnc_server_settings: true
  allow_override_list:
    - pointer.enabled
    - data_loss_prevention.clipboard.server_to_client.enabled
    - data_loss_prevention.clipboard.client_to_server.enabled
    - data_loss_prevention.clipboard.server_to_client.primary_clipboard_enabled

logging:
  log_writer_name: all
  log_dest: logfile
  level: 30

security:
  brute_force_protection:
    blacklist_threshold: 5
    blacklist_timeout: 10

data_loss_prevention:
  visible_region:
    # top: 10
    # left: 10
    # right: 40
    # bottom: 40
    concealed_region:
      allow_click_down: false
      allow_click_release: false
  clipboard:
    delay_between_operations: none
    allow_mimetypes:
      - chromium/x-web-custom-data
      - text/html
      - image/png
    server_to_client:
      enabled: true
      size: unlimited
      primary_clipboard_enabled: false
    client_to_server:
      enabled: true
      size: unlimited
  keyboard:
    enabled: true
    rate_limit: unlimited
  logging:
    level: off

encoding:
  max_frame_rate: 60
  full_frame_updates: none
  rect_encoding_mode:
    min_quality: 7
    max_quality: 8
    consider_lossless_quality: 10
    rectangle_compress_threads: auto

  video_encoding_mode:
    jpeg_quality: -1
    webp_quality: -1
    max_resolution:
      width: 1920
      height: 1080
    enter_video_encoding_mode:
      time_threshold: 5
      area_threshold: 45%
    exit_video_encoding_mode:
      time_threshold: 3
    logging:
      level: off
    scaling_algorithm: progressive_bilinear

  compare_framebuffer: auto
  zrle_zlib_level: auto
  hextile_improved_compression: true

server:
  http:
    headers:
      - Cross-Origin-Embedder-Policy=require-corp
      - Cross-Origin-Opener-Policy=same-origin
    httpd_directory: /usr/share/kasmvnc/www
  advanced:
    x_font_path: auto
    kasm_password_file: ${HOME}/.kasmpasswd
    x_authority_file: auto
  auto_shutdown:
    no_user_session_timeout: never
    active_user_session_timeout: never
    inactive_user_session_timeout: never

command_line:
  prompt: true

New Features!

  • Faster jpeg compression (via statically linked libjpeg-turbo)
  • Webp image compression for better bandwidth usage
  • Automatic mixing of webp and jpeg based on CPU availability on server
  • Multi-threaded image encoding for smoother frame rate for servers with more cores
  • WebRTC UDP Transit
  • Lossless QOI Image format for Local LAN
  • Full screen video detection, goes into configurable video mode for better full screen videoo playback performance.
  • Dynamic jpeg/webp image coompression quality settings based on screen change rates
  • Seemless clipboard support (on Chromium based browsers)
  • Binary clipboard support for text, images, and formatted text (on Chromium based browsers)
  • Allow client to set/change most configuration settings
  • Data Loss Prevention features
    • Key stroke logging
    • Clipboard logging
    • Max clipboard transfer size up and down
    • Min time between clipboard operations required
    • Keyboard input rate limit
    • Screen region selection
  • Deb packages for Debian, Ubuntu, and Kali Linux included in release.
  • RPM packages for CentOS, Oracle, OpenSUSE, Fedora. RPM packages are currently not updatable and not released, though you can build and install them. See build documentation.
  • Web API added for remotely controlling and getting information from KasmVNC
  • Multi-User support with permissions that can be changed via the API
  • Web UI uses a webpack for faster load times.
  • Network and CPU bottleneck statistics
  • Relative cursor support (game pointer mode)
  • Cursor lock
  • IME support for languages with extended characters
  • Better mobile support
  • DRI3 GPU acceleration with open source drivers (AMDGPU,Intel,ATI,ARM)

Future Goals:

  • H264 encoding

Compiling From Source

See the builder/README.md. We containerize our build systems to ensure highly repeatable builds.

License and Acknowledgements

See the LICENSE.TXT and ACKNOWLEDGEMENTS.md