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

RealVNC有两种模式

  • virtual模式:该模式允许所有非Root权限用户连接服务器桌面(用户与用户间的桌面相互独立、多个VNC Viewer可以使用相同用户名连接相同的桌面),在使用VNC Viewer连接时需要输入虚拟端口号
  • x11模式:该模式只允许具有Root权限的用户登录,相当于镜像了服务器的外接显示器,在使用VNC Viewer连接时不需要输入端口号(默认使用5900)
  • 两种模式既可以单独运行,也可以同时运行

VNC远程_vncserver7.13注册码-CSDN博客

Linux 配置RealVNC远程访问 – 博涵 – 博客园

作者 huntersong

沪ICP备2021012984号