安装tightvnc
apt update
apt install xfce4 xfce4-goodies
apt install tightvncserver
vncserver
出现时输入VNC密码:
You will require a password to access your desktops.
Password:
Verify:
然后出现以下信息:
Would you like to enter a view-only password (y/n)? n
xauth: file /home/sammy/.Xauthority does not exist
New 'X' desktop is your_hostname:1
Creating default startup script /home/sammy/.vnc/xstartup
Starting applications specified in /home/sammy/.vnc/xstartup
Log file is /home/sammy/.vnc/your_hostname:1.log
这时VNC已经安装完毕并运行,可以使用VNCViewer输入远端IP地址+ ':1'
日常操作:
启动VNC: vncserver
中止VNC: vncserver -kill :1