准备环境
centos 7.3 图形化虚拟机
[root@localhost ~]# yum -y install tigervnc tigervnc-server
添加桌面
[root@localhost ~]# vncserver //密码不低于6位
[root@localhost ~]# 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 ~]# vncserver :2 //出现以下内容
A VNC server is already running as :2
Warning: localhost:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server localhost:1
New 'localhost:3 (root)' desktop is localhost:3
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:3.log
windows下载vnc并打开
成功!
版权声明:本文为CSDN_19_Ly原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。