You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Xvnc.man 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  1. .TH Xvnc 1 "" "TigerVNC" "Virtual Network Computing"
  2. .SH NAME
  3. Xvnc \- the X VNC server
  4. .SH SYNOPSIS
  5. .B Xvnc
  6. .RI [ options ]
  7. .RI : display#
  8. .SH DESCRIPTION
  9. .B Xvnc
  10. is the X VNC (Virtual Network Computing) server. It is based on a standard X
  11. server, but it has a "virtual" screen rather than a physical one. X
  12. applications display themselves on it as if it were a normal X display, but
  13. they can only be accessed via a VNC viewer - see \fBvncviewer\fP(1).
  14. So Xvnc is really two servers in one. To the applications it is an X server,
  15. and to the remote VNC users it is a VNC server. By convention we have arranged
  16. that the VNC server display number will be the same as the X server display
  17. number, which means you can use eg. snoopy:2 to refer to display 2 on machine
  18. "snoopy" in both the X world and the VNC world.
  19. The best way of starting \fBXvnc\fP is via the \fBvncserver\fP script. This
  20. sets up the environment appropriately and runs some X applications to get you
  21. going. See the manual page for \fBvncserver\fP(1) for more information.
  22. .SH OPTIONS
  23. .B Xvnc
  24. takes lots of options - running \fBXvnc -help\fP gives a list. Many of these
  25. are standard X server options, which are described in the \fBXserver\fP(1)
  26. manual page. In addition to options which can only be set via the
  27. command-line, there are also "parameters" which can be set both via the
  28. command-line and through the \fBvncconfig\fP(1) program.
  29. .TP
  30. .B \-geometry \fIwidth\fPx\fIheight\fP
  31. Specify the size of the desktop to be created. Default is 1024x768.
  32. .
  33. .TP
  34. .B \-depth \fIdepth\fP
  35. Specify the pixel depth in bits of the desktop to be created. Default is 24,
  36. other possible values are 8, 15, and 16 - anything else is likely to cause
  37. strange behaviour by applications.
  38. .
  39. .TP
  40. .B \-pixelformat \fIformat\fP
  41. Specify pixel format for server to use (BGRnnn or RGBnnn). The default for
  42. depth 8 is BGR233 (meaning the most significant two bits represent blue, the
  43. next three green, and the least significant three represent red), the default
  44. for depth 16 is RGB565 and for depth 24 is RGB888.
  45. .
  46. .TP
  47. .B \-interface \fIIP address\fP
  48. Listen on interface. By default Xvnc listens on all available interfaces.
  49. .
  50. .TP
  51. .B \-inetd
  52. This significantly changes Xvnc's behaviour so that it can be launched from
  53. inetd. See the section below on usage with inetd.
  54. .
  55. .TP
  56. .B \-help
  57. List all the options and parameters
  58. .SH PARAMETERS
  59. VNC parameters can be set both via the command-line and through the
  60. \fBvncconfig\fP(1) program, and with a VNC-enabled Xorg server via Options
  61. entries in the xorg.conf file.
  62. Parameters can be turned on with -\fIparam\fP or off with
  63. -\fIparam\fP=0. Parameters which take a value can be specified as
  64. -\fIparam\fP \fIvalue\fP. Other valid forms are \fIparam\fP\fB=\fP\fIvalue\fP
  65. -\fIparam\fP=\fIvalue\fP --\fIparam\fP=\fIvalue\fP. Parameter names are
  66. case-insensitive.
  67. .TP
  68. .B \-desktop \fIdesktop-name\fP
  69. Each desktop has a name which may be displayed by the viewer. It defaults to
  70. "x11".
  71. .
  72. .TP
  73. .B \-rfbport \fIport\fP
  74. Specifies the TCP port on which Xvnc listens for connections from viewers (the
  75. protocol used in VNC is called RFB - "remote framebuffer"). The default is
  76. 5900 plus the display number.
  77. .
  78. .TP
  79. .B \-UseIPv4
  80. Use IPv4 for incoming and outgoing connections. Default is on.
  81. .
  82. .TP
  83. .B \-UseIPv6
  84. Use IPv6 for incoming and outgoing connections. Default is on.
  85. .
  86. .TP
  87. .B \-rfbunixpath \fIpath\fP
  88. Specifies the path of a Unix domain socket on which Xvnc listens for
  89. connections from viewers, instead of listening on a TCP port.
  90. .
  91. .TP
  92. .B \-rfbunixmode \fImode\fP
  93. Specifies the mode of the Unix domain socket. The default is 0600.
  94. .
  95. .TP
  96. .B \-rfbwait \fItime\fP, \-ClientWaitTimeMillis \fItime\fP
  97. Time in milliseconds to wait for a viewer which is blocking the server. This is
  98. necessary because the server is single-threaded and sometimes blocks until the
  99. viewer has finished sending or receiving a message - note that this does not
  100. mean an update will be aborted after this time. Default is 20000 (20 seconds).
  101. .
  102. .TP
  103. .B \-httpd \fIdirectory\fP
  104. Run a mini-HTTP server which serves files from the given directory. Normally
  105. the directory will contain the classes for the Java viewer. In addition, files
  106. with a .vnc extension will have certain substitutions made so that a single
  107. installation of the Java VNC viewer can be served by separate instances of
  108. Xvnc.
  109. .
  110. .TP
  111. .B \-httpPort \fIport\fP
  112. Specifies the port on which the mini-HTTP server runs. Default is 5800 plus
  113. the display number.
  114. .
  115. .TP
  116. .B \-rfbauth \fIpasswd-file\fP, \-PasswordFile \fIpasswd-file\fP
  117. Password file for VNC authentication. There is no default, you should
  118. specify the password file explicitly. Password file should be created with
  119. the \fBvncpasswd\fP(1) utility. The file is accessed each time a connection
  120. comes in, so it can be changed on the fly.
  121. .
  122. .TP
  123. .B \-AcceptCutText
  124. Accept clipboard updates from clients. Default is on.
  125. .
  126. .TP
  127. .B \-MaxCutText \fIbytes\fP
  128. The maximum size of a clipboard update that will be accepted from a client.
  129. Default is \fB262144\fP.
  130. .
  131. .TP
  132. .B \-SendCutText
  133. Send clipboard changes to clients. Default is on.
  134. .
  135. .TP
  136. .B \-SendPrimary
  137. Send the primary selection and cut buffer to the server as well as the
  138. clipboard selection. Default is on.
  139. .
  140. .TP
  141. .B \-AcceptPointerEvents
  142. Accept pointer press and release events from clients. Default is on.
  143. .
  144. .TP
  145. .B \-AcceptKeyEvents
  146. Accept key press and release events from clients. Default is on.
  147. .
  148. .TP
  149. .B \-AcceptSetDesktopSize
  150. Accept requests to resize the size of the desktop. Default is on.
  151. .
  152. .TP
  153. .B \-DisconnectClients
  154. Disconnect existing clients if an incoming connection is non-shared. Default is
  155. on. If \fBDisconnectClients\fP is false, then a new non-shared connection will
  156. be refused while there is a client active. When combined with
  157. \fBNeverShared\fP this means only one client is allowed at a time.
  158. .
  159. .TP
  160. .B \-NeverShared
  161. Never treat incoming connections as shared, regardless of the client-specified
  162. setting. Default is off.
  163. .
  164. .TP
  165. .B \-AlwaysShared
  166. Always treat incoming connections as shared, regardless of the client-specified
  167. setting. Default is off.
  168. .
  169. .TP
  170. .B \-Protocol3.3
  171. Always use protocol version 3.3 for backwards compatibility with badly-behaved
  172. clients. Default is off.
  173. .
  174. .TP
  175. .B \-FrameRate \fIfps\fP
  176. The maximum number of updates per second sent to each client. If the screen
  177. updates any faster then those changes will be aggregated and sent in a single
  178. update to the client. Note that this only controls the maximum rate and a
  179. client may get a lower rate when resources are limited. Default is \fB60\fP.
  180. .
  181. .TP
  182. .B \-CompareFB \fImode\fP
  183. Perform pixel comparison on framebuffer to reduce unnecessary updates. Can
  184. be either \fB0\fP (off), \fB1\fP (always) or \fB2\fP (auto). Default is
  185. \fB2\fP.
  186. .
  187. .TP
  188. .B \-ZlibLevel \fIlevel\fP
  189. Zlib compression level for ZRLE encoding (it does not affect Tight encoding).
  190. Acceptable values are between 0 and 9. Default is to use the standard
  191. compression level provided by the \fBzlib\fP(3) compression library.
  192. .
  193. .TP
  194. .B \-ImprovedHextile
  195. Use improved compression algorithm for Hextile encoding which achieves better
  196. compression ratios by the cost of using slightly more CPU time. Default is
  197. on.
  198. .
  199. .TP
  200. .B \-SecurityTypes \fIsec-types\fP
  201. Specify which security scheme to use for incoming connections. Valid values
  202. are a comma separated list of \fBNone\fP, \fBVncAuth\fP, \fBPlain\fP,
  203. \fBTLSNone\fP, \fBTLSVnc\fP, \fBTLSPlain\fP, \fBX509None\fP, \fBX509Vnc\fP
  204. and \fBX509Plain\fP. Default is \fBVncAuth,TLSVnc\fP.
  205. .
  206. .TP
  207. .B \-Password \fIpassword\fP
  208. Obfuscated binary encoding of the password which clients must supply to
  209. access the server. Using this parameter is insecure, use \fBPasswordFile\fP
  210. parameter instead.
  211. .
  212. .TP
  213. .B \-PlainUsers \fIuser-list\fP
  214. A comma separated list of user names that are allowed to authenticate via
  215. any of the "Plain" security types (Plain, TLSPlain, etc.). Specify \fB*\fP
  216. to allow any user to authenticate using this security type. Default is to
  217. deny all users.
  218. .
  219. .TP
  220. .B \-pam_service \fIname\fP, \-PAMService \fIname\fP
  221. PAM service name to use when authentication users using any of the "Plain"
  222. security types. Default is \fBvnc\fP.
  223. .
  224. .TP
  225. .B \-X509Cert \fIpath\fP
  226. Path to a X509 certificate in PEM format to be used for all X509 based
  227. security types (X509None, X509Vnc, etc.).
  228. .
  229. .TP
  230. .B \-X509Key \fIpath\fP
  231. Private key counter part to the certificate given in \fBX509Cert\fP. Must
  232. also be in PEM format.
  233. .
  234. .TP
  235. .B \-GnuTLSPriority \fIpriority\fP
  236. GnuTLS priority string that controls the TLS session’s handshake algorithms.
  237. See the GnuTLS manual for possible values. Default is \fBNORMAL\fP.
  238. .
  239. .TP
  240. .B \-BlacklistThreshold \fIcount\fP
  241. The number of unauthenticated connection attempts allowed from any individual
  242. host before that host is black-listed. Default is 5.
  243. .
  244. .TP
  245. .B \-BlacklistTimeout \fIseconds\fP
  246. The initial timeout applied when a host is first black-listed. The host
  247. cannot re-attempt a connection until the timeout expires. Default is 10.
  248. .
  249. .TP
  250. .B \-IdleTimeout \fIseconds\fP
  251. The number of seconds after which an idle VNC connection will be dropped.
  252. Default is 0, which means that idle connections will never be dropped.
  253. .
  254. .TP
  255. .B \-MaxDisconnectionTime \fIseconds\fP
  256. Terminate when no client has been connected for \fIN\fP seconds. Default is
  257. 0.
  258. .
  259. .TP
  260. .B \-MaxConnectionTime \fIseconds\fP
  261. Terminate when a client has been connected for \fIN\fP seconds. Default is
  262. 0.
  263. .
  264. .TP
  265. .B \-MaxIdleTime \fIseconds\fP
  266. Terminate after \fIN\fP seconds of user inactivity. Default is 0.
  267. .
  268. .TP
  269. .B \-QueryConnect
  270. Prompts the user of the desktop to explicitly accept or reject incoming
  271. connections. Default is off.
  272. The \fBvncconfig\fP(1) program must be running on the desktop in order for
  273. QueryConnect to be supported.
  274. .
  275. .TP
  276. .B \-QueryConnectTimeout \fIseconds\fP
  277. Number of seconds to show the Accept Connection dialog before rejecting the
  278. connection. Default is \fB10\fP.
  279. .
  280. .TP
  281. .B \-localhost
  282. Only allow connections from the same machine. Useful if you use SSH and want to
  283. stop non-SSH connections from any other hosts.
  284. .
  285. .TP
  286. .B \-Log \fIlogname\fP:\fIdest\fP:\fIlevel\fP
  287. Configures the debug log settings. \fIdest\fP can currently be \fBstderr\fP,
  288. \fBstdout\fP or \fBsyslog\fP, and \fIlevel\fP is between 0 and 100, 100 meaning
  289. most verbose output. \fIlogname\fP is usually \fB*\fP meaning all, but you can
  290. target a specific source file if you know the name of its "LogWriter". Default
  291. is \fB*:stderr:30\fP.
  292. .
  293. .TP
  294. .B \-RemapKeys \fImapping
  295. Sets up a keyboard mapping.
  296. .I mapping
  297. is a comma-separated string of character mappings, each of the form
  298. .IR char -> char ,
  299. or
  300. .IR char <> char ,
  301. where
  302. .I char
  303. is a hexadecimal keysym. For example, to exchange the " and @ symbols you would specify the following:
  304. .RS 10
  305. RemapKeys=0x22<>0x40
  306. .RE
  307. .
  308. .TP
  309. .B \-AvoidShiftNumLock
  310. Key affected by NumLock often require a fake Shift to be inserted in order
  311. for the correct symbol to be generated. Turning on this option avoids these
  312. extra fake Shift events but may result in a slightly different symbol
  313. (e.g. a Return instead of a keypad Enter).
  314. .
  315. .TP
  316. .B \-RawKeyboard
  317. Send keyboard events straight through and avoid mapping them to the current
  318. keyboard layout. This effectively makes the keyboard behave according to the
  319. layout configured on the server instead of the layout configured on the
  320. client. Default is off.
  321. .
  322. .TP
  323. .B \-AllowOverride
  324. Comma separated list of parameters that can be modified using VNC extension.
  325. Parameters can be modified for example using \fBvncconfig\fP(1) program from
  326. inside a running session.
  327. Allowing override of parameters such as \fBPAMService\fP or \fBPasswordFile\fP
  328. can negatively impact security if Xvnc runs under different user than the
  329. programs allowed to override the parameters.
  330. When \fBNoClipboard\fP parameter is set, allowing override of \fBSendCutText\fP
  331. and \fBAcceptCutText\fP has no effect.
  332. Default is \fBdesktop,AcceptPointerEvents,SendCutText,AcceptCutText,SendPrimary,SetPrimary\fP.
  333. .SH USAGE WITH INETD
  334. By configuring the \fBinetd\fP(1) service appropriately, Xvnc can be launched
  335. on demand when a connection comes in, rather than having to be started
  336. manually. When given the \fB-inetd\fP option, instead of listening for TCP
  337. connections on a given port it uses its standard input and standard output.
  338. There are two modes controlled by the wait/nowait entry in the inetd.conf file.
  339. In the nowait mode, Xvnc uses its standard input and output directly as the
  340. connection to a viewer. It never has a listening socket, so cannot accept
  341. further connections from viewers (it can however connect out to listening
  342. viewers by use of the vncconfig program). Further viewer connections to the
  343. same TCP port result in inetd spawning off a new Xvnc to deal with each
  344. connection. When the connection to the viewer dies, the Xvnc and any
  345. associated X clients die. This behaviour is most useful when combined with the
  346. XDMCP options -query and -once. An typical example in inetd.conf might be (all
  347. on one line):
  348. 5950 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd -query
  349. localhost -once securitytypes=none
  350. In this example a viewer connection to :50 will result in a new Xvnc for that
  351. connection which should display the standard XDM login screen on that machine.
  352. Because the user needs to login via XDM, it is usually OK to accept connections
  353. without a VNC password in this case.
  354. In the wait mode, when the first connection comes in, inetd gives the listening
  355. socket to Xvnc. This means that for a given TCP port, there is only ever one
  356. Xvnc at a time. Further viewer connections to the same port are accepted by
  357. the same Xvnc in the normal way. Even when the original connection is broken,
  358. the Xvnc will continue to run. If this is used with the XDMCP options -query
  359. and -once, the Xvnc and associated X clients will die when the user logs out of
  360. the X session in the normal way. It is important to use a VNC password in this
  361. case. A typical entry in inetd.conf might be:
  362. 5951 stream tcp wait james /usr/local/bin/Xvnc Xvnc -inetd -query localhost -once passwordFile=/home/james/.vnc/passwd
  363. In fact typically, you would have one entry for each user who uses VNC
  364. regularly, each of whom has their own dedicated TCP port which they use. In
  365. this example, when user "james" connects to :51, he enters his VNC password,
  366. then gets the XDM login screen where he logs in in the normal way. However,
  367. unlike the previous example, if he disconnects, the session remains persistent,
  368. and when he reconnects he will get the same session back again. When he logs
  369. out of the X session, the Xvnc will die, but of course a new one will be
  370. created automatically the next time he connects.
  371. .SH SEE ALSO
  372. .BR vncconfig (1),
  373. .BR vncpasswd (1),
  374. .BR vncserver (1),
  375. .BR vncviewer (1),
  376. .BR Xserver (1),
  377. .BR inetd (1)
  378. .br
  379. https://www.tigervnc.org
  380. .SH AUTHOR
  381. Tristan Richardson, RealVNC Ltd. and others.
  382. VNC was originally developed by the RealVNC team while at Olivetti
  383. Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were
  384. implemented by Constantin Kaplinsky. Many other people have since
  385. participated in development, testing and support. This manual is part
  386. of the TigerVNC software suite.