{
  "_id": "novnc-next",
  "maintainers": [
    {
      "email": "justin@verbwire.com",
      "name": "bojo.io"
    },
    {
      "email": "justin.bojarski@gmail.com",
      "name": "bojo-io"
    }
  ],
  "keywords": [
    "vnc",
    "rfb",
    "novnc",
    "websockify"
  ],
  "dist-tags": {
    "latest": "1.0.0"
  },
  "author": {
    "url": "https://github.com/Bojo-io",
    "name": "Justin Bojarski"
  },
  "_rev": "2-ee7c7ca184747ba2ec75a656bc904ad4",
  "description": "noVNC is a VNC client JavaScript library and application. This fork adds compatibility for environments like Next.js/SSR.",
  "readme": "# noVNC-next: A noVNC Fork for Next.js/SSR Compatibility\n\n**Maintainer:** Justin Bojarski ([@Bojo-io](https://github.com/Bojo-io))\n**Original Project:** [noVNC/noVNC](https://github.com/novnc/noVNC)\n**License:** [MPL-2.0](LICENSE.txt)\n\n---\n\n**Note:** This repository is a fork of the official `noVNC` library (`@novnc/novnc`).\n\n**Purpose of this fork:**\n\nThe primary goal of `novnc-next` is to provide compatibility with modern JavaScript frameworks like Next.js, specifically addressing issues that arise during Server-Side Rendering (SSR) or build-time execution.\n\n**Changes Made:**\n\nThe core modifications involve guarding access to browser-specific global objects (like `window`, `navigator`, `document`) within the library's internal modules (primarily `core/util/browser.js` and related files). This prevents errors such as `window is not defined` or `navigator is not defined` when the code is processed in a non-browser environment.\n\n**Usage in Next.js / SSR Environments:**\n\nWith these changes, you should be able to import and use `novnc-next` components or classes within your Next.js application without encountering the common SSR-related errors associated with the original library. Ensure that the component using `novnc-next` is still treated as a client-side component (e.g., using `\"use client\";` in Next.js App Router or dynamic imports if necessary), as the library fundamentally requires a browser environment to function.\n\n**Build Process (Required for Use):**\n\nThis fork requires a build step to generate distributable files. Run the following commands within this directory:\n\n```bash\nnpm install\nnpm run build # (Build script to be added)\n```\n\n**(Original README content follows below)**\n\n## noVNC: HTML VNC client library and application\n\n### Description\n\nnoVNC is both a HTML VNC client JavaScript library and an application built on\ntop of that library. noVNC runs well in any modern browser including mobile\nbrowsers (iOS and Android).\n\n**This `novnc-next` fork specifically adapts the library for easier use within modern web frameworks like Next.js.**\n\nMany companies, projects and products have integrated noVNC including\n[OpenStack](http://www.openstack.org),\n[OpenNebula](http://opennebula.org/),\n[LibVNCServer](http://libvncserver.sourceforge.net), and\n[ThinLinc](https://cendio.com/thinlinc). See\n[the Projects and companies wiki page](https://github.com/novnc/noVNC/wiki/Projects-and-companies-using-noVNC)\nfor a more complete list with additional info and links.\n\n### Table of contents\n\n- [News/help/contact](#newshelpcontact)\n- [Features](#features)\n- [Screenshots](#screenshots)\n- [Browser requirements](#browser-requirements)\n- [Server requirements](#server-requirements)\n- [Quick start (Library Usage)](#quick-start-library-usage)\n- [Installation from snap package](#installation-from-snap-package)\n- [Integration and deployment](#integration-and-deployment)\n- [Authors/Contributors](#authorscontributors)\n\n### News/help/contact\n\nThe project website is found at [novnc.com](http://novnc.com).\n\nIf you are a noVNC developer/integrator/user (or want to be) please join the\n[noVNC discussion group](https://groups.google.com/forum/?fromgroups#!forum/novnc).\n\nBugs and feature requests for the *original* noVNC project can be submitted via\nits [github issues](https://github.com/novnc/noVNC/issues). If you have questions\nabout using noVNC then please first use the\n[discussion group](https://groups.google.com/forum/?fromgroups#!forum/novnc).\nWe also have a [wiki](https://github.com/novnc/noVNC/wiki/) with lots of\nhelpful information.\n\n**For issues or questions specifically related to this `novnc-next` fork (e.g., SSR compatibility, build process), please use the [issue tracker for this repository](https://github.com/Bojo-io/novnc-next/issues).**\n\nIf you are looking for a place to start contributing to noVNC, a good place to\nstart would be the issues that are marked as\n[\"patchwelcome\"](https://github.com/novnc/noVNC/issues?labels=patchwelcome).\nPlease check our\n[contribution guide](https://github.com/novnc/noVNC/wiki/Contributing) though.\n\nIf you want to show appreciation for noVNC you could donate to a great non-\nprofits such as:\n[Compassion International](http://www.compassion.com/),\n[SIL](http://www.sil.org),\n[Habitat for Humanity](http://www.habitat.org),\n[Electronic Frontier Foundation](https://www.eff.org/),\n[Against Malaria Foundation](http://www.againstmalaria.com/),\n[Nothing But Nets](http://www.nothingbutnets.net/), etc.\n\n\n### Features\n\n* Supports all modern browsers including mobile (iOS, Android)\n* Supported authentication methods: none, classical VNC, RealVNC's\n  RSA-AES, Tight, VeNCrypt Plain, XVP, Apple's Diffie-Hellman,\n  UltraVNC's MSLogonII\n* Supported VNC encodings: raw, copyrect, rre, hextile, tight, tightPNG,\n  ZRLE, JPEG, Zlib, H.264\n* Supports scaling, clipping and resizing the desktop\n* Supports back & forward mouse buttons\n* Local cursor rendering\n* Clipboard copy/paste with full Unicode support\n* Translations\n* Touch gestures for emulating common mouse actions\n* Licensed mainly under the [MPL 2.0](http://www.mozilla.org/MPL/2.0/), see\n  [the license document](LICENSE.txt) for details\n\n### Screenshots\n\nRunning in Firefox before and after connecting:\n\n<img src=\"http://novnc.com/img/noVNC-1-login.png\" width=400>&nbsp;\n<img src=\"http://novnc.com/img/noVNC-3-connected.png\" width=400>\n\nSee more screenshots\n[here](http://novnc.com/screenshots.html).\n\n\n### Browser requirements\n\nnoVNC uses many modern web technologies so a formal requirement list is\nnot available. However these are the minimum versions we are currently\naware of:\n\n* Chrome 89, Firefox 89, Safari 15, Opera 75, Edge 89\n\n\n### Server requirements\n\nnoVNC follows the standard VNC protocol, but unlike other VNC clients it does\nrequire WebSockets support. Many servers include support (e.g.\n[x11vnc/libvncserver](http://libvncserver.sourceforge.net/),\n[QEMU](http://www.qemu.org/), and\n[MobileVNC](http://www.smartlab.at/mobilevnc/)), but for others you need to\nuse a WebSockets to TCP socket proxy. noVNC has a sister project\n[websockify](https://github.com/novnc/websockify) that provides a simple such\nproxy.\n\n\n### Quick Start (Library Usage)\n\n1.  **Install the package:**\n    ```bash\n    # Assuming published to npm:\n    npm install novnc-next\n    \n    # For local development (linking):\n    # In this repo's directory:\n    npm link\n    # In your consuming project's directory:\n    npm link novnc-next \n    ```\n    \n2.  **Import and use the `RFB` class:**\n\n    ```javascript\n    import RFB from 'novnc-next';\n\n    // Example usage within a client-side component or script\n    // Ensure this code runs only in the browser\n    let rfb;\n    const targetElement = document.getElementById('vnc-canvas'); // Your target canvas element\n    const websocketUrl = 'ws://your-vnc-websocket-proxy:6080/';\n\n    try {\n      rfb = new RFB(targetElement, websocketUrl, {\n        // RFB options (e.g., credentials, shared)\n        credentials: { password: 'your-vnc-password' },\n      });\n\n      // Add event listeners as needed\n      rfb.addEventListener('connect', () => {\n        console.log('VNC connected');\n      });\n      rfb.addEventListener('disconnect', (detail) => {\n        console.log('VNC disconnected:', detail);\n      });\n      rfb.addEventListener('credentialsrequired', () => {\n        const password = prompt(\"Password Required:\");\n        rfb.sendCredentials({ password: password });\n      });\n      \n      // Connect using rfb.connect() if not done automatically\n      // Manage rfb instance lifecycle (e.g., rfb.disconnect() on component unmount)\n      \n    } catch (exc) {\n      console.error('Unable to create RFB client', exc);\n    }\n    ```\n    \n    See the [Library Usage Guide](docs/LIBRARY.md) for more detailed API information.\n\n3.  **(Optional) Testing with included viewer:**\n    You can still use the included `vnc.html` page for quick testing. First, start a VNC server and the `websockify` proxy:\n    ```bash\n    # Example: Start websockify proxy for a VNC server running on localhost:5900\n    websockify 6080 localhost:5900\n    ```\n    Then, serve the `novnc-next` directory using any simple web server and open `vnc.html` in your browser.\n\n### Installation from snap package\nRunning the command below will install the latest release of noVNC from snap:\n\n`sudo snap install novnc`\n\n#### Running noVNC from snap directly\n\nYou can run the snap package installed novnc directly with, for example:\n\n`novnc --listen 6081 --vnc localhost:5901 # /snap/bin/novnc if /snap/bin is not in your PATH`\n\nIf you want to use certificate files, due to standard snap confinement restrictions you need to have them in the /home/\\<user\\>/snap/novnc/current/ directory. If your username is jsmith an example command would be:\n  \n  `novnc --listen 8443 --cert ~jsmith/snap/novnc/current/self.crt --key ~jsmith/snap/novnc/current/self.key --vnc ubuntu.example.com:5901`\n\n#### Running noVNC from snap as a service (daemon)\nThe snap package also has the capability to run a 'novnc' service which can be\nconfigured to listen on multiple ports connecting to multiple VNC servers \n(effectively a service running multiple instances of novnc).\nInstructions (with example values):\n\nList current services (out-of-box this will be blank):\n\n```\nsudo snap get novnc services\nKey             Value\nservices.n6080  {...}\nservices.n6081  {...}\n```\n\nCreate a new service that listens on port 6082 and connects to the VNC server \nrunning on port 5902 on localhost:\n\n`sudo snap set novnc services.n6082.listen=6082 services.n6082.vnc=localhost:5902`\n\n(Any services you define with 'snap set' will be automatically started)\nNote that the name of the service, 'n6082' in this example, can be anything \nas long as it doesn't start with a number or contain spaces/special characters.\n\nView the configuration of the service just created:\n\n```\nsudo snap get novnc services.n6082\nKey                    Value\nservices.n6082.listen  6082\nservices.n6082.vnc     localhost:5902\n```\n\nDisable a service (note that because of a limitation in snap it's currently not\npossible to unset config variables, setting them to blank values is the way \nto disable a service):\n\n`sudo snap set novnc services.n6082.listen='' services.n6082.vnc=''`\n\n(Any services you set to blank with 'snap set' like this will be automatically stopped)\n\nVerify that the service is disabled (blank values):\n\n```\nsudo snap get novnc services.n6082\nKey                    Value\nservices.n6082.listen  \nservices.n6082.vnc\n```\n\n### Integration and deployment\n\nPlease see our other documents for how to integrate noVNC in your own software,\nor deploying the noVNC application in production environments:\n\n* [Embedding](docs/EMBEDDING.md) - For the noVNC application\n* [Library](docs/LIBRARY.md) - For the noVNC JavaScript library\n\n\n### Authors/Contributors\n\nSee [AUTHORS](AUTHORS) for a (full-ish) list of authors.  If you're not on\nthat list and you think you should be, feel free to send a PR to fix that.\n\n* novnc-next / @novnc/novnc fork team:\n    * [Justin Bojarski](https://github.com/Bojo-io)\n\n* @novnc/novnc core team:\n    * [Samuel Mannehed](https://github.com/samhed) (Cendio)\n    * [Pierre Ossman](https://github.com/CendioOssman) (Cendio)\n\n* Previous @novnc/novnc core contributors:\n    * [Joel Martin](https://github.com/kanaka) (Project founder)\n    * [Solly Ross](https://github.com/DirectXMan12) (Red Hat / OpenStack)\n\n* Notable @novnc/novnc contributions:\n    * UI and icons : Pierre Ossman, Chris Gordon\n    * Original logo : Michael Sersen\n    * tight encoding : Michael Tinglof (Mercuri.ca)\n    * RealVNC RSA AES authentication : USTC Vlab Team\n\n* Included libraries:\n    * base64 : Martijn Pieters (Digital Creations 2), Samuel Sieb (sieb.net)\n    * DES : Dave Zimmerman (Widget Workshop), Jef Poskanzer (ACME Labs)\n    * Pako : Vitaly Puzrin (https://github.com/nodeca/pako)\n\nDo you want to be on this list? Check out our\n[contribution guide](https://github.com/novnc/noVNC/wiki/Contributing) and\nstart hacking!\n",
  "repository": {
    "url": "git+https://github.com/Bojo-io/novnc-next.git",
    "type": "git"
  },
  "bugs": {
    "url": "https://github.com/Bojo-io/novnc-next/issues"
  },
  "license": "MPL-2.0",
  "versions": {
    "1.0.0": {
      "name": "novnc-next",
      "version": "1.0.0",
      "keywords": [
        "vnc",
        "rfb",
        "novnc",
        "websockify"
      ],
      "author": {
        "url": "https://github.com/Bojo-io",
        "name": "Justin Bojarski"
      },
      "license": "MPL-2.0",
      "_id": "novnc-next@1.0.0",
      "maintainers": [
        {
          "name": "bojo-io",
          "email": "justin.bojarski@gmail.com"
        }
      ],
      "contributors": [
        {
          "url": "https://github.com/samhed",
          "name": "Samuel Mannehed",
          "email": "samuel@cendio.se"
        },
        {
          "url": "https://github.com/CendioOssman",
          "name": "Pierre Ossman",
          "email": "ossman@cendio.se"
        }
      ],
      "homepage": "https://github.com/Bojo-io/novnc-next#readme",
      "bugs": {
        "url": "https://github.com/Bojo-io/novnc-next/issues"
      },
      "dist": {
        "shasum": "e13a0d47bd5e68317bfc6af0b22fcc9a8643f010",
        "tarball": "https://archive.ito.gov.ir/npm/_packages/novnc-next/-/novnc-next-1.0.0.tgz",
        "fileCount": 70,
        "integrity": "sha512-dQTNBHE+RxvljS/wVwqKOsYVBnx4Zqrp11wOJuH88jJCeDal3mT3DJeTAx1nKebUBcop5lM7ZXIs1OQCT98Ocw==",
        "signatures": [
          {
            "sig": "MEUCIQDJezRLc6xJAdu4kzXs/0GbTXkTzyB/6sNvr0q0DdH1LAIgEc9d+tA4yUeSj7BRyDsMs2PEnzvDYpC6n8pfpzBH1Tk=",
            "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
          }
        ],
        "unpackedSize": 4198891
      },
      "main": "lib/index.cjs.js",
      "module": "lib/index.esm.js",
      "browser": "lib/rfb",
      "exports": {
        ".": {
          "import": "./lib/index.esm.js",
          "require": "./lib/index.cjs.js"
        },
        "./package.json": "./package.json"
      },
      "gitHead": "ff5cf7b8798b7697f8a73126a2cca16d1e90c979",
      "scripts": {
        "lint": "eslint app core utils",
        "build": "rollup -c",
        "prepublishOnly": "npm run build"
      },
      "_npmUser": {
        "name": "bojo-io",
        "email": "justin.bojarski@gmail.com"
      },
      "repository": {
        "url": "git+https://github.com/Bojo-io/novnc-next.git",
        "type": "git"
      },
      "_npmVersion": "8.19.4",
      "description": "noVNC is a VNC client JavaScript library and application. This fork adds compatibility for environments like Next.js/SSR.",
      "directories": {
        "doc": "docs",
        "lib": "lib",
        "test": "tests"
      },
      "_nodeVersion": "18.19.1",
      "dependencies": {
        "@babel/runtime": "^7.24.7"
      },
      "_hasShrinkwrap": false,
      "devDependencies": {
        "less": "latest",
        "eslint": "latest",
        "pofile": "latest",
        "rollup": "^4.18.0",
        "@babel/core": "latest",
        "@babel/preset-env": "latest",
        "@rollup/plugin-babel": "^6.0.4",
        "eslint-plugin-import": "latest",
        "@rollup/plugin-commonjs": "^25.0.8",
        "@rollup/plugin-node-resolve": "^15.2.3",
        "@babel/plugin-transform-runtime": "^7.24.7"
      },
      "_npmOperationalInternal": {
        "tmp": "tmp/novnc-next_1.0.0_1745862768818_0.5112019375056893",
        "host": "s3://npm-registry-packages-npm-production"
      }
    }
  },
  "name": "novnc-next",
  "time": {
    "created": "2025-04-28T17:52:48.817Z",
    "modified": "2026-06-27T10:49:44.979Z",
    "1.0.0": "2025-04-28T17:52:49.061Z"
  },
  "contributors": [
    {
      "url": "https://github.com/samhed",
      "name": "Samuel Mannehed",
      "email": "samuel@cendio.se"
    },
    {
      "url": "https://github.com/CendioOssman",
      "name": "Pierre Ossman",
      "email": "ossman@cendio.se"
    }
  ],
  "readmeFilename": "README.md",
  "homepage": "https://github.com/Bojo-io/novnc-next#readme"
}