要在Ubuntu系统上使用VNC Viewer连接VNC服务器,请按照以下步骤操作:
sudo apt-get update
sudo apt install xfce4 xfce4-goodies
sudo apt install tigervnc-standalone-server
vncpasswd
nano ~/.vnc/config
geometry=1920x1080
depth=24
localhost=no
alwaysshared=yes
保存并退出编辑器。
编辑VNC启动文件:
nano ~/.vnc/xstartup
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec startxfce4
保存并退出编辑器。
为VNC启动文件添加执行权限:
sudo chmod +x ~/.vnc/xstartup
vncserver :1
sudo ufw allow 5901/tcp
sudo ufw reload
192.168.1.100
。5901
(与VNC服务器配置中的端口号相对应)。通过以上步骤,您应该能够在Ubuntu系统上成功安装和配置VNC服务器,并使用VNC Viewer进行远程访问。