加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

远程控制程序--VNC

(2007-01-08 22:14:50)
分类: 技术文章
跨平台性,使用VNC,你可以在windows上看到macos桌面,也可以在linux上看到windows桌面,是不是很神奇呢?本人才疏学浅,旧让我们一起来研究一下吧!
一.What is VNC?
VNC stands for Virtual Network Computing. It is remote control software which allows you to view and interact with one computer (the "server") using a simple program (the "viewer") on another computer anywhere on the Internet. The two computers don't even have to be the same type, so for example you can use VNC to view an office Linux machine on your Windows PC at home. VNC is freely and publicly available and is in widespread active use by millions throughout industry, academia and privately.
翻译:VNC是虚拟网络计算的意思,它是一种允许你使用一个简单的程序--viewer,在internet上的任何地方对另一台计算机-- server,进行查看和操作的软件,这两台计算机不必是一样的类型,例如:你能使用vnc在你家中的windows系统查看在你办公室中的linux系统.VNC被数以百万记的人应用,包括工业,产业,学术,以及私人.

二.如何获得VNC?
http://www.realvnc.com/download.html
里面windows,linux,solaris,HP-UX的server端和viewer端,根据你的需求下载.

三.vnc的安装:
windows的安装就不说了,极为傻瓜式,这里着重说的是linux系统下vnc的安装.
1.vnc server的安装:
如果你下载的是rpm的安装包,那么命令如下:
rpm -ivh vnc-4_1_2-x86_linux.rpm

2.vnc viewer的安装:
tar -zxvf vnc-4_1_2-unixsrc.tar.gz
cd vnc
./configure
make
make install

四.vnc的基本使用:
root用户和普通用户都可以启动vnc服务器,哪个用户启动的vnc服务器,客户端连接后就看到哪个用户的桌面,不同用户可以启动各自的VNC server,他们是依靠显示码来区别的.
1.vnc server的命令包括:
vncserver  //vnc服务器的启动脚本
xvnc       //真正的vnc服务器程序
vncpasswd   //VNC服务器口令设置程序
vncconnect   //vnc反向连接命令
2.vnc服务器的启动:
[linux-fox@FC4 ~]$ vncserver
You will require a password to access your desktops.  //第一次启动需要设置vnc server密码
Password:         //输入密码
Verify:          //重新输入密码
New 'FC4:1 (linux-fox)' desktop is FC4:1
Creating default startup script /home/linux-fox/.vnc/xstartup
Starting applications specified in /home/linux-fox/.vnc/xstartup
Log file is /home/linux-fox/.vnc/FC4:1.log

[linux-fox@FC4 ~]$ ps -ef|grep vnc
500       3079     1 11 11:32 pts/1    00:00:11 Xvnc :1 -desktop FC4:1 (linux-fox) -httpd /usr/share/vnc/classes -auth /home/linux-fox/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /home/linux-fox/.vnc/passwd -rfbport 5901 -pn
500       3083      0 11:32 pts/1    00:00:00 vncconfig -iconic
500       3125  2610  0 11:34 pts/1    00:00:00 grep vnc
// vncserver是vnc的服务器起动脚本,真正的vnc服务器程序是xvnc

3.vnc服务器的停止:
使用vnccserver -kill命令来停止vnc服务器.
vncserver -kill :1
// :1 是vnc服务器占用的显示端口号

4.vnc viewer连接vnc服务器:
windows下的连接就不说了,linux下的操作方法是:
vncviewer ip:displayer port
//例如:vncviewer 192.168.10.6:1

5.vnc server密码的修改:
使用vncpasswd命令.

五.vnc使用小技巧.
1.启动vnc server的时候,指定显示端口号:
vncserver :displayer port
2.修改服务器的分辨率:
例如:vncserver -genometry  800x600
3.设置服务器的颜色深度:
vncserver -depth 16   //16位色
4.保持现有连接,不加入新连接:
vncserver -dontconnect
5.共享连接:
vncserver -alwaysshared
6.全屏显示:
vncviewer -fullscreen
7.设置客户机以查看方式运行:
vncviewer -viewonly   //可实现简单的视频会议
8.vnc的反向连接:
首先,设置vncviewer以监听模式运行:
vncviewer -listen
然后在服务端执行:
vncconnect -display:displayer port ip
//例如:vncconnect -displayer :1 192.168.1.36

以上部分内容参考自网路,本文档以GPL方式发放,欢迎转载,转载时请注名出处.
                                                                      ----linux-fox
                                                                            2006/06/19

附:VNC工作示意图:

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有