VNC简介



VNC简介,VNC是什么?entos安装VNC-server实例教程。

VNC简介
网络遥控技术是指由一部计算机(主控端)去控制另一部计算机(被控端),而且当主控端在控制端时,就如同用户亲自坐在被控端前操作一样,可以执行被控端的应用程序,及使用被控端的系统资源。
VNC(Virtual Network Computing)是一套由AT&T实验室所开发的可操控远程的计算机的软件,其采用了授权条款,任何人都可免费取得该软件。VNC软件主要由两个部分组成:VNC server及VNC viewer。用户需先将VNC server安装在被控端的计算机上后,才能在主控端执行VNC viewer控制被控端。(在windows中也由一套著名的网络遥控软件――Symantec公司推出的pcAnywhere。VNC server与VNC viewer支持多种操作系统,如Unix系列(Unix,Linux,Solaris等),windows及MacOS,因此可将VNC server 及VNC viewer分别安装在不同的操作系统中进行控制。如果目前操作的主控端计算机没有安装VNC viewer,也可以通过一般的网页浏览器来控制被控端。
整个VNC运行的工作流程如下: ,
(1) VNC客户端通过浏览器或VNC Viewer连接至VNC Server。
(2) VNC Server传送一对话窗口至客户端,要求输入连接密码,以及存取的VNC Server显示装置。
(3)在客户端输入联机密码后,VNC Server验证客户端是否具有存取权限。
(4)若是客户端通过VNC Server的验证,客户端即要求VNC Server显示桌面环境。

一、Vnc-server端安装:
①方法一:
1.安装vnc-server
[root@test ~]# yum install vnc-server

2.配置vnc-server
[root@test ~]# vi /etc/sysconfig/vncservers

3.设置vnc密码

4.启动vnc-server服务

5.测试登陆

6.输入密码:

7.登陆成功

②.方法二
1.安装vnc-server
[root@test ~]# yum install vnc-server

2.通过默认方式配置

3.登陆测试


4.输入登陆密码:

5.登陆成功

二、多用户添加:
1. 在vnc-server配置文件中增加tiantian用户。

2. 创建tiantian用户的密码,并创建配置文件

3. 重新启动vncserver服务

4. 测试:

三、VNCserver一些配置参数:
[root@test .vnc]# /usr/bin/Xvnc –help
Unrecognized option: –help
use: X [:] [option]
-a # default pointer acceleration (factor)
-ac disable access control restrictions
-audit int set audit trail level
-auth file select authorization file
-br create root window with black background
+bs enable any backing store support
-bs disable any backing store support
-c turns off key-click
c # key-click volume (0-100)
-cc int default color visual class
-nocursor disable the cursor
-core generate core dump on fatal error
-dpi int screen resolution in dots per inch
-dpms disables VESA DPMS monitor control
-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs
-f # bell base (0-100)
-fc string cursor font
-fn string default font name
-fp string default font path
-help prints message with these options
-I ignore all remaining arguments
-ldint limit data space to N Kb
-lf int limit number of open files to N
-lsint limit stack space to N Kb
-logo enable logo in screen saver
nologo disable logo in screen saver
-nolistenstring don’t listen on protocol
-noreset don’t reset after last client exists
-nr create root window with no background
-reset reset after last client exists
-p # screen-saver pattern duration (minutes)
-pn accept failure to listen on all ports
-nopn reject failure to listen on all ports
-r turns off auto-repeat
r turns on auto-repeat
-render [default|mono|gray|color] set render color alloc policy
-retro start with classic stipple and cursor
-s # screen-saver timeout (minutes)
-t # default pointer threshold (pixels/t)
-terminate terminate at server reset
-to # connection time out
-tst disable testing extensions
ttyxx server started from init on /dev/ttyxx
v video blanking for screen-saver
-v screen-saver without video blanking
-wmWhenMapped default backing-store
-wr create root window with white background
-maxbigreqsize set maximal bigrequest size
-dumbSched Disable smart scheduling, enable old behavior
-schedIntervalint Set scheduler interval in msec
+extension name Enable extension
-extension name Disable extension
-query host-name contact named host for XDMCP
-broadcast broadcast for XDMCP
-multicast [addr [hops]] IPv6 multicast for XDMCP
-indirect host-name contact named host for indirect XDMCP
-port port-num UDP port number to send messages to
-from local-address specify the local address to connect from
-once Terminate server after one session
-class display-class specify display class to send in manage
-cookie xdm-auth-bits specify the magic cookie for XDMCP
-displayID display-id manufacturer display ID for request
[+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ]
enable/disableaccessx key sequences
-ardelay set XKB autorepeat delay
-arinterval set XKB autorepeat interval

XvncTigerVNC 1.0.90 – built Nov 12 2010 00:12:20
Copyright (C) 2002-2005 RealVNC Ltd.
Copyright (C) 2000-2006 ConstantinKaplinsky
Copyright (C) 2004-2009 Peter Astrand for Cendio AB
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 10707000, The X.Org Foundation

-screen scrnWxHxD set screen’s width, height, depth
-pixdepths list-of-int support given pixmap depths
+/-render turn on/off RENDER extension support(default on)
-linebias n adjust thin line pixelization
-blackpixel n pixel value for black
-whitepixel n pixel value for white
-shmem put framebuffers in shared memory
-geometry WxH set screen 0′s width, height
-depth D set screen 0′s depth
-pixelformatfmt set pixel format (rgbNNN or bgrNNN)
-inetd has been launched from inetd
-interface IP_address listen on specified interface

VNC parameters:

Parameters can be turned on with – or off with -=0
Parameters which take a value can be specified as -
Other valid forms are = -= –=
Parameter names are case-insensitive. The parameters are:

Global Parameters:
localhost – Only allow connections from localhost (default=0)
desktop – Name of VNC desktop (default=x11)
rfbport – TCP port to listen for RFB protocol (default=0)
rfbwait – Alias for ClientWaitTimeMillis
httpPort – TCP port to listen for HTTP (default=0)
httpd – Directory containing files to serve via HTTP (default=)
rfbauth – Alias for PasswordFile
QueryConnectTimeout – Number of seconds to show the Accept Connection dialog
before rejecting the connection (default=10)
AlwaysSetDeferUpdateTimer – Always reset the defer update timer on every
change (default=0)
DeferUpdate – Time in milliseconds to defer updates (default=1)
Log – Specifies which log output should be directed to which
target logger, and the level of output to log. Format is
::[, ...]. (default=)
QueryConnect – Prompt the local user to accept or reject incoming
connections. (default=0)
SendCutText – Send clipboard changes to clients. (default=1)
AcceptCutText – Accept clipboard updates from clients. (default=1)
AcceptPointerEvents – Accept pointer press and release events from clients.
(default=1)
AcceptKeyEvents – Accept key press and release events from clients.
(default=1)
DisconnectClients – Disconnect existing clients if an incoming connection is
non-shared. If combined with NeverShared then new
connections will be refused while there is a client active
(default=1)
NeverShared – Never treat incoming connections as shared, regardless of
the client-specified setting (default=0)
AlwaysShared – Always treat incoming connections as shared, regardless of
the client-specified setting (default=0)
Protocol3.3 – Always use protocol version 3.3 for backwards compatibility
with badly-behaved clients (default=0)
CompareFB – Perform pixel comparison on framebuffer to reduce
unnecessary updates (default=1)
ClientWaitTimeMillis – The number of milliseconds to wait for a client which
is no longer responding (default=20000)
MaxIdleTime – Terminate after s seconds of user inactivity (default=0)
MaxConnectionTime – Terminate when a client has been connected for s seconds
(default=0)
MaxDisconnectionTime – Terminate when no client has been connected for s
seconds (default=0)
IdleTimeout – The number of seconds after which an idle VNC connection
will be dropped (zero means no timeout) (default=0)
Password – Obfuscated binary encoding of the password which clients
must supply to access the server (default=)
PasswordFile – Password file for VNC authentication (default=)
ReverseSecurityTypes – Specify encryption scheme to use for reverse
connections (None) (default=None)
SecurityTypes – Specify which security scheme to use for incoming
connections (None, VncAuth) (default=VncAuth)
BlacklistTimeout – The initial timeout applied when a host is first
black-listed. The host cannot re-attempt a connection until
the timeout expires. (default=10)
BlacklistThreshold – The number of unauthenticated connection attempts
allowed from any individual host before that host is
black-listed (default=5)
ImprovedHextile – Use improved compression algorithm for Hextile encoding
which achieves better compression ratios by the cost of
using more CPU time (default=1)
RemapKeys – Comma-separated list of incoming keysyms to remap. Mappings
are expressed as two hex values, prefixed by 0x, and
separated by -> (default=)
ZlibLevel – Zlib compression level (default=-1)
MaxCutText – Maximum permitted length of an incoming clipboard update
(default=262144)

Fatal server error:
Unrecognized option: –help