vncviewer(1)

πŸ“¦
version 1.16.2 Β· 3 versions
, in alpine 3.24, arch rolling, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– vncviewer(1) β€” Virtual Network Computing πŸ’–

okay bestie, welcome to the manual page for vncviewer, from the Virtual Network Computing crew πŸ¦‹ this whole thing documents version 4 for the X window system, so like, that's the vibe we're working with.


✨ NAME ✨

vncviewer β€” VNC viewer for X πŸ‘‘


🌸 SYNOPSIS 🌸

vncviewer [options] [host][:display#]
vncviewer [options] [host][::port]
vncviewer [options] [unix socket]
vncviewer [options] -listen [port]
vncviewer [options] [.tigervnc file]

πŸ’… DESCRIPTION πŸ’…

so vncviewer is a viewer (client) for Virtual Network Computing, and this manual page documents version 4 for the X window system. no cap, that's the whole thing πŸ’–

if you run the viewer with no arguments at all, it will literally just prompt you for a VNC server to connect to. but if you're a main character who knows what she wants, you can hand it the VNC server as an argument instead, like:

vncviewer snoopy:2

where snoopy is the name of the machine, and 2 is the display number of the VNC server on that machine. and here's the cute part β€” either the machine name or the display number can be omitted. so :1 means display number 1 on the same machine, and snoopy means snoopy:0, i.e. display 0 on machine snoopy. slay ✨

there's another quick way to start a connection, and it's giving convenience: just specify a .tigervnc configuration file as an argument to the viewer, like:

vncviewer ./some.tigervnc

where ./some.tigervnc is an existing and valid TigerVNC configuration file. important detail bestie β€” the file name needs to include a path separator. you can give additional options too, but heads up: the given configuration file will overwrite any conflicting parameters. periodt.

if the VNC server is successfully contacted, you'll be prompted for a password to authenticate you. you can also add VNC_USERNAME and VNC_PASSWORD to environment variables πŸ‘€ and if the password is correct, a window will appear showing the desktop of the VNC server. iconic behavior honestly 🫢


🌈 AUTOMATIC PROTOCOL SELECTION 🌈

the viewer tests the speed of the connection to the server and chooses the encoding and pixel format (color level) appropriately. this makes it so much easier to use than previous versions, where the user had to specify arcane command line arguments 😭 (arcane!! in the year of our lord!!)

the viewer normally starts out assuming the link is slow, using the encoding with the best compression. but if it turns out the link is fast enough, it switches to an encoding which compresses less but is faster to generate β€” thus improving the interactive feel. it's giving adaptive πŸ’…

and it normally starts in full-color mode, but switches to low-color mode if the bandwidth is insufficient. however (and this is the important caveat, don't skip it) this only occurs when communicating with servers supporting protocol 3.8 or newer, since many old servers do not support color mode changes safely. so yeah, the old ones are on their own 🧚

automatic selection can be turned off by setting the AutoSelect parameter to false, or from the options dialog. your choice, bestie ✨


πŸŽ€ KEYBOARD SHORTCUTS πŸŽ€

the viewer can be controlled using certain key combinations, invoking special actions instead of passing the keyboard events on to the remote session. by default, pressing Ctrl+Alt and something else will be interpreted as a keyboard shortcut for the viewer, but this can be changed witht the ShortcutModifiers parameter. (yes the original really does say "witht", i'm just the messenger 😭)

the possible keyboard shortcuts are:

  • Ctrl+Alt β€” releases control of the keyboard and allows system keys to be used locally.
  • Ctrl+Alt+G β€” grabs control of the keyboard and allows system keys (like Alt+Tab) to be sent to the remote session.
  • Ctrl+Alt+Enter β€” toggles full-screen mode.
  • Ctrl+Alt+M β€” opens a popup menu that can perform various extra actions, such as quitting the viewer or opening the options dialog.
  • Ctrl+Alt+Space β€” temporarily bypasses the keyboard shortcuts, allowing the same key combinations to be sent to the remote session.

πŸ¦‹ FULL-SCREEN MODE πŸ¦‹

a full-screen mode is supported. this is particularly useful when connecting to a remote screen which is the same size as your local one. and if the remote screen is bigger? you can scroll by bumping the mouse against the edge of the screen πŸ’€ literally just shove it into the wall, it works.


bestie this page keeps going β€” more parts incoming, don't go anywhere 🌸

✨ OPTIONS (PARAMETERS) ✨

okay bestie, so you want the full menu of what you can tweak? you can literally just run vncviewer with -h and it'll dump a list of parameters at you. πŸ’…

here's the vibe: turn a parameter on with -param, or off with -param=0. if a parameter takes a value, you write it like -param value. and because the devs were feeling generous, these other forms work too:

param=value
-param=value
--param=value

oh and also β€” parameter names are case-insensitive. no cap. πŸŽ€

a bunch of these can ALSO be set graphically through the options dialog box, which you can open from the popup menu or from the "Connection details" dialog box. cute right?


  • -AcceptClipboard β€” accept clipboard changes coming from the server. default is on.
  • -AlertOnFatalError β€” pop up a dialog showing any fatal error before it exits. default is on.
  • -AlwaysCursor β€” show a local cursor when the server sends an invisible cursor. default is off.
  • -AutoSelect β€” use automatic selection of encoding and pixel format (default is on). normally the viewer tests the speed of the connection to the server and picks the encoding and pixel format accordingly. turn it off with -AutoSelect=0.
  • -CompressLevel level β€” use the specified lossless compression level. 0 = Low, 9 = High. default is 2.
  • -CursorType type β€” specify which cursor type to use when a local cursor is shown. it should be either "Dot" or "System". ignored if AlwaysCursor is off. default is "Dot".
  • -CustomCompressLevel β€” use custom compression level as specified by CompressLevel. default is off.
  • -DesktopSize widthxheight β€” instead of keeping the existing remote screen size, the client will attempt to switch to the specified size when connecting. if the server doesn't support the SetDesktopSize message then the screen will retain the original size.
  • -display Xdisplay β€” specifies the X display on which the TigerVNC window should appear.
  • -DotWhenNoCursor (DEPRECATED) β€” show the dot cursor when the server sends an invisible cursor. replaced by -AlwaysCursor and -CursorType=Dot.
  • -EmulateMiddleButton β€” emulate the middle mouse button by pressing left and right mouse buttons simultaneously. default is off.
  • -FullColor, -FullColour β€” tells the VNC server to send full-color pixels in the best format for this display. this is the default.
  • -FullScreen β€” start in full-screen mode.
  • -FullScreenAllMonitors (DEPRECATED) β€” use all local monitors and not just the current one when switching to full-screen mode. replaced by -FullScreenMode=all.
  • -FullScreenMode mode β€” specify which monitors to use when in full screen. it should be either "Current", "Selected" (specified by -FullScreenSelectedMonitors) or "All". default is "Current".
  • -FullScreenSelectedMonitors monitors β€” this option specifies the monitors to use with -FullScreenMode=selected. monitors are ordered according to the system configuration from left to right, and in case of a conflict, from top to bottom. so like, for example, "1,2,3" means the first, second and third monitor counting from the left should be used. default is "1".
  • -FullscreenSystemKeys β€” automatically grab all input from the keyboard when entering full-screen and pass special keys (like Alt+Tab) directly to the server.
  • -geometry geometry β€” initial position of the main TigerVNC window. the format is widthxheight+xoffset+yoffset, where the + signs can be swapped for - signs to specify offsets from the right and/or from the bottom of the screen. offsets are optional and the window will be placed by the window manager by default.
  • -GnuTLSPriority priority β€” GnuTLS priority string that controls the TLS session's handshake algorithms. see the GnuTLS manual for possible values. default is NORMAL.
  • -listen [port] β€” causes vncviewer to listen on the given port (default 5500) for reverse connections from a VNC server. WinVNC supports reverse connections initiated using the 'Add new client' menu option or the '-connect' command-line option. Xvnc supports reverse connections with a helper program called vncconfig.
  • -Log logname:dest:level[, ...] β€” configures the debug log settings. dest can currently be stderr or stdout, and level is between 0 and 100, 100 meaning most verbose output. logname is usually * meaning all, but you can target a specific source file if you know the name of its "LogWriter". default is *:stderr:30.
  • -LowColorLevel, -LowColourLevel level β€” selects the reduced color level to use on slow links. level can range from 0 to 2, 0 meaning 8 colors, 1 meaning 64 colors (the default), 2 meaning 256 colors. note that the decision on whether a reduced color level is used is made by vncviewer itself. if you want to force vncviewer to use the reduced color level, use the -AutoSelect=0 parameter.
  • -MaxCutText bytes β€” the maximum size of a clipboard update that will be accepted from a server. default is 262144.
  • -Maximize β€” maximize the viewer window.
  • -NoJpeg β€” disable lossy JPEG compression. default is off.
  • -passwd, -PasswordFile password-file β€” if you're on a filesystem that gives you access to the password file used by the server, you can specify it here to avoid typing it in. it'll usually be $XDG_CONFIG_HOME/tigervnc/passwd, or ~/.config/tigervnc/passwd if the former is unset.
  • -PointerEventInterval time β€” time in milliseconds to rate-limit successive pointer events. default is 17 ms (60 Hz).
  • -PreferredEncoding encoding β€” this option specifies the preferred encoding to use, from one of "Tight", "JPEG", "ZRLE", "Hextile", "H.264", or "Raw".
  • -QualityLevel level β€” JPEG quality level. 0 = Low, 9 = High. may be adjusted automatically if -AutoSelect is turned on. default is 8.
  • -ReconnectOnError β€” display a dialog with any error and offer the possibility to retry establishing the connection. if this is off, no dialog to re-connect will be offered. default is on.
  • -RemoteResize β€” dynamically resize the remote desktop size as the size of the local client window changes. note that this may not work with all VNC servers.
  • -SecurityTypes sec-types β€” specify which security schemes to attempt to use when authenticating with the server. valid values are a comma separated list of None, VncAuth, Plain, TLSNone, TLSVnc, TLSPlain, X509None, X509Vnc, X509Plain, RA2, RA2ne, RA2_256 and RA2ne_256. default is to attempt every supported scheme.
  • -SendClipboard β€” send clipboard changes to the server. default is on.
  • -SendPrimary β€” send the primary selection 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.
  • -Shared β€” when you make a connection to a VNC server, all other existing connections are normally closed. this option requests that they be left open, letting you share the desktop with someone already using it. 🫢
  • -ShortcutModifiers keys β€” the combination of modifier keys that triggers special actions in the viewer instead of being sent to the remote session. possible values are a combination of Ctrl, Shift, Alt, and Super. default is Ctrl,Alt.
  • -UseIPv4 β€” use IPv4 for incoming and outgoing connections. default is on.
  • -UseIPv6 β€” use IPv6 for incoming and outgoing connections. default is on.
  • -via gateway β€” automatically create an encrypted TCP tunnel to the gateway machine before connecting, then connect to the host through that tunnel (TigerVNC-specific). by default, this option invokes SSH local port forwarding, assuming the SSH client binary can be accessed as /usr/bin/ssh. note that when using the -via option, the host machine name should be specified as known to the gateway machine β€” e.g. "localhost" denotes the gateway, not the machine where vncviewer was launched. the environment variable VNC_VIA_CMD can override the default tunnel command of:
/usr/bin/ssh -f -L "$L":"$H":"$R" "$G" sleep 20

the tunnel command is executed with the environment variables L, H, R, and G taking the values of the local port number, the remote host, the port number on the remote host, and the gateway machine respectively.

  • -ViewOnly β€” specifies that no keyboard or mouse events should be sent to the server. useful if you want to view a desktop without interfering; often needs to be combined with -Shared.
  • -X509CA path β€” path to the CA certificate to use when authenticating remote servers using any of the X509 security schemes (X509None, X509Vnc, etc.). must be in PEM format. default is $XDG_CONFIG_HOME/tigervnc/x509_ca.pem, or ~/.config/tigervnc/x509_ca.pem.
  • -X509CRL path β€” path to the certificate revocation list to use in conjunction with -X509CA. must also be in PEM format. default is $XDG_CONFIG_HOME/tigervnc/x509_crl.pem, or ~/.config/tigervnc/x509_crl.pem.

🌸 FILES 🌸

  • $XDG_CONFIG_HOME/tigervnc/default.tigervnc
  • $HOME/.config/tigervnc/default.tigervnc

default configuration options. this file must have a "magic" first line of "TigerVNC Configuration file Version 1.0" (without quotes), followed by simple <setting>=<value> pairs of your choosing. the available settings are those shown in this man page. ✨

  • $XDG_CONFIG_HOME/tigervnc/x509_ca.pem
  • $HOME/.config/tigervnc/x509_ca.pem

default CA certificate for authenticating servers.

  • $XDG_CONFIG_HOME/tigervnc/x509_crl.pem
  • $HOME/.config/tigervnc/x509_crl.pem

default certificate revocation list.

  • $XDG_DATA_HOME/tigervnc/x509_known_hosts
  • $HOME/.local/share/tigervnc/x509_known_hosts

known hosts database for certificate-based authentication.

  • $XDG_STATE_HOME/tigervnc/tigervnc.history
  • $HOME/.local/state/tigervnc/tigervnc.history

history file for hostnames that have been recently connected to.


πŸ‘€ SEE ALSO πŸ‘€

Xvnc(1), vncpasswd(1), vncconfig(1), vncsession(8)

https://www.tigervnc.org

πŸ‘‘ AUTHOR πŸ‘‘

Okay bestie, story time, because the lore here is honestly iconic. πŸ’–

  • Tristan Richardson, RealVNC Ltd. and others. ✨

So here's the tea, fr fr: VNC was originally developed by the RealVNC team back when they were chilling at Olivetti Research Ltd / AT&T Laboratories Cambridge. πŸ›οΈ Like, imagine being that smart, couldn't be me (it absolutely could be them, they ate πŸ’…).

Then the TightVNC additions got implemented by Constantin Kaplinsky. 🫢 King behavior, no cap.

And since then? A whole crowd of other people have participated in development, testing and support. 🌈 So many hands, so much slay, and honestly we're all just living in their legacy. πŸ˜­πŸ‘‘

Oh and btw, this manual is part of the TigerVNC software suite. 🐯✨ Just so you know where you are, iykyk.


Shoutout to everyone who ever touched this codebase, tested it, or answered a confused question on a forum. You're the main character energy this whole thing runs on. πŸŽ€

And that's a wrap on the whole page, bestie! This lil' doc came to you from the TigerVNC suite, page vncviewer(1) β€” go forth, connect to something, and slay. πŸ’œπŸ¦‹πŸ§š

the end πŸ’–