blob: 128bc93702e508939854ab01abdb4bb111d349e7 [file] [log] [blame]
Constantin Kaplinsky95f6f7a2006-04-17 04:17:23 +00001.TH Xvnc 1 "17 Apr 2006" "TightVNC" "Virtual Network Computing"
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +00002.SH NAME
3Xvnc \- the X VNC server
4.SH SYNOPSIS
5.B Xvnc
6.RI [ options ]
7.RI : display#
8.SH DESCRIPTION
9.B Xvnc
10is the X VNC (Virtual Network Computing) server. It is based on a standard X
11server, but it has a "virtual" screen rather than a physical one. X
12applications display themselves on it as if it were a normal X display, but
13they can only be accessed via a VNC viewer - see \fBvncviewer\fP(1).
14
15So Xvnc is really two servers in one. To the applications it is an X server,
16and to the remote VNC users it is a VNC server. By convention we have arranged
17that the VNC server display number will be the same as the X server display
18number, which means you can use eg. snoopy:2 to refer to display 2 on machine
19"snoopy" in both the X world and the VNC world.
20
21The best way of starting \fBXvnc\fP is via the \fBvncserver\fP script. This
22sets up the environment appropriately and runs some X applications to get you
23going. See the manual page for \fBvncserver\fP(1) for more information.
24
25.SH OPTIONS
26.B Xvnc
27takes lots of options - running \fBXvnc -help\fP gives a list. Many of these
28are standard X server options, which are described in the \fBXserver\fP(1)
29manual page. In addition to options which can only be set via the
30command-line, there are also "parameters" which can be set both via the
31command-line and through the \fBvncconfig\fP(1) program.
32
33.TP
34.B \-geometry \fIwidth\fPx\fIheight\fP
35Specify the size of the desktop to be created. Default is 1024x768.
36
37.TP
38.B \-depth \fIdepth\fP
39Specify the pixel depth in bits of the desktop to be created. Default is 16,
40other possible values are 8, 15, and 24 - anything else is likely to cause
41strange behaviour by applications.
42
43.TP
44.B \-pixelformat \fIformat\fP
45Specify pixel format for server to use (BGRnnn or RGBnnn). The default for
46depth 8 is BGR233 (meaning the most significant two bits represent blue, the
47next three green, and the least significant three represent red), the default
48for depth 16 is RGB565 and for depth 24 is RGB888.
49
50.TP
51.B \-cc 3
52As an alternative to the default TrueColor visual, this allows you to run an
Peter Åstrandc81a6522004-12-30 11:32:08 +000053Xvnc server with a PseudoColor visual (i.e. one which uses a color map or
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +000054palette), which can be useful for running some old X applications which only
55work on such a display. Values other than 3 (PseudoColor) and 4 (TrueColor)
56for the \-cc option may result in strange behaviour, and PseudoColor desktops
57must be 8 bits deep (i.e. \fB-depth 8\fP).
58
59.TP
60.B \-inetd
61This significantly changes Xvnc's behaviour so that it can be launched from
62inetd. See the section below on usage with inetd.
63
64.TP
65.B \-help
66List all the options and parameters
67
68.SH PARAMETERS
69VNC parameters can be set both via the command-line and through the
70\fBvncconfig\fP(1) program, and with a VNC-enabled XFree86 server via Options
71entries in the XF86Config file.
72
73Parameters can be turned on with -\fIparam\fP or off with
74-\fIparam\fP=0. Parameters which take a value can be specified as
75-\fIparam\fP \fIvalue\fP. Other valid forms are \fIparam\fP\fB=\fP\fIvalue\fP
76-\fIparam\fP=\fIvalue\fP --\fIparam\fP=\fIvalue\fP. Parameter names are
77case-insensitive.
78
79.TP
80.B \-desktop \fIdesktop-name\fP
81Each desktop has a name which may be displayed by the viewer. It defaults to
82"x11".
83
84.TP
85.B \-rfbport \fIport\fP
86Specifies the TCP port on which Xvnc listens for connections from viewers (the
87protocol used in VNC is called RFB - "remote framebuffer"). The default is
885900 plus the display number.
89
90.TP
91.B \-rfbwait \fItime\fP, \-ClientWaitTimeMillis \fItime\fP
92
93Time in milliseconds to wait for a viewer which is blocking Xvnc. This is
94necessary because Xvnc is single-threaded and sometimes blocks until the viewer
95has finished sending or receiving a message - note that this does not mean an
96update will be aborted after this time. Default is 20000 (20 seconds).
97
98.TP
99.B \-httpd \fIdirectory\fP
100Run a mini-HTTP server which serves files from the given directory. Normally
101the directory will contain the classes for the Java viewer. In addition, files
102with a .vnc extension will have certain substitutions made so that a single
103installation of the Java VNC viewer can be served by separate instances of
104Xvnc.
105
106.TP
107.B \-httpPort \fIport\fP
108Specifies the port on which the mini-HTTP server runs. Default is 5800 plus
109the display number.
110
111.TP
112.B \-rfbauth \fIpasswd-file\fP, \-PasswordFile \fIpasswd-file\fP
113Specifies the file containing the password used to authenticate viewers. The
114file is accessed each time a connection comes in, so it can be changed on the
115fly via \fBvncpasswd\fP(1).
116
117.TP
118.B \-deferUpdate \fItime\fP
119Xvnc uses a "deferred update" mechanism which enhances performance in many
120cases. After any change to the framebuffer, Xvnc waits for this number of
121milliseconds (default 40) before sending an update to any waiting clients. This
122means that more changes tend to get coalesced together in a single
123update. Setting it to 0 results in the same behaviour as earlier versions of
124Xvnc, where the first change to the framebuffer causes an immediate update to
125any waiting clients.
126
127.TP
128.B \-SendCutText
129Send clipboard changes to clients (default is on). Note that you must also run
130\fBvncconfig\fP(1) to get the clipboard to work.
131
132.TP
133.B \-AcceptCutText
134Accept clipboard updates from clients (default is on). Note that you must also
135run \fBvncconfig\fP(1) to get the clipboard to work.
136
137.TP
138.B \-AcceptPointerEvents
139Accept pointer press and release events from clients (default is on).
140
141.TP
142.B \-AcceptKeyEvents
143Accept key press and release events from clients (default is on).
144
145.TP
146.B \-DisconnectClients
147Disconnect existing clients if an incoming connection is non-shared (default is
148on). If \fBDisconnectClients\fP is false, then a new non-shared connection will
149be refused while there is a client active. When combined with
150\fBNeverShared\fP this means only one client is allowed at a time.
151
152.TP
153.B \-NeverShared
154Never treat incoming connections as shared, regardless of the client-specified
155setting (default is off).
156
157.TP
158.B \-AlwaysShared
159Always treat incoming connections as shared, regardless of the client-specified
160setting (default is off).
161
162.TP
163.B \-Protocol3.3
164Always use protocol version 3.3 for backwards compatibility with badly-behaved
165clients (default is off).
166
167.TP
168.B \-CompareFB
169Perform pixel comparison on framebuffer to reduce unnecessary updates (default
170is on).
171
172.TP
173.B \-SecurityTypes \fIsec-types\fP
174Specify which security schemes to use separated by commas. At present only
175"None" and "VncAuth" are supported. The default is "VncAuth" - note that if
176you want a server which does not require a password, you must set this
177parameter to "None".
178
179.TP
180.B \-IdleTimeout \fIseconds\fP
181The number of seconds after which an idle VNC connection will be dropped
Peter Åstrandd55816b2005-02-14 12:54:59 +0000182(default is 0, which means that idle connections will never be dropped).
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +0000183
184.TP
Constantin Kaplinsky95f6f7a2006-04-17 04:17:23 +0000185.B \-QueryConnect
186Prompts the user of the desktop to explicitly accept or reject incoming
187connections. This is most useful when using the vnc.so module or
188\fBx0vncserver\fP(1) program to access an existing X desktop via VNC.
189
190The \fBvncconfig\fP(1) program must be running on the desktop in order for
191QueryConnect to be supported by the \fBvnc.so\fP(1) module or
192\fBXvnc\fP(1) program. The \fBx0vncserver\fP(1) program does not require
193\fBvncconfig\fP(1) to be running.
194
195.TP
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +0000196.B \-localhost
197Only allow connections from the same machine. Useful if you use SSH and want to
198stop non-SSH connections from any other hosts. See the guide to using VNC with
199SSH on the web site.
200
201.TP
202.B \-log \fIlogname\fP:\fIdest\fP:\fIlevel\fP
203Configures the debug log settings. \fIdest\fP can currently be \fBstderr\fP or
204\fBstdout\fP, and \fIlevel\fP is between 0 and 100, 100 meaning most verbose
205output. \fIlogname\fP is usually \fB*\fP meaning all, but you can target a
206specific source file if you know the name of its "LogWriter". Default is
207\fB*:stderr:30\fP.
208
Constantin Kaplinsky95f6f7a2006-04-17 04:17:23 +0000209.TP
210.B \-RemapKeys \fImapping
211Sets up a keyboard mapping.
212.I mapping
213is a comma-separated string of character mappings, each of the form
214.IR char -> char ,
215or
216.IR char <> char ,
217where
218.I char
219is a hexadecimal keysym. For example, to exchange the " and @ symbols you would specify the following:
220.IP "" 10
221RemapKeys=0x22<>0x40
222
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +0000223.SH USAGE WITH INETD
224By configuring the \fBinetd\fP(1) service appropriately, Xvnc can be launched
225on demand when a connection comes in, rather than having to be started
226manually. When given the \fB-inetd\fP option, instead of listening for TCP
227connections on a given port it uses its standard input and standard output.
228There are two modes controlled by the wait/nowait entry in the inetd.conf file.
229
230In the nowait mode, Xvnc uses its standard input and output directly as the
231connection to a viewer. It never has a listening socket, so cannot accept
232further connections from viewers (it can however connect out to listening
233viewers by use of the vncconfig program). Further viewer connections to the
234same TCP port result in inetd spawning off a new Xvnc to deal with each
235connection. When the connection to the viewer dies, the Xvnc and any
236associated X clients die. This behaviour is most useful when combined with the
237XDMCP options -query and -once. An typical example in inetd.conf might be (all
238on one line):
239
2405950 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd -query
241localhost -once securitytypes=none
242
243In this example a viewer connection to :50 will result in a new Xvnc for that
244connection which should display the standard XDM login screen on that machine.
245Because the user needs to login via XDM, it is usually OK to accept connections
246without a VNC password in this case.
247
248In the wait mode, when the first connection comes in, inetd gives the listening
249socket to Xvnc. This means that for a given TCP port, there is only ever one
250Xvnc at a time. Further viewer connections to the same port are accepted by
251the same Xvnc in the normal way. Even when the original connection is broken,
252the Xvnc will continue to run. If this is used with the XDMCP options -query
253and -once, the Xvnc and associated X clients will die when the user logs out of
254the X session in the normal way. It is important to use a VNC password in this
255case. A typical entry in inetd.conf might be:
256
2575951 stream tcp wait james /usr/local/bin/Xvnc Xvnc -inetd -query localhost -once passwordFile=/home/james/.vnc/passwd
258
259In fact typically, you would have one entry for each user who uses VNC
260regularly, each of whom has their own dedicated TCP port which they use. In
261this example, when user "james" connects to :51, he enters his VNC password,
262then gets the XDM login screen where he logs in in the normal way. However,
263unlike the previous example, if he disconnects, the session remains persistent,
264and when he reconnects he will get the same session back again. When he logs
265out of the X session, the Xvnc will die, but of course a new one will be
266created automatically the next time he connects.
267
268.SH SEE ALSO
269.BR vncconfig (1),
270.BR vncpasswd (1),
271.BR vncserver (1),
272.BR vncviewer (1),
273.BR Xserver (1),
274.BR inetd (1)
275.br
Peter Åstrand9fb4e0e2004-12-30 10:03:00 +0000276http://www.tightvnc.com
Constantin Kaplinsky47ed8d32004-10-08 09:43:57 +0000277
278.SH AUTHOR
279Tristan Richardson, RealVNC Ltd.
280
Peter Åstrand9fb4e0e2004-12-30 10:03:00 +0000281VNC was originally developed by the RealVNC team while at Olivetti
282Research Ltd / AT&T Laboratories Cambridge. TightVNC additions was
283implemented by Constantin Kaplinsky. Many other people participated in
284development, testing and support.