测试环境:

1、System version:redhat 6.5

2、client version:windows 10 、vnc viewer

配置步骤:

1、

[root@localhost ~]#yum -y install tigervnc-server

2、

[root@localhost ~]# vim /etc/sysconfig/vncservers //在配置文件中写入以下两行保存退出

VCNSERVERS="1:root"                      //如果有多个用户VNCSERVER="1:root 2:test"

VNCSERVERARGS[1]="-geometry 800x600 -nolisten tcp"

3、

[root@localhost ~]# vncpasswd

Password://输入密码

Verify://确认密码

[root@localhost ~]#

4、

[root@localhost ~]# vncserver 

xauth:  creating new authority file /root/.Xauthority


New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1


Creating default startup script /root/.vnc/xstartup

Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log


[root@localhost ~]#

5、

[root@localhost ~]#vim /root/.vnc/xstartup //在配置写入以下两行保存退出

exec /etc/X11/xinit/xinitrc

gnome-seesion &

6、

[root@localhost ~]#/etc/init.d/vncserver restart

[root@localhost ~]# /etc/init.d/vncserver restart

关闭 VNC 服务器:1:root                                    [确定]

正在启动 VNC 服务器:1:root 

New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1


Starting applications specified in /root/.vnc/xstartup

Log file is /root/.vnc/localhost.localdomain:1.log


                                                           [确定]

终端配置:

wKiom1itHJOSurQEAABnXTXxsfE226.png-wh_50

注意IP地址后面加上端口号。

点击OK输入密码即可

7、

登陆后窗口

wKiom1itbGnw6p-1AAgbydetyw8597.png-wh_50