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