VNC is platform-independent --- a VNC viewer on one operating system may connect to a VNC server on the same or any other operating system. There are clients and servers for many GUI-based operating system and for Java. Multiple clients may connect to a VNC server at the same time. Popular uses for this technology include remote technical support and accessing files on one's work computer from one's home computer, or vice versa.
A VNC system consists of a client, a server, and a communication protocol:
- The VNC server is the program on the machine that shares its screen. The server passively allows the client to take control of it.
- The VNC client(or viewer) is the program that watches, controls, and interacts with the server. The client controls the server.
- The VNC protocol(RFB) is very simple, based on one graphic primitive from server to client("Put a rectangle of pixel data at the specified X,Y position") and event messages from client to server.
由于VNC系统是服务器-客户端模式的,所以先得在服务器(被控制的一方)上装上VNCserver,然后在客户端(主动控制的一方)上装上client(VNCviewer)。按照vncserver --help说明启动vncserver。服务器端有三个命令可以使用:vncconfig---配置命令,vncpasswd---设置client连接到服务器时需要的密码,vncserver启动一个server进程(对应一个Display No.),监听端口。
在服务器端的/root目录下会有个隐藏的文件夹.vnc,里面有加密过的密码文件passwd,每个vncserver进程的日志文件,以及配置文件xstartup。
服务器端启动vncserver后,即可在客户端启动vncviewer,在server一项中输入服务器的ip,后面跟一个:,以及一个Display No.,如果服务器端只启动了一个vncserver进程,那么就是1。然后直接回车,出现需要输入密码的登录框,输入服务器端设置的密码,然后直接回车即可。
没有评论:
发表评论