需要安装vnc server和配置 novnc环境
使用 tigervnc
访问 https://sourceforge.net/projects/tigervnc/files/stable/1.13.1/
下载 tigervnc64-winvnc-1.13.1.exe
点击Properties

点击Connections, 可以看到端口号为5900

git clone https://github.com/novnc/websockify-js.git
cd websockify-js\websockify
pnpm installgit clone https://github.com/novnc/noVNC.git把noVNC目录中的vnc.html改为index.html方便后面使用
需要下载openssl, 并把bin目录配置到环境变量中
然后生成证书
openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem
添加启动命令
{
"scripts": {
"start": "node websockify.js --cert=self.pem --key=self.pem --web ./noVNC 5901 0.0.0.0:5900"
}
}pnpm start
在控制机上浏览器访问https//被控机ip:5901

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。