Vnc viewer Linux远程连接

测试环境:

1、System version:redhat 6.5

2、client version:windows 10 、vnc viewer

配置步骤:

1、

[[email protected] ~]#yum -y install tigervnc-server

2、

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

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

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

3、

[[email protected] ~]# vncpasswd

Password://输入密码

Verify://确认密码

[[email protected] ~]#

4、

[[email protected] ~]# 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


[[email protected] ~]#

5、

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

exec /etc/X11/xinit/xinitrc

gnome-seesion &

6、

[[email protected] ~]#/etc/init.d/vncserver restart

[[email protected] ~]# /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


                                                           [确定]

终端配置:

Vnc viewer Linux远程连接

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

点击OK输入密码即可

7、

登陆后窗口

Vnc viewer Linux远程连接



本文转自 gswljy 51CTO博客,原文链接:http://blog.51cto.com/guoshiwei/1900180