sudo -i
输入密码
2 联网下载VNC Server安装包
wget https://downloads.realvnc.com/download/file/vnc.files/VNC-Server-6.11.0-Linux-x64.deb
3 解压安装
dpkg -i VNC-Server-6.11.0-Linux-x64.deb
4 密钥(失效的话可以上网搜下其他的)
sudo
vnclicense -add HHJRK-UXY7V-Q34H9-CZU8L-8KGFA
或者
vnclicense -add WHJRK-UXY7V-Q34M9-CZU8L-8KGFA
5
apt install xserver-xorg-video-dummy
6
vncinitconfig -enable-system-xorg
一路yes
7
systemctl enable vncserver-virtuald.service
systemctl start vncserver-virtuald.service
systemctl status vncserver-virtuald.service
打不开的话用下面命令修复
sudoedit /etc/gdm3/custom.conf
取消对以下行的注释,以强制登录屏幕使用 Xorg。
WaylandEnable=false# 是的,该文件中的这一行。
sudo systemctl restart gdm3# 将 KIll you session.在运行此命令之前保存所有内容

若不能修改端口:“”Unable to configure options for RealVNC Server.

This requires superuser access when running in service mode as the
changes will affect all users of this system. Either you do not have a
suitable method configured to gain superuser privileges (e.g. sudo),
you are not authorised to do this, or you supplied invalid credentials.””

使用下面命令:sudo apt install xterm

作者 huntersong

沪ICP备2021012984号