linux桌面配置novnc通过web访问

vnc安装配置

vnc安装

1
2
3
4
#ubuntu
sudo apt install xserver-xorg-core tigervnc-standalone-server tigervnc-common tigervnc-xorg-extension tigervnc-viewer
#centos
yum install -y tigervnc-server tigervnc

启动

1
2
3
4
5
6
7
#启动
vncserver :1
#结束
vncserver -kill :1
#查看
vncerver -list

novnc安装配置

1
2
3
4
5
6
7
git clone https://github.com/novnc/noVNC.git
cd noVNC/utils
./novnc_proxy --vnc localhost:5901 #vnc的连接端口

#访问:
http://$ip:6080/vnc.html