Create develop.md

This commit is contained in:
mmcclaskey 2021-11-01 11:25:01 -04:00 committed by GitHub
parent 0bd3813949
commit 66cf8fd53e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 0 deletions

30
docs/DEVELOP.md Normal file
View File

@ -0,0 +1,30 @@
# Overview
This fork of noVNC is designed to work with KasmVNC, which has an embedded web server. It will not work with other VNC servers and does not strictly follow the RFB protocol.
## Dev Environment Setup
Install KasmVNC or use a Kasm Workspaces container. Remove the installed www directory, clone the git repository, and finally modify the JS so that it runs directly without the webpack
```bash
cd /usr/share/kasmvnc
sudo rm -rf www
sudo git clone https://github.com/kasmtech/noVNC.git www
sudo chown -R user:user www
cd www
sed -i 's#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>#' vnc.html
sed -i 's#<!--link rel="stylesheet" href="app/styles/base.css">#<link rel="stylesheet" href="app/styles/base.css">#' vnc.html
sed -i 's#import "core-js/stable";#//import "core-js/stable";#' app/ui.js
sed -i 's#import "regenerator-runtime/runtime";#//import "regenerator-runtime/runtime";#' app/ui.js
```
Now connect to https://address/vnc.html, create a symlink if you need it to be index.html
## Before Commiting Changes
Undo the HTML/JS changes that allow you to run the code directly without the webpack.
```bash
cd /usr/share/kasmvnc/www
sed -i 's#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script>#<script type="module" crossorigin="use-credentials" src="app/ui.js"></script-->#' vnc.html
sed -i 's#<link rel="stylesheet" href="app/styles/base.css">#<!--link rel="stylesheet" href="app/styles/base.css">#' vnc.html
sed -i 's#//import "core-js/stable";#import "core-js/stable";#' app/ui.js
sed -i 's#//import "regenerator-runtime/runtime";#import "regenerator-runtime/runtime";#' app/ui.js
```