How to set up remote control from Windows 7 to CentOS 5.5

1.确认安装VNCSERVER(CentOS下)
输入命令:rpm -qa |grep vnc
如果有返回,刚安装,否则则没有安装

2.开始配置vncserver:
管理员:
[root@localhost/]# vncserver
password:123456
verify:  123456

普通用户:
[root@localhost/]# su admin
[root@localhost/]# vncserver
password:123456
verify:  123456

启动vncserver:
[root@localhost/]# vncserver :2

3.修改桌面相关配置:
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 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &

gnome-session gnome

twm &
设置分辨率:
vi /etc/sysconfig/vncservers
添加如下信息:
VNCSERVERS=”1:root 2:admin”
VNCSERVERARGS[1]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”
VNCSERVERARGS[2]=”-geometry 800×600 -nolisten tcp -nohttpd -localhost”

4.在windows下安装vnc客户端(相同版本的)
5.打开客户端输入:vncserveripaddress:2
回车再输入密码,就可以连接上了

6.如果要修改vcn密码:
vncpasswd

______________________________________________________________for Fedora 14

Hey wilbrik, here is the commands you need to put into your /etc/sysconfig/iptables file

-A INPUT -p tcp -m tcp –dport 5900 -j ACCEPT
-A INPUT -p udp -m udp –dport 5900 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 5901 -j ACCEPT
-A INPUT -p udp -m udp –dport 5901 -j ACCEPT

Then you have to execute this command
iptables-restore < /etc/sysconfig/iptables

http://stevejenkins.com/blog/2010/11/how-to-set-up-vnc-from-windows-to-fedora-14-over-the-internet/

http://wiki.centos.org/HowTos/VNC-Server

http://forums.fedoraforum.org/showthread.php?t=258309

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s