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 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. .TH Xvnc 1 "30 December 2004" "TightVNC" "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. .TP
  33. .B \-depth \fIdepth\fP
  34. Specify the pixel depth in bits of the desktop to be created. Default is 16,
  35. other possible values are 8, 15, and 24 - anything else is likely to cause
  36. strange behaviour by applications.
  37. .TP
  38. .B \-pixelformat \fIformat\fP
  39. Specify pixel format for server to use (BGRnnn or RGBnnn). The default for
  40. depth 8 is BGR233 (meaning the most significant two bits represent blue, the
  41. next three green, and the least significant three represent red), the default
  42. for depth 16 is RGB565 and for depth 24 is RGB888.
  43. .TP
  44. .B \-cc 3
  45. As an alternative to the default TrueColor visual, this allows you to run an
  46. Xvnc server with a PseudoColor visual (i.e. one which uses a color map or
  47. palette), which can be useful for running some old X applications which only
  48. work on such a display. Values other than 3 (PseudoColor) and 4 (TrueColor)
  49. for the \-cc option may result in strange behaviour, and PseudoColor desktops
  50. must be 8 bits deep (i.e. \fB-depth 8\fP).
  51. .TP
  52. .B \-inetd
  53. This significantly changes Xvnc's behaviour so that it can be launched from
  54. inetd. See the section below on usage with inetd.
  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 XFree86 server via Options
  61. entries in the XF86Config 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. .TP
  72. .B \-rfbport \fIport\fP
  73. Specifies the TCP port on which Xvnc listens for connections from viewers (the
  74. protocol used in VNC is called RFB - "remote framebuffer"). The default is
  75. 5900 plus the display number.
  76. .TP
  77. .B \-rfbwait \fItime\fP, \-ClientWaitTimeMillis \fItime\fP
  78. Time in milliseconds to wait for a viewer which is blocking Xvnc. This is
  79. necessary because Xvnc is single-threaded and sometimes blocks until the viewer
  80. has finished sending or receiving a message - note that this does not mean an
  81. update will be aborted after this time. Default is 20000 (20 seconds).
  82. .TP
  83. .B \-httpd \fIdirectory\fP
  84. Run a mini-HTTP server which serves files from the given directory. Normally
  85. the directory will contain the classes for the Java viewer. In addition, files
  86. with a .vnc extension will have certain substitutions made so that a single
  87. installation of the Java VNC viewer can be served by separate instances of
  88. Xvnc.
  89. .TP
  90. .B \-httpPort \fIport\fP
  91. Specifies the port on which the mini-HTTP server runs. Default is 5800 plus
  92. the display number.
  93. .TP
  94. .B \-rfbauth \fIpasswd-file\fP, \-PasswordFile \fIpasswd-file\fP
  95. Specifies the file containing the password used to authenticate viewers. The
  96. file is accessed each time a connection comes in, so it can be changed on the
  97. fly via \fBvncpasswd\fP(1).
  98. .TP
  99. .B \-deferUpdate \fItime\fP
  100. Xvnc uses a "deferred update" mechanism which enhances performance in many
  101. cases. After any change to the framebuffer, Xvnc waits for this number of
  102. milliseconds (default 40) before sending an update to any waiting clients. This
  103. means that more changes tend to get coalesced together in a single
  104. update. Setting it to 0 results in the same behaviour as earlier versions of
  105. Xvnc, where the first change to the framebuffer causes an immediate update to
  106. any waiting clients.
  107. .TP
  108. .B \-SendCutText
  109. Send clipboard changes to clients (default is on). Note that you must also run
  110. \fBvncconfig\fP(1) to get the clipboard to work.
  111. .TP
  112. .B \-AcceptCutText
  113. Accept clipboard updates from clients (default is on). Note that you must also
  114. run \fBvncconfig\fP(1) to get the clipboard to work.
  115. .TP
  116. .B \-AcceptPointerEvents
  117. Accept pointer press and release events from clients (default is on).
  118. .TP
  119. .B \-AcceptKeyEvents
  120. Accept key press and release events from clients (default is on).
  121. .TP
  122. .B \-DisconnectClients
  123. Disconnect existing clients if an incoming connection is non-shared (default is
  124. on). If \fBDisconnectClients\fP is false, then a new non-shared connection will
  125. be refused while there is a client active. When combined with
  126. \fBNeverShared\fP this means only one client is allowed at a time.
  127. .TP
  128. .B \-NeverShared
  129. Never treat incoming connections as shared, regardless of the client-specified
  130. setting (default is off).
  131. .TP
  132. .B \-AlwaysShared
  133. Always treat incoming connections as shared, regardless of the client-specified
  134. setting (default is off).
  135. .TP
  136. .B \-Protocol3.3
  137. Always use protocol version 3.3 for backwards compatibility with badly-behaved
  138. clients (default is off).
  139. .TP
  140. .B \-CompareFB
  141. Perform pixel comparison on framebuffer to reduce unnecessary updates (default
  142. is on).
  143. .TP
  144. .B \-SecurityTypes \fIsec-types\fP
  145. Specify which security schemes to use separated by commas. At present only
  146. "None" and "VncAuth" are supported. The default is "VncAuth" - note that if
  147. you want a server which does not require a password, you must set this
  148. parameter to "None".
  149. .TP
  150. .B \-IdleTimeout \fIseconds\fP
  151. The number of seconds after which an idle VNC connection will be dropped
  152. (default is 3600 i.e. an hour).
  153. .TP
  154. .B \-localhost
  155. Only allow connections from the same machine. Useful if you use SSH and want to
  156. stop non-SSH connections from any other hosts. See the guide to using VNC with
  157. SSH on the web site.
  158. .TP
  159. .B \-log \fIlogname\fP:\fIdest\fP:\fIlevel\fP
  160. Configures the debug log settings. \fIdest\fP can currently be \fBstderr\fP or
  161. \fBstdout\fP, and \fIlevel\fP is between 0 and 100, 100 meaning most verbose
  162. output. \fIlogname\fP is usually \fB*\fP meaning all, but you can target a
  163. specific source file if you know the name of its "LogWriter". Default is
  164. \fB*:stderr:30\fP.
  165. .SH USAGE WITH INETD
  166. By configuring the \fBinetd\fP(1) service appropriately, Xvnc can be launched
  167. on demand when a connection comes in, rather than having to be started
  168. manually. When given the \fB-inetd\fP option, instead of listening for TCP
  169. connections on a given port it uses its standard input and standard output.
  170. There are two modes controlled by the wait/nowait entry in the inetd.conf file.
  171. In the nowait mode, Xvnc uses its standard input and output directly as the
  172. connection to a viewer. It never has a listening socket, so cannot accept
  173. further connections from viewers (it can however connect out to listening
  174. viewers by use of the vncconfig program). Further viewer connections to the
  175. same TCP port result in inetd spawning off a new Xvnc to deal with each
  176. connection. When the connection to the viewer dies, the Xvnc and any
  177. associated X clients die. This behaviour is most useful when combined with the
  178. XDMCP options -query and -once. An typical example in inetd.conf might be (all
  179. on one line):
  180. 5950 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd -query
  181. localhost -once securitytypes=none
  182. In this example a viewer connection to :50 will result in a new Xvnc for that
  183. connection which should display the standard XDM login screen on that machine.
  184. Because the user needs to login via XDM, it is usually OK to accept connections
  185. without a VNC password in this case.
  186. In the wait mode, when the first connection comes in, inetd gives the listening
  187. socket to Xvnc. This means that for a given TCP port, there is only ever one
  188. Xvnc at a time. Further viewer connections to the same port are accepted by
  189. the same Xvnc in the normal way. Even when the original connection is broken,
  190. the Xvnc will continue to run. If this is used with the XDMCP options -query
  191. and -once, the Xvnc and associated X clients will die when the user logs out of
  192. the X session in the normal way. It is important to use a VNC password in this
  193. case. A typical entry in inetd.conf might be:
  194. 5951 stream tcp wait james /usr/local/bin/Xvnc Xvnc -inetd -query localhost -once passwordFile=/home/james/.vnc/passwd
  195. In fact typically, you would have one entry for each user who uses VNC
  196. regularly, each of whom has their own dedicated TCP port which they use. In
  197. this example, when user "james" connects to :51, he enters his VNC password,
  198. then gets the XDM login screen where he logs in in the normal way. However,
  199. unlike the previous example, if he disconnects, the session remains persistent,
  200. and when he reconnects he will get the same session back again. When he logs
  201. out of the X session, the Xvnc will die, but of course a new one will be
  202. created automatically the next time he connects.
  203. .SH SEE ALSO
  204. .BR vncconfig (1),
  205. .BR vncpasswd (1),
  206. .BR vncserver (1),
  207. .BR vncviewer (1),
  208. .BR Xserver (1),
  209. .BR inetd (1)
  210. .br
  211. http://www.tightvnc.com
  212. .SH AUTHOR
  213. Tristan Richardson, RealVNC Ltd.
  214. VNC was originally developed by the RealVNC team while at Olivetti
  215. Research Ltd / AT&T Laboratories Cambridge. TightVNC additions was
  216. implemented by Constantin Kaplinsky. Many other people participated in
  217. development, testing and support.