linux下远程桌面连接 VNC使用.docx
《linux下远程桌面连接 VNC使用.docx》由会员分享,可在线阅读,更多相关《linux下远程桌面连接 VNC使用.docx(15页珍藏版)》请在冰豆网上搜索。
![linux下远程桌面连接 VNC使用.docx](https://file1.bdocx.com/fileroot1/2023-2/7/b8a47c90-9872-4540-880f-52aaf615fe0c/b8a47c90-9872-4540-880f-52aaf615fe0c1.gif)
linux下远程桌面连接VNC使用
Centos安装VNC-server
VNC简介
网络遥控技术是指由一部计算机(主控端)去控制另一部计算机(被控端),而且当主控端在控制端时,就如同用户亲自坐在被控端前操作一样,可以执行被控端的应用程序,及使用被控端的系统资源。
VNC(VirtualNetworkComputing)是一套由AT&T实验室所开发的可操控远程的计算机的软件,其采用了授权条款,任何人都可免费取得该软件。
VNC软件主要由两个部分组成:
VNCserver及VNCviewer。
用户需先将VNCserver安装在被控端的计算机上后,才能在主控端执行VNCviewer控制被控端。
(在windows中也由一套著名的网络遥控软件――Symantec公司推出的pcAnywhere。
VNCserver与VNCviewer支持多种操作系统,如Unix系列(Unix,Linux,Solaris等),windows及MacOS,因此可将VNCserver及VNCviewer分别安装在不同的操作系统中进行控制。
如果目前操作的主控端计算机没有安装VNCviewer,也可以通过一般的网页浏览器来控制被控端。
整个VNC运行的工作流程如下:
(1)VNC客户端通过浏览器或VNCViewer连接至VNCServer。
(2)VNCServer传送一对话窗口至客户端,要求输入连接密码,以及存取的VNCServer显示装置。
(3)在客户端输入联机密码后,VNCServer验证客户端是否具有存取权限。
(4)若是客户端通过VNCServer的验证,客户端即要求VNCServer显示桌面环境。
一、Vnc-server端安装:
①方法一:
1.安装vnc-server
[root@test~]#yuminstallvnc-server
2.配置vnc-server
[root@test~]#vi/etc/sysconfig/vncservers
3.设置vnc密码
4.启动vnc-server服务
5.测试登陆
6.输入密码:
7.登陆成功
②.方法二
1.安装vnc-server
[root@test~]#yuminstallvnc-server
2.通过默认方式配置
3.登陆测试
或
4.输入登陆密码:
5.登陆成功
二、多用户添加:
1.在vnc-server配置文件中增加tiantian用户。
2.创建tiantian用户的密码,并创建配置文件
3.重新启动vncserver服务
4.测试:
三、VNCserver一些配置参数:
[root@test.vnc]#/usr/bin/Xvnc--help
Unrecognizedoption:
--help
use:
X[:
][option]
-a#defaultpointeracceleration(factor)
-acdisableaccesscontrolrestrictions
-auditintsetaudittraillevel
-authfileselectauthorizationfile
-brcreaterootwindowwithblackbackground
+bsenableanybackingstoresupport
-bsdisableanybackingstoresupport
-cturnsoffkey-click
c#key-clickvolume(0-100)
-ccintdefaultcolorvisualclass
-nocursordisablethecursor
-coregeneratecoredumponfatalerror
-dpiintscreenresolutionindotsperinch
-dpmsdisablesVESADPMSmonitorcontrol
-deferglyphs[none|all|16]deferloadingof[no|all|16-bit]glyphs
-f#bellbase(0-100)
-fcstringcursorfont
-fnstringdefaultfontname
-fpstringdefaultfontpath
-helpprintsmessagewiththeseoptions
-Iignoreallremainingarguments
-ldintlimitdataspacetoNKb
-lfintlimitnumberofopenfilestoN
-lsintlimitstackspacetoNKb
-logoenablelogoinscreensaver
nologodisablelogoinscreensaver
-nolistenstringdon'tlistenonprotocol
-noresetdon'tresetafterlastclientexists
-nrcreaterootwindowwithnobackground
-resetresetafterlastclientexists
-p#screen-saverpatternduration(minutes)
-pnacceptfailuretolistenonallports
-nopnrejectfailuretolistenonallports
-rturnsoffauto-repeat
rturnsonauto-repeat
-render[default|mono|gray|color]setrendercolorallocpolicy
-retrostartwithclassicstippleandcursor
-s#screen-savertimeout(minutes)
-t#defaultpointerthreshold(pixels/t)
-terminateterminateatserverreset
-to#connectiontimeout
-tstdisabletestingextensions
ttyxxserverstartedfrominiton/dev/ttyxx
vvideoblankingforscreen-saver
-vscreen-saverwithoutvideoblanking
-wmWhenMappeddefaultbacking-store
-wrcreaterootwindowwithwhitebackground
-maxbigreqsizesetmaximalbigrequestsize
-dumbSchedDisablesmartscheduling,enableoldbehavior
-schedIntervalintSetschedulerintervalinmsec
+extensionnameEnableextension
-extensionnameDisableextension
-queryhost-namecontactnamedhostforXDMCP
-broadcastbroadcastforXDMCP
-multicast[addr[hops]]IPv6multicastforXDMCP
-indirecthost-namecontactnamedhostforindirectXDMCP
-portport-numUDPportnumbertosendmessagesto
-fromlocal-addressspecifythelocaladdresstoconnectfrom
-onceTerminateserverafteronesession
-classdisplay-classspecifydisplayclasstosendinmanage
-cookiexdm-auth-bitsspecifythemagiccookieforXDMCP
-displayIDdisplay-idmanufacturerdisplayIDforrequest
[+-]accessx[timeout[timeout_mask[feedback[options_mask]]]]
enable/disableaccessxkeysequences
-ardelaysetXKBautorepeatdelay
-arintervalsetXKBautorepeatinterval
XvncTigerVNC1.0.90-builtNov12201000:
12:
20
Copyright(C)2002-2005RealVNCLtd.
Copyright(C)2000-2006ConstantinKaplinsky
Copyright(C)2004-2009PeterAstrandforCendioAB
Seehttp:
//www.tigervnc.orgforinformationonTigerVNC.
UnderlyingXserverrelease10707000,TheX.OrgFoundation
-screenscrnWxHxDsetscreen'swidth,height,depth
-pixdepthslist-of-intsupportgivenpixmapdepths
+/-renderturnon/offRENDERextensionsupport(defaulton)
-linebiasnadjustthinlinepixelization
-blackpixelnpixelvalueforblack
-whitepixelnpixelvalueforwhite
-shmemputframebuffersinsharedmemory
-geometryWxHsetscreen0'swidth,height
-depthDsetscreen0'sdepth
-pixelformatfmtsetpixelformat(rgbNNNorbgrNNN)
-inetdhasbeenlaunchedfrominetd
-interfaceIP_addresslistenonspecifiedinterface
VNCparameters:
Parameterscanbeturnedonwith-oroffwith-=0
Parameterswhichtakeavaluecanbespecifiedas-
Othervalidformsare=-=--=
Parameternamesarecase-insensitive.Theparametersare:
GlobalParameters:
localhost-Onlyallowconnectionsfromlocalhost(default=0)
desktop-NameofVNCdesktop(default=x11)
rfbport-TCPporttolistenforRFBprotocol(default=0)
rfbwait-AliasforClientWaitTimeMillis
httpPort-TCPporttolistenforHTTP(default=0)
httpd-DirectorycontainingfilestoserveviaHTTP(default=)
rfbauth-AliasforPasswordFile
QueryConnectTimeout-NumberofsecondstoshowtheAcceptConnectiondialog
beforerejectingtheconnection(default=10)
AlwaysSetDeferUpdateTimer-Alwaysresetthedeferupdatetimeronevery
change(default=0)
DeferUpdate-Timeinmillisecondstodeferupdates(default=1)
Log-Specifieswhichlogoutputshouldbedirectedtowhich
targetlogger,andthelevelofoutputtolog.Formatis
:
:
[,...].(default=)
QueryConnect-Promptthelocalusertoacceptorrejectincoming
connections.(default=0)
SendCutText-Sendclipboardchangestoclients.(default=1)
AcceptCutText-Acceptclipboardupdatesfromclients.(default=1)
AcceptPointerEvents-Acceptpointerpressandreleaseeventsfromclients.
(default=1)
AcceptKeyEvents-Acceptkeypressandreleaseeventsfromclients.
(default=1)
DisconnectClients-Disconnectexistingclientsifanincomingconnectionis
non-shared.IfcombinedwithNeverSharedthennew
connectionswillberefusedwhilethereisaclientactive
(default=1)
NeverShared-Nevertreatincomingconnectionsasshared,regardlessof
theclient-specifiedsetting(default=0)
AlwaysShared-Alwaystreatincomingconnectionsasshared,regardlessof
theclient-specifiedsetting(default=0)
Protocol3.3-Alwaysuseprotocolversion3.3forbackwardscompatibility
withbadly-behavedclients(default=0)
CompareFB-Performpixelcomparisononframebuffertoreduce
unnecessaryupdates(default=1)
ClientWaitTimeMillis-Thenumberofmillisecondstowaitforaclientwhich
isnolongerresponding(default=20000)
MaxIdleTime-Terminateafterssecondsofuserinactivity(default=0)
MaxConnectionTime-Terminatewhenaclienthasbeenconnectedforsseconds
(default=0)
MaxDisconnectionTime-Terminatewhennoclienthasbeenconnectedfors
seconds(default=0)
IdleTimeout-ThenumberofsecondsafterwhichanidleVNCconnection
willbedropped(zeromeansnotimeout)(default=0)
Password-Obfuscatedbinaryencodingofthepasswordwhichclients
mustsupplytoaccesstheserver(default=)
PasswordFile-PasswordfileforVNCauthentication(default=)
ReverseSecurityTypes-Specifyencryptionschemetouseforreverse
connections(None)(default=None)
SecurityTypes-Specifywhichsecurityschemetouseforincoming
connections(None,VncAuth)(default=VncAuth)
BlacklistTimeout-Theinitialtimeoutappliedwhenahostisfirst
black-listed.Thehostcannotre-attemptaconnectionuntil
thetimeoutexpires.(default=10)
BlacklistThreshold-Thenumberofunauthenticatedconnectionattempts
allowedfromanyindividualhostbeforethathostis
black-listed(default=5)
ImprovedHextile-UseimprovedcompressionalgorithmforHextileencoding
whichachievesbettercompressionratiosbythecostof
usingmoreCPUtime(default=1)
RemapKeys-Comma-separatedlistofincomingkeysymstoremap.Mappings
areexpressedastwohexvalues,prefixedby0x,and
separatedby->(default=)
ZlibLevel-Zlibcompressionlevel(default=-1)
MaxCutText-Maximumpermittedlengthofanincomingclipboardupdate
(default=262144)
Fatalservererror:
Unrecognizedoption:
--help