环境:图形化Centos7.3
yum安装vnc
[root@localhost yum.repos.d]# yum -y install tigervnc tigervnc-server
添加桌面
[root@localhost yum.repos.d]# vncserver
New 'localhost:1 (root)' desktop is localhost:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log
修改配置文件
[root@localhost yum.repos.d]# vim /root/.vnc/xstartup
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title “$VNCDESKTOP Desktop” &
gnome-session &
开启
[root@localhost yum.repos.d]# vncserver :1
A VNC server is already running as :1
New 'localhost:2 (root)' desktop is localhost:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:2.log
windows下载vnc并安装打开
成功!