blob: 95f7960faf2d175b6625be409ee43823cc708e7c [file] [log] [blame]
Pierre Ossmanf256a1a2014-09-17 14:09:58 +02001.TH vncserver 1 "" "TigerVNC" "Virtual Network Computing"
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +00002.SH NAME
3vncserver \- start or stop a VNC server
4.SH SYNOPSIS
5.B vncserver
6.RI [: display# ]
7.RB [ \-name
8.IR desktop-name ]
9.RB [ \-geometry
10.IR width x height ]
11.RB [ \-depth
12.IR depth ]
13.RB [ \-pixelformat
14.IR format ]
DRCeed5d1f2009-03-26 19:16:19 +000015.RB [ \-fp
16.IR font-path ]
DRC8fb11912011-03-03 10:42:14 +000017.RB [ \-fg ]
Adam Tkac38ba8cf2011-04-27 11:28:09 +000018.RB [ \-autokill ]
Llorenç Garcia Martinez5d771f42015-10-23 13:42:13 +020019.RB [ \-noxstartup ]
Llorenç Garcia Martinez36eac992015-10-30 11:11:56 +010020.RB [ \-xstartup
21.IR script ]
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000022.RI [ Xvnc-options... ]
23.br
24.BI "vncserver \-kill :" display#
Pierre Ossmanc16bb272014-09-17 14:18:31 +020025.br
26.BI "vncserver \-list"
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000027.SH DESCRIPTION
28.B vncserver
29is used to start a VNC (Virtual Network Computing) desktop.
30.B vncserver
31is a Perl script which simplifies the process of starting an Xvnc server. It
DRC7fe258a2009-03-26 18:58:40 +000032runs Xvnc with appropriate options and starts a window manager on the VNC
33desktop.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000034
35.B vncserver
36can be run with no options at all. In this case it will choose the first
DRC7fe258a2009-03-26 18:58:40 +000037available display number (usually :1), start Xvnc with that display number,
38and start the default window manager in the Xvnc session. You can also
39specify the display number, in which case vncserver will attempt to start
40Xvnc with that display number and exit if the display number is not
41available. For example:
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000042
43.RS
44vncserver :13
45.RE
46
47Editing the file $HOME/.vnc/xstartup allows you to change the applications run
DRC7fe258a2009-03-26 18:58:40 +000048at startup (but note that this will not affect an existing VNC session.)
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000049
50.SH OPTIONS
DRC7fe258a2009-03-26 18:58:40 +000051You can get a list of options by passing \fB\-h\fP as an option to vncserver.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000052In addition to the options listed below, any unrecognised options will be
DRC7fe258a2009-03-26 18:58:40 +000053passed to Xvnc - see the Xvnc man page, or "Xvnc \-help", for details.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000054
55.TP
56.B \-name \fIdesktop-name\fP
DRC7fe258a2009-03-26 18:58:40 +000057Each VNC desktop has a name which may be displayed by the viewer. The desktop
58name defaults to "\fIhost\fP:\fIdisplay#\fP (\fIusername\fP)", but you can
59change it with this option. The desktop name option is passed to the xstartup
60script via the $VNCDESKTOP environment variable, which allows you to run a
61different set of applications depending on the name of the desktop.
Pierre Ossman23f67c32014-09-17 16:28:56 +020062.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000063.TP
64.B \-geometry \fIwidth\fPx\fIheight\fP
DRC7fe258a2009-03-26 18:58:40 +000065Specify the size of the VNC desktop to be created. Default is 1024x768.
Pierre Ossman23f67c32014-09-17 16:28:56 +020066.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000067.TP
68.B \-depth \fIdepth\fP
DRC7fe258a2009-03-26 18:58:40 +000069Specify the pixel depth (in bits) of the VNC desktop to be created. Default is
7024. Other possible values are 8, 15 and 16 - anything else is likely to cause
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000071strange behaviour by applications.
Pierre Ossman23f67c32014-09-17 16:28:56 +020072.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000073.TP
74.B \-pixelformat \fIformat\fP
DRC7fe258a2009-03-26 18:58:40 +000075Specify pixel format for Xvnc to use (BGRnnn or RGBnnn). The default for
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000076depth 8 is BGR233 (meaning the most significant two bits represent blue, the
77next three green, and the least significant three represent red), the default
DRC7fe258a2009-03-26 18:58:40 +000078for depth 16 is RGB565, and the default for depth 24 is RGB888.
Pierre Ossman23f67c32014-09-17 16:28:56 +020079.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000080.TP
81.B \-cc 3
82As an alternative to the default TrueColor visual, this allows you to run an
83Xvnc server with a PseudoColor visual (i.e. one which uses a color map or
84palette), which can be useful for running some old X applications which only
85work on such a display. Values other than 3 (PseudoColor) and 4 (TrueColor)
86for the \-cc option may result in strange behaviour, and PseudoColor desktops
DRC7fe258a2009-03-26 18:58:40 +000087must have an 8-bit depth.
Pierre Ossman23f67c32014-09-17 16:28:56 +020088.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +000089.TP
90.B \-kill :\fIdisplay#\fP
91This kills a VNC desktop previously started with vncserver. It does this by
92killing the Xvnc process, whose process ID is stored in the file
DRC7fe258a2009-03-26 18:58:40 +000093"$HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.pid". The
94.B \-kill
95option ignores anything preceding the first colon (":") in the display
96argument. Thus, you can invoke "vncserver \-kill $DISPLAY", for example at the
97end of your xstartup file after a particular application exits.
Pierre Ossman23f67c32014-09-17 16:28:56 +020098.
DRCeed5d1f2009-03-26 19:16:19 +000099.TP
100.B \-fp \fIfont-path\fP
DRC36546c12009-04-15 06:47:23 +0000101If the vncserver script detects that the X Font Server (XFS) is running, it
102will attempt to start Xvnc and configure Xvnc to use XFS for font handling.
103Otherwise, if XFS is not running, the vncserver script will attempt to start
104Xvnc and allow Xvnc to use its own preferred method of font handling (which may
105be a hard-coded font path or, on more recent systems, a font catalog.) In
106any case, if Xvnc fails to start, the vncserver script will then attempt to
107determine an appropriate X font path for this system and start Xvnc using
108that font path.
109
110The
DRCeed5d1f2009-03-26 19:16:19 +0000111.B \-fp
DRC36546c12009-04-15 06:47:23 +0000112argument allows you to override the above fallback logic and specify a font
113path for Xvnc to use.
Pierre Ossman23f67c32014-09-17 16:28:56 +0200114.
DRC8fb11912011-03-03 10:42:14 +0000115.TP
116.B \-fg
Adam Tkacf586b842011-04-27 11:20:18 +0000117Runs Xvnc as a foreground process. This has two effects: (1) The VNC server
118can be aborted with CTRL-C, and (2) the VNC server will exit as soon as the
119user logs out of the window manager in the VNC session. This may be necessary
120when launching TigerVNC from within certain grid computing environments.
Pierre Ossman23f67c32014-09-17 16:28:56 +0200121.
Adam Tkac38ba8cf2011-04-27 11:28:09 +0000122.TP
123.B \-autokill
124Automatically kill Xvnc whenever the xstartup script exits. In most cases,
125this has the effect of terminating Xvnc when the user logs out of the window
126manager.
Pierre Ossman23f67c32014-09-17 16:28:56 +0200127.
Pierre Ossmanc16bb272014-09-17 14:18:31 +0200128.TP
Llorenç Garcia Martinez5d771f42015-10-23 13:42:13 +0200129.B \-noxstartup
130Do not run the %HOME/.vnc/xstartup script after launching Xvnc. This
131option allows you to manually start a window manager in your TigerVNC session.
132.
133.TP
Llorenç Garcia Martinez36eac992015-10-30 11:11:56 +0100134.B \-xstartup \fIscript\fP
135Run a custom startup script, instead of %HOME/.vnc/xstartup, after launching
136Xvnc. This is useful to run full-screen applications.
137.
138.TP
Pierre Ossmanc16bb272014-09-17 14:18:31 +0200139.B \-list
140Lists all VNC desktops started by vncserver.
141
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000142.SH FILES
143Several VNC-related files are found in the directory $HOME/.vnc:
144.TP
145$HOME/.vnc/xstartup
146A shell script specifying X applications to be run when a VNC desktop is
DRC7fe258a2009-03-26 18:58:40 +0000147started. If this file does not exist, then vncserver will create a default
148xstartup script which attempts to launch your chosen window manager.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000149.TP
Jeff Blaine8a9abc12016-08-06 16:22:18 -0400150/etc/tigervnc/vncserver-config-defaults
151The optional system-wide equivalent of $HOME/.vnc/config. If this file exists
152and defines options to be passed to Xvnc, they will be used as defaults for
153users. The user's $HOME/.vnc/config overrides settings configured in this file.
154The overall configuration file load order is: this file, $HOME/.vnc/config,
155and then /etc/tigervnc/vncserver-config-mandatory. None are required to exist.
156.TP
157/etc/tigervnc/vncserver-config-mandatory
158The optional system-wide equivalent of $HOME/.vnc/config. If this file exists
159and defines options to be passed to Xvnc, they will override any of the same
160options defined in a user's $HOME/.vnc/config. This file offers a mechanism
161to establish some basic form of system-wide policy. WARNING! There is
162nothing stopping users from constructing their own vncserver-like script
163that calls Xvnc directly to bypass any options defined in
164/etc/tigervnc/vncserver-config-mandatory. Likewise, any CLI arguments passed
165to vncserver will override ANY config file setting of the same name. The
166overall configuration file load order is:
167/etc/tigervnc/vncserver-config-defaults, $HOME/.vnc/config, and then this file.
168None are required to exist.
169.TP
graysky02cbc222015-10-19 08:26:44 -0400170$HOME/.vnc/config
171An optional server config file wherein options to be passed to Xvnc are listed
172to avoid hard-coding them to the physical invocation. List options in this file
173one per line. For those requiring an argument, simply separate the option from
174the argument with an equal sign, for example: "geometry=2000x1200" or
175"securitytypes=vncauth,tlsvnc". Options without an argument are simply listed
176as a single word, for example: "localhost" or "alwaysshared".
177.TP
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000178$HOME/.vnc/passwd
179The VNC password file.
180.TP
181$HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.log
182The log file for Xvnc and applications started in xstartup.
183.TP
184$HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.pid
185Identifies the Xvnc process ID, used by the
186.B \-kill
187option.
188
189.SH SEE ALSO
190.BR vncviewer (1),
191.BR vncpasswd (1),
192.BR vncconfig (1),
193.BR Xvnc (1)
194.br
Pierre Ossman32b96ff2018-10-19 14:56:53 +0200195https://www.tigervnc.org
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000196
197.SH AUTHOR
Pierre Ossmane37a1442014-09-17 14:08:16 +0200198Tristan Richardson, RealVNC Ltd., D. R. Commander and others.
Constantin Kaplinskyb30ae7f2006-05-25 05:04:46 +0000199
200VNC was originally developed by the RealVNC team while at Olivetti
Constantin Kaplinskybe1bda82006-06-02 04:43:52 +0000201Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were
Pierre Ossmane37a1442014-09-17 14:08:16 +0200202implemented by Constantin Kaplinsky. Many other people have since
203participated in development, testing and support. This manual is part
204of the TigerVNC software suite.