在Windows中使用noVNC

[MD]

准备工作

  1. 下载以下文件
  1. 解压的文件目录如下(仅作本例)
  • D:\noVNC
  • D:\noVNC\utils\websockify
  1. 进入D:\noVNC安装websockify

python setup.py install

  1. 启动TigerVNC

4.1 Options…\rightarrow Security \rightarrow

  • Standard VNC \rightarrow Configure \rightarrow 设置password

4.2 Options…\rightarrow Connections \rightarrowAccept contections on port:5901\rightarrow 应用

  1. cmdpowershell中输入

websockify 6080 127.0.0.1 5901 --web D:\noVNC

  1. 在浏览器访问http://127.0.0.1:6080

Windows 版本的frpc.ini

[common]
server_addr = 10.0.0.1
server_port = 1234
token = 123456

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 6080
remote_port = 7777

@echo off
rem 以隐藏窗口的方式运行 websockify
start "" /B websockify 6080 127.0.0.1:5901 --web D:\noVNC

rem 切换到 D:\frp 目录
cd /d D:\frp

rem 以隐藏窗口的方式运行 frpc.exe
start "" /B .\frpc.exe -c .\frpc.ini

exit    

在Oracle Linux 9 中使用 noVNC

[MD]
dnf group install "Server with GUI"

systemctl set-default graphical

reboot

sed '/^#WaylandEnable/s/^#//g' /etc/gdm/custom.conf

# VNCServer

dnf install -y tigervnc-server tigervnc-server-module

vncpasswd

restorecon -RFv $HOME/.vnc

echo ":1=$(whoami)"| sudo tee -a /etc/tigervnc/vncserver.users > /dev/null

systemctl daemon-reload

systemctl enable --now vncserver@:1.service

systemctl restart vncserver@:1.service

firewall-cmd --zone=public --add-service=vnc-server --permanent

firewall-cmd --reload

# noVNC

yum install git

wget https://github.com/novnc/noVNC/archive/refs/tags/v1.5.0.tar.gz

tar -zxvf v1.5.0.tar.gz

mv noVNC-1.5.0 noVNC

cd noVNC/utils

firewall-cmd --add-port=6080/tcp  --permanent

firewall-cmd --reload

vi /noVNC/utils/start.sh

# --start.sh 开始--
#!/bin/bash
/noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 6080 &
# --start.sh 结束--

chmod u+x /noVNC/utils/start.sh

vi /etc/systemd/system/novnc.service

# --novnc.service 开始--
[Unit]
Description= noVNC  Service(noVNC)
After=tigervnc.target

[Service]
# backend running
Type=forking

ExecStart=/noVNC/utils/start.sh
ExecStop=/bin/kill -9 $(ps -e | grep 'receive' | awk '{print $1}')
Restart=on-failure

[Install]
WantedBy=multi-user.target
# --novnc.service 结束--

systemctl daemon-reload

systemctl enable novnc.service

systemctl restart novnc.service

# 输入法

yum install ibus-libpinyin

# 重启系统,在Applications>>Settings>>Keybord>>input Source中有个加号点添加

# 搜索chinese(Intelligent Pinyin) 点Add