Pierre Ossman | f256a1a | 2014-09-17 14:09:58 +0200 | [diff] [blame] | 1 | .TH vncserver 1 "" "TigerVNC" "Virtual Network Computing" |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 2 | .SH NAME |
| 3 | vncserver \- 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 ] |
DRC | eed5d1f | 2009-03-26 19:16:19 +0000 | [diff] [blame] | 15 | .RB [ \-fp |
| 16 | .IR font-path ] |
DRC | 8fb1191 | 2011-03-03 10:42:14 +0000 | [diff] [blame] | 17 | .RB [ \-fg ] |
Adam Tkac | 38ba8cf | 2011-04-27 11:28:09 +0000 | [diff] [blame] | 18 | .RB [ \-autokill ] |
Llorenç Garcia Martinez | 5d771f4 | 2015-10-23 13:42:13 +0200 | [diff] [blame] | 19 | .RB [ \-noxstartup ] |
Llorenç Garcia Martinez | 36eac99 | 2015-10-30 11:11:56 +0100 | [diff] [blame] | 20 | .RB [ \-xstartup |
| 21 | .IR script ] |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 22 | .RI [ Xvnc-options... ] |
| 23 | .br |
| 24 | .BI "vncserver \-kill :" display# |
Pierre Ossman | c16bb27 | 2014-09-17 14:18:31 +0200 | [diff] [blame] | 25 | .br |
| 26 | .BI "vncserver \-list" |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 27 | .SH DESCRIPTION |
| 28 | .B vncserver |
| 29 | is used to start a VNC (Virtual Network Computing) desktop. |
| 30 | .B vncserver |
| 31 | is a Perl script which simplifies the process of starting an Xvnc server. It |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 32 | runs Xvnc with appropriate options and starts a window manager on the VNC |
| 33 | desktop. |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 34 | |
| 35 | .B vncserver |
| 36 | can be run with no options at all. In this case it will choose the first |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 37 | available display number (usually :1), start Xvnc with that display number, |
| 38 | and start the default window manager in the Xvnc session. You can also |
| 39 | specify the display number, in which case vncserver will attempt to start |
| 40 | Xvnc with that display number and exit if the display number is not |
| 41 | available. For example: |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 42 | |
| 43 | .RS |
| 44 | vncserver :13 |
| 45 | .RE |
| 46 | |
| 47 | Editing the file $HOME/.vnc/xstartup allows you to change the applications run |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 48 | at startup (but note that this will not affect an existing VNC session.) |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 49 | |
| 50 | .SH OPTIONS |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 51 | You can get a list of options by passing \fB\-h\fP as an option to vncserver. |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 52 | In addition to the options listed below, any unrecognised options will be |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 53 | passed to Xvnc - see the Xvnc man page, or "Xvnc \-help", for details. |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 54 | |
| 55 | .TP |
| 56 | .B \-name \fIdesktop-name\fP |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 57 | Each VNC desktop has a name which may be displayed by the viewer. The desktop |
| 58 | name defaults to "\fIhost\fP:\fIdisplay#\fP (\fIusername\fP)", but you can |
| 59 | change it with this option. The desktop name option is passed to the xstartup |
| 60 | script via the $VNCDESKTOP environment variable, which allows you to run a |
| 61 | different set of applications depending on the name of the desktop. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 62 | . |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 63 | .TP |
| 64 | .B \-geometry \fIwidth\fPx\fIheight\fP |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 65 | Specify the size of the VNC desktop to be created. Default is 1024x768. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 66 | . |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 67 | .TP |
| 68 | .B \-depth \fIdepth\fP |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 69 | Specify the pixel depth (in bits) of the VNC desktop to be created. Default is |
| 70 | 24. Other possible values are 8, 15 and 16 - anything else is likely to cause |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 71 | strange behaviour by applications. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 72 | . |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 73 | .TP |
| 74 | .B \-pixelformat \fIformat\fP |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 75 | Specify pixel format for Xvnc to use (BGRnnn or RGBnnn). The default for |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 76 | depth 8 is BGR233 (meaning the most significant two bits represent blue, the |
| 77 | next three green, and the least significant three represent red), the default |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 78 | for depth 16 is RGB565, and the default for depth 24 is RGB888. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 79 | . |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 80 | .TP |
| 81 | .B \-cc 3 |
| 82 | As an alternative to the default TrueColor visual, this allows you to run an |
| 83 | Xvnc server with a PseudoColor visual (i.e. one which uses a color map or |
| 84 | palette), which can be useful for running some old X applications which only |
| 85 | work on such a display. Values other than 3 (PseudoColor) and 4 (TrueColor) |
| 86 | for the \-cc option may result in strange behaviour, and PseudoColor desktops |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 87 | must have an 8-bit depth. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 88 | . |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 89 | .TP |
| 90 | .B \-kill :\fIdisplay#\fP |
| 91 | This kills a VNC desktop previously started with vncserver. It does this by |
| 92 | killing the Xvnc process, whose process ID is stored in the file |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 93 | "$HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.pid". The |
| 94 | .B \-kill |
| 95 | option ignores anything preceding the first colon (":") in the display |
| 96 | argument. Thus, you can invoke "vncserver \-kill $DISPLAY", for example at the |
| 97 | end of your xstartup file after a particular application exits. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 98 | . |
DRC | eed5d1f | 2009-03-26 19:16:19 +0000 | [diff] [blame] | 99 | .TP |
| 100 | .B \-fp \fIfont-path\fP |
DRC | 36546c1 | 2009-04-15 06:47:23 +0000 | [diff] [blame] | 101 | If the vncserver script detects that the X Font Server (XFS) is running, it |
| 102 | will attempt to start Xvnc and configure Xvnc to use XFS for font handling. |
| 103 | Otherwise, if XFS is not running, the vncserver script will attempt to start |
| 104 | Xvnc and allow Xvnc to use its own preferred method of font handling (which may |
| 105 | be a hard-coded font path or, on more recent systems, a font catalog.) In |
| 106 | any case, if Xvnc fails to start, the vncserver script will then attempt to |
| 107 | determine an appropriate X font path for this system and start Xvnc using |
| 108 | that font path. |
| 109 | |
| 110 | The |
DRC | eed5d1f | 2009-03-26 19:16:19 +0000 | [diff] [blame] | 111 | .B \-fp |
DRC | 36546c1 | 2009-04-15 06:47:23 +0000 | [diff] [blame] | 112 | argument allows you to override the above fallback logic and specify a font |
| 113 | path for Xvnc to use. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 114 | . |
DRC | 8fb1191 | 2011-03-03 10:42:14 +0000 | [diff] [blame] | 115 | .TP |
| 116 | .B \-fg |
Adam Tkac | f586b84 | 2011-04-27 11:20:18 +0000 | [diff] [blame] | 117 | Runs Xvnc as a foreground process. This has two effects: (1) The VNC server |
| 118 | can be aborted with CTRL-C, and (2) the VNC server will exit as soon as the |
| 119 | user logs out of the window manager in the VNC session. This may be necessary |
| 120 | when launching TigerVNC from within certain grid computing environments. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 121 | . |
Adam Tkac | 38ba8cf | 2011-04-27 11:28:09 +0000 | [diff] [blame] | 122 | .TP |
| 123 | .B \-autokill |
| 124 | Automatically kill Xvnc whenever the xstartup script exits. In most cases, |
| 125 | this has the effect of terminating Xvnc when the user logs out of the window |
| 126 | manager. |
Pierre Ossman | 23f67c3 | 2014-09-17 16:28:56 +0200 | [diff] [blame] | 127 | . |
Pierre Ossman | c16bb27 | 2014-09-17 14:18:31 +0200 | [diff] [blame] | 128 | .TP |
Llorenç Garcia Martinez | 5d771f4 | 2015-10-23 13:42:13 +0200 | [diff] [blame] | 129 | .B \-noxstartup |
| 130 | Do not run the %HOME/.vnc/xstartup script after launching Xvnc. This |
| 131 | option allows you to manually start a window manager in your TigerVNC session. |
| 132 | . |
| 133 | .TP |
Llorenç Garcia Martinez | 36eac99 | 2015-10-30 11:11:56 +0100 | [diff] [blame] | 134 | .B \-xstartup \fIscript\fP |
| 135 | Run a custom startup script, instead of %HOME/.vnc/xstartup, after launching |
| 136 | Xvnc. This is useful to run full-screen applications. |
| 137 | . |
| 138 | .TP |
Pierre Ossman | c16bb27 | 2014-09-17 14:18:31 +0200 | [diff] [blame] | 139 | .B \-list |
| 140 | Lists all VNC desktops started by vncserver. |
| 141 | |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 142 | .SH FILES |
| 143 | Several VNC-related files are found in the directory $HOME/.vnc: |
| 144 | .TP |
| 145 | $HOME/.vnc/xstartup |
| 146 | A shell script specifying X applications to be run when a VNC desktop is |
DRC | 7fe258a | 2009-03-26 18:58:40 +0000 | [diff] [blame] | 147 | started. If this file does not exist, then vncserver will create a default |
| 148 | xstartup script which attempts to launch your chosen window manager. |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 149 | .TP |
Jeff Blaine | 8a9abc1 | 2016-08-06 16:22:18 -0400 | [diff] [blame] | 150 | /etc/tigervnc/vncserver-config-defaults |
| 151 | The optional system-wide equivalent of $HOME/.vnc/config. If this file exists |
| 152 | and defines options to be passed to Xvnc, they will be used as defaults for |
| 153 | users. The user's $HOME/.vnc/config overrides settings configured in this file. |
| 154 | The overall configuration file load order is: this file, $HOME/.vnc/config, |
| 155 | and then /etc/tigervnc/vncserver-config-mandatory. None are required to exist. |
| 156 | .TP |
| 157 | /etc/tigervnc/vncserver-config-mandatory |
| 158 | The optional system-wide equivalent of $HOME/.vnc/config. If this file exists |
| 159 | and defines options to be passed to Xvnc, they will override any of the same |
| 160 | options defined in a user's $HOME/.vnc/config. This file offers a mechanism |
| 161 | to establish some basic form of system-wide policy. WARNING! There is |
| 162 | nothing stopping users from constructing their own vncserver-like script |
| 163 | that calls Xvnc directly to bypass any options defined in |
| 164 | /etc/tigervnc/vncserver-config-mandatory. Likewise, any CLI arguments passed |
| 165 | to vncserver will override ANY config file setting of the same name. The |
| 166 | overall configuration file load order is: |
| 167 | /etc/tigervnc/vncserver-config-defaults, $HOME/.vnc/config, and then this file. |
| 168 | None are required to exist. |
| 169 | .TP |
graysky | 02cbc22 | 2015-10-19 08:26:44 -0400 | [diff] [blame] | 170 | $HOME/.vnc/config |
| 171 | An optional server config file wherein options to be passed to Xvnc are listed |
| 172 | to avoid hard-coding them to the physical invocation. List options in this file |
| 173 | one per line. For those requiring an argument, simply separate the option from |
| 174 | the argument with an equal sign, for example: "geometry=2000x1200" or |
| 175 | "securitytypes=vncauth,tlsvnc". Options without an argument are simply listed |
| 176 | as a single word, for example: "localhost" or "alwaysshared". |
| 177 | .TP |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 178 | $HOME/.vnc/passwd |
| 179 | The VNC password file. |
| 180 | .TP |
| 181 | $HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.log |
| 182 | The log file for Xvnc and applications started in xstartup. |
| 183 | .TP |
| 184 | $HOME/.vnc/\fIhost\fP:\fIdisplay#\fP.pid |
| 185 | Identifies the Xvnc process ID, used by the |
| 186 | .B \-kill |
| 187 | option. |
| 188 | |
| 189 | .SH SEE ALSO |
| 190 | .BR vncviewer (1), |
| 191 | .BR vncpasswd (1), |
| 192 | .BR vncconfig (1), |
| 193 | .BR Xvnc (1) |
| 194 | .br |
Pierre Ossman | 32b96ff | 2018-10-19 14:56:53 +0200 | [diff] [blame] | 195 | https://www.tigervnc.org |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 196 | |
| 197 | .SH AUTHOR |
Pierre Ossman | e37a144 | 2014-09-17 14:08:16 +0200 | [diff] [blame] | 198 | Tristan Richardson, RealVNC Ltd., D. R. Commander and others. |
Constantin Kaplinsky | b30ae7f | 2006-05-25 05:04:46 +0000 | [diff] [blame] | 199 | |
| 200 | VNC was originally developed by the RealVNC team while at Olivetti |
Constantin Kaplinsky | be1bda8 | 2006-06-02 04:43:52 +0000 | [diff] [blame] | 201 | Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were |
Pierre Ossman | e37a144 | 2014-09-17 14:08:16 +0200 | [diff] [blame] | 202 | implemented by Constantin Kaplinsky. Many other people have since |
| 203 | participated in development, testing and support. This manual is part |
| 204 | of the TigerVNC software suite. |