45fan.com - 路饭网

搜索: 您的位置主页 > 电脑频道 > 电脑教程 > 阅读资讯:Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

2016-09-08 17:15:53 来源:www.45fan.com 【

Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

转载请注明出处:http://blog.csdn.net/guoyjoe/article/details/20647553

1、配置安装VNC

[root@guodb2 Disk1]# yum install vnc*

[root@uubee8 yum.repos.d]# yum install tigervnc tigervnc-server -y #在CentOS下安装VNC包

 

 

2、设VNC密码
[root@guodb2 Disk1]# vncserver


You will require a password to access your desktops.


Password:
Verify:


New 'guodb2:1 (root)' desktop is guodb2:1


Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


3、重新启动VNC服务
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server: [ OK ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: no displays configured [ OK ]

4、登录报错如下

Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

 

5、查VNC端口
[root@guodb2 Disk1]# netstat -tupln |grep vnc
tcp 0 0 0.0.0.0:6001 0.0.0.0:* LISTEN 9748/Xvnc
tcp 0 0 0.0.0.0:5801 0.0.0.0:* LISTEN 9748/Xvnc

tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN 9748/Xvnc

 

6、从上面可以看出0号端号被占用了,用1号端号登录

Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

 

7、正常登录VNC,但图形界面显示如下
Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍

 

 

8、修改VNC配置文件,注释原来的两行,添加最后两行
[root@guodb2 Disk1]# vi /etc/sysconfig/vncservers
# VNCSERVERS="2:myusername"
# VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

VNCSERVERS="1:root"
VNCSERVERARGS[1]="-geometry 1400x750 -nolisten tcp "


9、修改图形界面,全部注释掉,添加最后一行
[root@guodb1 yum.repos.d]# vi /root/.vnc/xstartup
#!/bin/sh


# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc


#[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
#[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
#xsetroot -solid grey
#vncconfig -iconic &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &


10、重启VNC服务
[root@guodb2 Disk1]# service vncserver stop
Shutting down VNC server: 1:root [ OK ]
[root@guodb2 Disk1]# service vncserver start
Starting VNC server: 1:root xauth: creating new authority file /root/.Xauthority


New 'guodb2:1 (root)' desktop is guodb2:1


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/guodb2:1.log


[ OK ]


11、正常登录,并正常显示图形界面

Win7 VNC客户端连接RedHat Linux AS 5.8的配置参数介绍




 

本文地址:http://www.45fan.com/dnjc/73723.html
Tags: Win7 客户端 VNC
编辑:路饭网
关于我们 | 联系我们 | 友情链接 | 网站地图 | Sitemap | App | 返回顶部