Xvnc(1)
πΈ NAME πΈ
Xvnc β the X VNC server. That's Xvnc(1) to you and me, and she's giving Virtual Network Computing main character energy. π
β¨
β¨ SYNOPSIS β¨
Xvnc [options] :display#
π¦ DESCRIPTION π¦
Okay so Xvnc is the X VNC (Virtual Network Computing) server. She's based on a standard X server, but she has a "virtual" screen rather than a physical one. X applications display themselves on it as if it were a normal X display, but they can only be accessed via a VNC viewer β see vncviewer(1). πβ¨
So Xvnc is really two servers in one β main character energy fr fr. To the applications, she's an X server; to the remote VNC users, she's a VNC server. By convention, we've arranged that the VNC server display number will be the same as the X server display number, which means you can use eg. snoopy:2 to refer to display 2 on machine "snoopy" in both the X world and the VNC world. ππ
The best way of starting Xvnc is via vncsession. This sets up the environment appropriately and starts a desktop environment. See the manual page for vncsession(8) for more information. π«Ά
π OPTIONS π
Xvnc takes lots of options β running Xvnc -help gives a list. Many of these are standard X server options, which are described in the Xserver(1) manual page. In addition to options which can only be set via the command-line, there are also "parameters" which can be set both via the command-line and through the vncconfig(1) program. Flexible queen, periodt. π
-depthdepth β Specify the pixel depth in bits of the desktop to be created. Default is24, other possible values are16and32. Anything else is likely to cause strange behaviour by applications and may prevent the server from starting at all. β οΈ So yeah, stick to the listed values, bestie β chaos is not the vibe here.-geometrywidthxheight β Specify the size of the desktop to be created. Default is1024x768. ππΈ-helpβ List all the options and parameters. She's helpful like that. β¨-inetdβ This significantly changesXvnc's behaviour so that it can be launched frominetd. See the section below on usage withinetd. π-pixelformatformat β Specify pixel format for server to use (BGRnnnorRGBnnn). The default for depth16isRGB565and for depth24and32isRGB888. π¨π-rendernodepath β DRM render node to use for DRI3 GPU acceleration. Specify an empty path to disable DRI3. Default isautowhich makesXvncpick a suitable available render node. ππ¦
πΈ PARAMETERS πΈ
okay bestie, so you can set VNC parameters both from the command line and through the vncconfig(1) program β and if you've got a VNC-enabled Xorg server, you can also do it with Options entries in the xorg.conf file. β¨
Here's the vibe check on syntax: turn a param on with -param, or off with -param=0. If it takes a value, hit it with -param value. Other valid forms are param=value, -param=value, and --param=value. And yes, parameter names are case-insensitive β no cap, capitalization is not the moment. π
-AcceptCutTextβ Accept clipboard updates from clients. Default is on. π-AcceptKeyEventsβ Accept key press and release events from clients. Default is on. β¨οΈ-AcceptPointerEventsβ Accept pointer movement and button events from clients. Default is on. π±οΈ-AcceptSetDesktopSizeβ Accept requests to resize the size of the desktop. Default is on. π₯οΈ-AllowOverrideβ Comma separated list of parameters that can be modified using VNC extension. Parameters can be modified for example usingvncconfig(1)program from inside a running session. (The default for this one is down below, keep scrolling π)-AlwaysSharedβ Always treat incoming connections as shared, regardless of the client-specified setting. Default is off. π€-AvoidShiftNumLockβ Keys affected by NumLock often require a fake Shift to be inserted in order for the correct symbol to be generated. Turning on this option avoids these extra fake Shift events but may result in a slightly different symbol (e.g. aReturninstead of a keypadEnter). π-BlacklistThresholdcount β The number of unauthenticated connection attempts allowed from any individual host before that host is black-listed. Default is5. π«-BlacklistTimeoutseconds β The initial timeout applied when a host is first black-listed. The host cannot re-attempt a connection until the timeout expires. Default is10. β³-CompareFBmode β Perform pixel comparison on framebuffer to reduce unnecessary updates. Can be either0(off),1(always) or2(auto). Default is2. π-desktopdesktop-name β Each desktop has a name which may be displayed by the viewer. It defaults to"<user>@<hostname>". π·οΈ-DisconnectClientsβ Disconnect existing clients if an incoming connection is non-shared. Default is on. IfDisconnectClientsis false, then a new non-shared connection will be refused while there is a client active. When combined withNeverSharedthis means only one client is allowed at a time. βοΈ-FrameRatefps β The maximum number of updates per second sent to each client. If the screen updates any faster then those changes will be aggregated and sent in a single update to the client. Note that this only controls the maximum rate and a client may get a lower rate when resources are limited. Default is60. ποΈ-GnuTLSPrioritypriority β GnuTLS priority string that controls the TLS sessionβs handshake algorithms. See the GnuTLS manual for possible values. ForGnuTLS < 3.6.3the default value will beNORMALto use upstream default. For newer versions of GnuTLS system-wide crypto policy will be used. π-IdleTimeoutseconds β The number of seconds after which an idle VNC connection will be dropped. Default is0, which means that idle connections will never be dropped. π€-ImprovedHextileβ Use improved compression algorithm for Hextile encoding which achieves better compression ratios at the cost of using slightly more CPU time. Default is on. π§©-interfaceIP address β Listen on interface. By default Xvnc listens on all available interfaces. π-localhostβ Only allow connections from the same machine. Useful if you use SSH and want to stop non-SSH connections from any other hosts. π-Loglogname:dest:level[, ...]β Configures the debug log settings.destcan currently bestderr,stdoutorsyslog, andlevelis between0and100,100meaning most verbose output.lognameis usually*meaning all, but you can target a specific source file if you know the name of its"LogWriter". Default is*:stderr:30. π-MaxConnectionTimeseconds β Terminate when a client has been connected for N seconds. Default is0. β±οΈ-MaxCutTextbytes β The maximum size of a clipboard update that will be accepted from a client. Default is262144. π-MaxDisconnectionTimeseconds β Terminate when no client has been connected for N seconds. Default is0. π°οΈ-MaxIdleTimeseconds β Terminate after N seconds of user inactivity. Default is0. π΄-NeverSharedβ Never treat incoming connections as shared, regardless of the client-specified setting. Default is off. π ββοΈ-ApproveLoggedUserOnlyβ Approve only the user who is currently logged into the session. This is expected to be combined with"Plain"security type and with"PlainUsers=*"option allowing everyone to connect to the session. Default is off. πͺͺ-pam_servicename,-PAMServicename β PAM service name to use when authenticating users using any of the"Plain"security types. Default isvnc. π-Passwordpassword β Obfuscated binary encoding of the password which clients must supply to access the server. Using this parameter is insecure, usePasswordFileparameter instead.
π¨ bestie pls don't use this one unless you literally have to β it's giving insecure. Use PasswordFile instead. π
-PasswordFilepasswd-file,-rfbauthpasswd-file β Password file for VNC authentication. There is no default, you should specify the password file explicitly. Password file should be created with thevncpasswd(1)utility. The file is accessed each time a connection comes in, so it can be changed on the fly. ποΈ-PlainUsersuser-list β A comma separated list of user names that are allowed to authenticate via any of the"Plain"security types (Plain,TLSPlain, etc.). Specify*to allow any user to authenticate using this security type. Specify%uto allow the user of the server process. Default is to deny all users. π₯-Protocol3.3β Always use protocol version 3.3 for backwards compatibility with badly-behaved clients. Default is off. πΉοΈ-QueryConnectβ Prompts the user of the desktop to explicitly accept or reject incoming connections. Default is off.
Thevncconfig(1)program must be running on the desktop in order forQueryConnectto be supported. π«Ά
-QueryConnectTimeoutseconds β Number of seconds to show the Accept connection dialog before rejecting the connection. Default is10. β²οΈ-RawKeyboardβ Send keyboard events straight through and avoid mapping them to the current keyboard layout. This effectively makes the keyboard behave according to the layout configured on the server instead of the layout configured on the client. Default is off. β¨οΈ-RemapKeysmapping β Sets up a keyboard mapping.mappingis a comma-separated string of character mappings, each of the formchar->char, orchar<>char, wherecharis a hexadecimal keysym. For example, to exchange the"and@symbols you would specify the following:RemapKeys=0x22<>0x40. π-RequireUsernameβ Require username for the RSA-AES security types. Default is off. π§Ύ-rfbportport β Specifies the TCP port on which Xvnc listens for connections from viewers (the protocol used in VNC is called RFB -"remote framebuffer"). The default is5900plus the display number. Specify-1to disable listening on a TCP port. π-rfbunixmodemode β Specifies the mode of the Unix domain socket. The default is0600. π-rfbunixpathpath β Specifies the path of a Unix domain socket on which Xvnc listens for connections from viewers. π€οΈ-RSAKeypath β Path to the RSA key for the RSA-AES security types (RA2,RA2ne,RA2_256andRA2ne_256) in PEM format. ποΈ-SecurityTypessec-types β Specify which security scheme to use for incoming connections. Valid values are a comma separated list ofNone,VncAuth,Plain,TLSNone,TLSVnc,TLSPlain,X509None,X509Vnc,X509Plain,RA2,RA2ne,RA2_256andRA2ne_256. Default isTLSVnc,VncAuth. π‘οΈ-SendCutTextβ Send clipboard changes to clients. Default is on. π€-SendPrimaryβ Send the primary selection and cut buffer to the server as well as the clipboard selection. Default is on. π―-SetPrimaryβ Set the primary selection as well as the clipboard selection. Default is on. β¨-UseBlacklistβ Temporarily reject connections from a host if it repeatedly fails to authenticate. Default is on. π«-UseIPv4β Use IPv4 for incoming and outgoing connections. Default is on. 4οΈβ£-UseIPv6β Use IPv6 for incoming and outgoing connections. Default is on. 6οΈβ£-X509Certpath β Path to a X509 certificate in PEM format to be used for all X509 based security types (X509None,X509Vnc, etc.). π-X509Keypath β Private key counterpart to the certificate given inX509Cert. Must also be in PEM format. π
β οΈ Security tea: allowing override of parameters such asPAMServiceorPasswordFilecan negatively impact security ifXvncruns under a different user than the programs allowed to override the parameters. π¨
When NoClipboard parameter is set, allowing override of SendCutText and AcceptCutText has no effect. π
Default for AllowOverride is desktop,AcceptPointerEvents,SendCutText,AcceptCutText,SendPrimary,SetPrimary.
π USAGE WITH INETD π
okay so this is the part where Xvnc gets its main character moment and honestly? iconic. π
Setup the inetd(1) service the right way and Xvnc can be launched on demand the second a connection comes in, instead of you having to start it manually like some kind of peasant. no cap, it's giving automation.
when you hand it the -inetd option, Xvnc stops listening for TCP connections on some port and instead just uses its standard input and standard output as the connection. simple as that, bestie.
There are two modes, and they're controlled by the wait/nowait entry in the inetd.conf file. π
nowait mode π¦
In nowait mode, Xvnc uses its standard input and output directly as the connection to a viewer. That's it, that's the whole vibe. It never has a listening socket, so it literally cannot accept further connections from viewers (it can, however, connect out to listening viewers by use of the vncconfig program β so it's not totally antisocial π«Ά).
Further viewer connections to the same TCP port result in inetd spawning off a new Xvnc to deal with each connection. When the connection to the viewer dies, that Xvnc and any associated X clients die with it. π
This behaviour is most useful when combined with the XDMCP options -query and -once. A typical example in inetd.conf might be (all on one line):
5950 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once securitytypes=none
In this example, a viewer connection to :50 will result in a new Xvnc for that connection, which should display the standard XDM login screen on that machine. And it's usually OK to accept connections without a VNC password here, since the user still needs to log in via XDM anyway. so like, the door's open but the bouncer's still there. πͺβ¨
wait mode πΈ
In wait mode, when the first connection comes in, inetd gives the listening socket to Xvnc. This means that for a given TCP port, there is only ever one Xvnc at a time. Further viewer connections to the same port are accepted by that same Xvnc in the normal way. And even when the original connection is broken, the Xvnc will continue to run β it does not fold under pressure, bestie. π€
If this is used with the XDMCP options -query and -once, the Xvnc and associated X clients will die when the user logs out of the X session in the normal way. It is important to use a VNC password in this case. π
fr fr, do NOT skip the password in wait mode. it's the whole point of the mode.
A typical entry in inetd.conf might be:
5951 stream tcp wait james /usr/local/bin/Xvnc Xvnc -inetd
-query localhost -once passwordFile=/home/james/.config/tigervnc/passwd
In fact, typically you'd have one entry for each user who uses VNC regularly, each of whom has their own dedicated TCP port which they use. In this example, when user "james" connects to :51, he enters his VNC password, then gets the XDM login screen where he logs in in the normal way. But unlike the previous example, if he disconnects, the session remains persistent, and when he reconnects he'll get the same session back again. ππ When he logs out of the X session, the Xvnc will die, but of course a new one will be created automatically the next time he connects. the circle of life, literally.
β¨ SEE ALSO β¨
vncconfig(1)vncpasswd(1)vncviewer(1)vncsession(8)Xserver(1)inetd(1)https://www.tigervnc.orgπ
π AUTHOR π
Tristan Richardson, RealVNC Ltd. and others.
VNC was originally developed by the RealVNC team while at Olivetti Research Ltd / AT&T Laboratories Cambridge. TightVNC additions were implemented by Constantin Kaplinsky. Many other people have since participated in development, testing and support. This manual is part of the TigerVNC software suite. π«Ά
and that's the whole page, bestie β go forth and share your screen π
sign-off szn: this lil masterpiece ships as part of TigerVNC, and its footer tags it as Xvnc(1) β that's the source/version and the page label, and the date's just vibing wherever the build put it. mwah. πβ¨
π¦ where this page comes from
- centos-stream 9: tigervnc-server-minimal 1.16.2-4.el9 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms