"                       file:name       run -remote commands from file \"name\",\n" "                                       one command per line,blank and # skipped\n"
"                       desktop:str     set -desktop name to str for new clients.\n" "                       rfbport:n       set -rfbport to n.\n" "                       http            enable  http client connections.\n" "                       nohttp          disable http client connections.\n" "                       httpport:n      set -httpport to n.\n" "                       httpdir:dir     set -httpdir to dir (and enable http).\n" "                       enablehttpproxy   enable  -enablehttpproxy mode.\n" "                       noenablehttpproxy disable -enablehttpproxy mode.\n" "                       alwaysshared     enable  -alwaysshared mode.\n" "                       noalwaysshared   disable -alwaysshared mode.\n" "                                        (may interfere with other options)\n" "                       nevershared      enable  -nevershared mode.\n" "                       nonevershared    disable -nevershared mode.\n" "                                        (may interfere with other options)\n" "                       dontdisconnect   enable  -dontdisconnect mode.\n" "                       nodontdisconnect disable -dontdisconnect mode.\n" "                                        (may interfere with other options)\n"
static void print_help(void) {	char help[] = "\n""x11vnc: allow VNC connections to real X11 displays. %s\n""\n""Typical usage is:\n""\n""   Run this command in a shell on the remote machine \"far-host\"\n""   with X session you wish to view:\n""\n""       x11vnc -display :0\n""\n""   Then run this in another window on the machine you are sitting at:\n""\n""       vncviewer far-host:0\n""\n""Once x11vnc establishes connections with the X11 server and starts listening\n""as a VNC server it will print out a string: PORT=XXXX where XXXX is typically\n""5900 (the default VNC server port).  One would next run something like\n""this on the local machine: \"vncviewer hostname:N\" where \"hostname\" is\n""the name of the machine running x11vnc and N is XXXX - 5900, i.e. usually\n""\"vncviewer hostname:0\".\n""\n""By default x11vnc will not allow the screen to be shared and it will exit\n""as soon as a client disconnects.  See -shared and -forever below to override\n""these protections.  See the FAQ on how to tunnel the VNC connection through\n""an encrypted channel such as ssh(1).\n""\n""For additional info see: http://www.karlrunge.com/x11vnc/\n""                    and  http://www.karlrunge.com/x11vnc/#faq\n""\n""\n""Rudimentary config file support: if the file $HOME/.x11vncrc exists then each\n""line in it is treated as a single command line option.  Disable with -norc.\n""For each option name, the leading character \"-\" is not required.  E.g. a\n""line that is either \"nap\" or \"-nap\" may be used and are equivalent.\n""Likewise \"wait 100\" or \"-wait 100\" are acceptable and equivalent lines.\n""The \"#\" character comments out to the end of the line in the usual way.\n""Leading and trailing whitespace is trimmed off.  Lines may be continued with\n""a \"\\\" as the last character of a line (it becomes a space character).\n""\n""Options:\n""\n""-display disp          X11 server display to connect to, usually :0.  The X\n""                       server process must be running on same machine and\n""                       support MIT-SHM.  Equivalent to setting the DISPLAY\n""                       environment variable to \"disp\".\n""-auth file             Set the X authority file to be \"file\", equivalent to\n""                       setting the XAUTHORITY environment varirable to \"file\"\n""                       before startup.  See Xsecurity(7), xauth(1) man pages.\n""\n""-id windowid           Show the window corresponding to \"windowid\" not\n""                       the entire display.  New windows like popup menus,\n""                       transient toplevels, etc, may not be seen or may be\n""                       clipped.  Disabling SaveUnders or BackingStore in the\n""                       X server may help show them.  x11vnc may crash if the\n""                       window is initially partially obscured, changes size,\n""                       is iconified, etc.  Some steps are taken to avoid this\n""                       and the -xrandr mechanism is used to track resizes.  Use\n""                       xwininfo(1) to get the window id, or use \"-id pick\"\n""                       to have x11vnc run xwininfo(1) for you and extract\n""                       the id.  The -id option is useful for exporting very\n""                       simple applications (e.g. the current view on a webcam).\n""-sid windowid          As -id, but instead of using the window directly it\n""                       shifts a root view to it: this shows SaveUnders menus,\n""                       etc, although they will be clipped if they extend beyond\n""                       the window.\n""-flashcmap             In 8bpp indexed color, let the installed colormap flash\n""                       as the pointer moves from window to window (slow).\n""-notruecolor           For 8bpp displays, force indexed color (i.e. a colormap)\n""                       even if it looks like 8bpp TrueColor. (rare problem)\n""-visual n              Experimental option: probably does not do what you\n""                       think.  It simply *forces* the visual used for the\n""                       framebuffer; this may be a bad thing... (e.g. messes\n""                       up colors or cause a crash). It is useful for testing\n""                       and for some workarounds.  n may be a decimal number,\n""                       or 0x hex.  Run xdpyinfo(1) for the values.  One may\n""                       also use \"TrueColor\", etc. see <X11/X.h> for a list.\n""                       If the string ends in \":m\" for better or for worse\n""                       the visual depth is forced to be m.\n""-overlay               Handle multiple depth visuals on one screen, e.g. 8+24\n""                       and 24+8 overlay visuals (the 32 bits per pixel are\n""                       packed with 8 for PseudoColor and 24 for TrueColor).\n""\n""                       Currently -overlay only works on Solaris via\n""                       XReadScreen(3X11) and IRIX using XReadDisplay(3).\n""                       On Solaris there is a problem with image \"bleeding\"\n""                       around transient popup menus (but not for the menu\n""                       itself): a workaround is to disable SaveUnders\n""                       by passing the \"-su\" argument to Xsun (in\n""                       /etc/dt/config/Xservers).  Also note that the mouse\n""                       cursor shape is exactly correct in this mode.\n""\n""                       Use -overlay as a workaround for situations like these:\n""                       Some legacy applications require the default visual to\n""                       be 8bpp (8+24), or they will use 8bpp PseudoColor even\n""                       when the default visual is depth 24 TrueColor (24+8).\n""                       In these cases colors in some windows will be messed\n""                       up in x11vnc unless -overlay is used.  Another use of\n""                       -overlay is to enable showing the exact mouse cursor\n""                       shape (details below).\n""\n""                       Under -overlay, performance will be somewhat degraded\n""                       due to the extra image transformations required.\n""                       For optimal performance do not use -overlay, but rather\n""                       configure the X server so that the default visual is\n""                       depth 24 TrueColor and try to have all apps use that\n""                       visual (some apps have -use24 or -visual options).\n""-overlay_nocursor      Sets -overlay, but does not try to draw the exact mouse\n""                       cursor shape using the overlay mechanism.\n""\n""-scale fraction        Scale the framebuffer by factor \"fraction\".  Values\n""                       less than 1 shrink the fb, larger ones expand it.\n""                       Note: image may not be sharp and response may be\n""                       slower.  Currently the cursor shape is not scaled.\n""                       If \"fraction\" contains a decimal point \".\" it\n""                       is taken as a floating point number, alternatively\n""                       the notation \"m/n\" may be used to denote fractions\n""                       exactly, e.g. -scale 2/3.\n""\n""                       Scaling Options: can be added after \"fraction\" via\n""                       \":\", to supply multiple \":\" options use commas.\n""                       If you just want a quick, rough scaling without\n""                       blending, append \":nb\" to \"fraction\" (e.g. -scale\n""                       1/3:nb).  For compatibility with vncviewers the scaled\n""                       width is adjusted to be a multiple of 4: to disable\n""                       this use \":n4\".  More esoteric options: \":in\" use\n""                       interpolation scheme even when shrinking, \":pad\",\n""                       pad scaled width and height to be multiples of scaling\n""                       denominator (e.g. 3 for 2/3).\n""\n""-viewonly              All VNC clients can only watch (default %s).\n""-shared                VNC display is shared (default %s).\n""-once                  Exit after the first successfully connected viewer\n""                       disconnects, opposite of -forever. This is the Default.\n""-forever               Keep listening for more connections rather than exiting\n""                       as soon as the first client(s) disconnect. Same as -many\n""-inetd                 Launched by inetd(1): stdio instead of listening socket.\n""                       Note: if you are not redirecting stderr to a log file\n""                       (via shell 2> or -o option) you must also specify the\n""                       -q option, otherwise the stderr goes to the viewer.\n""-connect string        For use with \"vncviewer -listen\" reverse connections.\n""                       If \"string\" has the form \"host\" or \"host:port\"\n""                       the connection is made once at startup.  Use commas\n""                       for a list of host's and host:port's.  If \"string\"\n""                       contains \"/\" it is instead interpreted as a file to\n""                       periodically check for new hosts.  The first line is\n""                       read and then the file is truncated.\n""-vncconnect            Monitor the VNC_CONNECT X property set by the standard\n""-novncconnect          VNC program vncconnect(1).  When the property is\n""                       set to \"host\" or \"host:port\" establish a reverse\n""                       connection.  Using xprop(1) instead of vncconnect may\n""                       work (see the FAQ).  Default: %s\n""\n""-allow host1[,host2..] Only allow client connections from hosts matching\n""                       the comma separated list of hostnames or IP addresses.\n""                       Can also be a numerical IP prefix, e.g. \"192.168.100.\"\n""                       to match a simple subnet, for more control build\n""                       libvncserver with libwrap support (See the FAQ).  If the\n""                       list contains a \"/\" it instead is a interpreted as a\n""                       file containing addresses or prefixes that is re-read\n""                       each time a new client connects.  Lines can be commented\n""                       out with the \"#\" character in the usual way.\n""-localhost             Same as -allow 127.0.0.1\n""-viewpasswd string     Supply a 2nd password for view-only logins.  The -passwd\n""                       (full-access) password must also be supplied.\n""-passwdfile filename   Specify libvncserver -passwd via the first line of\n""                       the file \"filename\" instead of via command line.\n""                       If a second non blank line exists in the file it is\n""                       taken as a view-only password (i.e. -viewpasswd) Note:\n""                       this is a simple plaintext passwd, see also -rfbauth\n""                       and -storepasswd below for obfuscated passwords.\n""-storepasswd pass file Store password \"pass\" as the VNC password in the\n""                       file \"file\".  Once the password is stored the\n""                       program exits.  Use the password via \"-rfbauth file\"\n""-accept string         Run a command (possibly to prompt the user at the\n""                       X11 display) to decide whether an incoming client\n""                       should be allowed to connect or not.  \"string\" is\n""                       an external command run via system(3) or some special\n""                       cases described below.  Be sure to quote \"string\"\n""                       if it contains spaces, shell characters, etc.  If the\n""                       external command returns 0 the client is accepted,\n""                       otherwise the client is rejected.  See below for an\n""                       extension to accept a client view-only.\n""\n""                       Environment: The RFB_CLIENT_IP environment variable will\n""                       be set to the incoming client IP number and the port\n""                       in RFB_CLIENT_PORT (or -1 if unavailable).  Similarly,\n""                       RFB_SERVER_IP and RFB_SERVER_PORT (the x11vnc side\n""                       of the connection), are set to allow identification\n""                       of the tcp virtual circuit.  The x11vnc process\n""                       id will be in RFB_X11VNC_PID, a client id number in\n""                       RFB_CLIENT_ID, and the number of other connected clients\n""                       in RFB_CLIENT_COUNT.  RFB_MODE will be \"accept\"\n""\n""                       If \"string\" is \"popup\" then a builtin popup window\n""                       is used.  The popup will time out after 120 seconds,\n""                       use \"popup:N\" to modify the timeout to N seconds\n""                       (use 0 for no timeout)\n""\n""                       If \"string\" is \"xmessage\" then an xmessage(1)\n""                       invocation is used for the command.  xmessage must be\n""                       installed on the machine for this to work.\n""\n""                       Both \"popup\" and \"xmessage\" will present an option\n""                       for accepting the client \"View-Only\" (the client\n""                       can only watch).  This option will not be presented if\n""                       -viewonly has been specified, in which case the entire\n""                       display is view only.\n""\n""                       If the user supplied command is prefixed with something\n""                       like \"yes:0,no:*,view:3 mycommand ...\" then this\n""                       associates the numerical command return code with\n""                       the actions: accept, reject, and accept-view-only,\n""                       respectively.  Use \"*\" instead of a number to indicate\n""                       the default action (in case the command returns an\n""                       unexpected value).  E.g. \"no:*\" is a good choice.\n""\n""                       Note that x11vnc blocks while the external command\n""                       or popup is running (other clients may see no updates\n""                       during this period).\n""\n""                       More -accept tricks: use \"popupmouse\" to only allow\n""                       mouse clicks in the builtin popup to be recognized.\n""                       Similarly use \"popupkey\" to only recognize\n""                       keystroke responses.  These are to help avoid the\n""                       user accidentally accepting a client by typing or\n""                       clicking. All 3 of the popup keywords can be followed\n""                       by +N+M to supply a position for the popup window.\n""                       The default is to center the popup window.\n""-gone string           As -accept, except to run a user supplied command when\n""                       a client goes away (disconnects).  RFB_MODE will be\n""                       set to \"gone\" and the other RFB_* variables are as\n""                       in -accept.  Unlike -accept, the command return code\n""                       is not interpreted by x11vnc.  Example: -gone 'xlock &'\n""\n""-noshm                 Do not use the MIT-SHM extension for the polling.\n""                       Remote displays can be polled this way: be careful this\n""                       can use large amounts of network bandwidth.  This is\n""                       also of use if the local machine has a limited number\n""                       of shm segments and -onetile is not sufficient.\n""-flipbyteorder         Sometimes needed if remotely polled host has different\n""                       endianness.  Ignored unless -noshm is set.\n""-onetile               Do not use the new copy_tiles() framebuffer mechanism,\n""                       just use 1 shm tile for polling.  Limits shm segments\n""                       used to 3.\n""\n""-blackout string       Black out rectangles on the screen. \"string\" is a\n""                       comma separated list of WxH+X+Y type geometries for\n""                       each rectangle.\n""-xinerama              If your screen is composed of multiple monitors\n""                       glued together via XINERAMA, and that screen is\n""                       non-rectangular this option will try to guess the\n""                       areas to black out (if your system has libXinerama).\n""                       In general on XINERAMA displays you may need to use the\n""                       -xwarppointer option if the mouse pointer misbehaves.\n""\n""-xrandr [mode]         If the display supports the XRANDR (X Resize, Rotate\n""                       and Reflection) extension, and you expect XRANDR events\n""                       to occur to the display while x11vnc is running, this\n""                       options indicates x11vnc should try to respond to\n""                       them (as opposed to simply crashing by assuming the\n""                       old screen size).  See the xrandr(1) manpage and run\n""                       'xrandr -q' for more info.  [mode] is optional and\n""                       described below.\n""\n""                       Since watching for XRANDR events and errors increases\n""                       polling overhead, only use this option if XRANDR changes\n""                       are expected.  For example on a rotatable screen PDA or\n""                       laptop, or using a XRANDR-aware Desktop where you resize\n""                       often.  It is best to be viewing with a vncviewer that\n""                       supports the NewFBSize encoding, since it knows how to\n""                       react to screen size changes.  Otherwise, libvncserver\n""                       tries to do so something reasonable for viewers that\n""                       cannot do this (portions of the screen may be clipped,\n""                       unused, etc).\n""\n""                       \"mode\" defaults to \"resize\", which means create a\n""                       new, resized, framebuffer and hope all viewers can cope\n""                       with the change.  \"newfbsize\" means first disconnect\n""                       all viewers that do not support the NewFBSize VNC\n""                       encoding, and then resize the framebuffer.  \"exit\"\n""                       means disconnect all viewer clients, and then terminate\n""                       x11vnc.\n""-padgeom WxH           Whenever a new vncviewer connects, the framebuffer is\n""                       replaced with a fake, solid black one of geometry WxH.\n""                       Shortly afterwards the framebuffer is replaced with the\n""                       real one.  This is intended for use with vncviewers\n""                       that do not support NewFBSize and one wants to make\n""                       sure the initial viewer geometry will be big enough\n""                       to handle all subsequent resizes (e.g. under -xrandr,\n""                       -remote id:windowid, rescaling, etc.\n""\n""-o logfile             Write stderr messages to file \"logfile\" instead of\n""                       to the terminal.  Same as \"-logfile file\".\n""-rc filename           Use \"filename\" instead of $HOME/.x11vncrc for rc file.\n""-norc                  Do not process any .x11vncrc file for options.\n""-h, -help              Print this help text.\n""-V, -version           Print program version (last modification date).\n""\n""-q                     Be quiet by printing less informational output to\n""                       stderr.  Same as -quiet.\n""-bg                    Go into the background after screen setup.  Messages to\n""                       stderr are lost unless -o logfile is used.  Something\n""                       like this could be useful in a script:\n""                         port=`ssh $host \"x11vnc -display :0 -bg\" | grep PORT`\n""                         port=`echo \"$port\" | sed -e 's/PORT=//'`\n""                         port=`expr $port - 5900`\n""                         vncviewer $host:$port\n""\n""-modtweak              Option -modtweak automatically tries to adjust the AltGr\n""-nomodtweak            and Shift modifiers for differing language keyboards\n""                       between client and host.  Otherwise, only a single key\n""                       press/release of a Keycode is simulated (i.e. ignoring\n""                       the state of the modifiers: this usually works for\n""                       identical keyboards).  Also useful in resolving cases\n""                       where a Keysym is bound to multiple keys (e.g. \"<\" + \">\"\n""                       and \",\" + \"<\" keys).  Default: %s\n"#if 0"-isolevel3             When in modtweak mode, always send ISO_Level3_Shift to\n""                       the X server instead of Mode_switch (AltGr).\n"#endif"-xkb                   When in modtweak mode, use the XKEYBOARD extension (if\n""                       the X display supports it) to do the modifier tweaking.\n""                       This is powerful and should be tried if there are still\n""                       keymapping problems when using -modtweak by itself.\n""-skip_keycodes string  Ignore the comma separated list of decimal keycodes.\n""                       Perhaps these are keycodes not on your keyboard but\n""                       your X server thinks exist.  Currently only applies\n""                       to -xkb mode.  Use this option to help x11vnc in the\n""                       reverse problem it tries to solve: Keysym -> Keycode(s)\n""                       when ambiguities exist (more than one Keycode per\n""                       Keysym).  Run 'xmodmap -pk' to see your keymapping.\n""                       E.g. \"-skip_keycodes 94,114\"\n""-add_keysyms           If a Keysym is received from a VNC viewer and\n""                       that Keysym does not exist in the X server, then\n""                       add the Keysym to the X server's keyboard mapping.\n""                       Added Keysyms will be removed when exiting.\n"#if 0"-xkbcompat             Ignore the XKEYBOARD extension.  Use as a workaround for\n""                       some keyboard mapping problems.  E.g. if you are using\n""                       an international keyboard (AltGr or ISO_Level3_Shift),\n""                       and the OS or keyboard where the VNC viewer is run\n""                       is not identical to that of the X server, and you are\n""                       having problems typing some keys.  Implies -nobell.\n"#endif"-clear_mods            At startup and exit clear the modifier keys by sending\n""                       KeyRelease for each one. The Lock modifiers are skipped.\n""                       Used to clear the state if the display was accidentally\n""                       left with any pressed down.\n""-clear_keys            As -clear_mods, except try to release any pressed key.\n""                       Note that this option and -clear_mods can interfere\n""                       with a person typing at the physical keyboard.\n""-remap string          Read Keysym remappings from file named \"string\".\n""                       Format is one pair of Keysyms per line (can be name\n""                       or hex value) separated by a space.  If no file named\n""                       \"string\" exists, it is instead interpreted as this\n""                       form: key1-key2,key3-key4,...  See <X11/keysymdef.h>\n""                       header file for a list of Keysym names, or use\n""                       xev(1). To map a key to a button click, use the\n""                       fake Keysyms \"Button1\", ..., etc.  E.g. \"-remap\n""                       Super_R-Button2\" (useful for pasting on a laptop)\n""-norepeat              Option -norepeat disables X server key auto repeat\n""-repeat                when VNC clients are connected.  This works around a\n""                       repeating keystrokes bug (triggered by long processing\n""                       delays between key down and key up client events:\n""                       either from large screen changes or high latency).\n""                       Note: your VNC viewer side will likely do autorepeating,\n""                       so this is no loss unless someone is simultaneously at\n""                       the real X display.  Default: %s\n""\n""-nofb                  Ignore video framebuffer: only process keyboard and\n""                       pointer.  Intended for use with Win2VNC and x2vnc\n""                       dual-monitor setups.\n""-nobell                Do not watch for XBell events. (no beeps will be heard)\n""                       Note: XBell monitoring requires the XKEYBOARD extension.\n""-nosel                 Do not manage exchange of X selection/cutbuffer between\n""                       VNC viewers and the X server.\n""-noprimary             Do not poll the PRIMARY selection for changes to send\n""                       back to clients.  (PRIMARY is still set on received\n""                       changes, however).\n""\n""-cursor [mode]         Sets how the pointer cursor shape (little icon at the\n""-nocursor              mouse pointer) should be handled.  The \"mode\" string\n""                       is optional and is described below.  The default\n""                       is to show some sort of cursor shape(s).  How this\n""                       is done depends on the VNC viewer and the X server.\n""                       Use -nocursor to disable cursor shapes completely.\n""\n""                       Some VNC viewers support the TightVNC CursorPosUpdates\n""                       and CursorShapeUpdates extensions (cuts down on\n""                       network traffic by not having to send the cursor image\n""                       every time the pointer is moved), in which case these\n""                       extensions are used (see -nocursorshape and -nocursorpos\n""                       below to disable).  For other viewers the cursor shape\n""                       is written directly to the framebuffer every time the\n""                       pointer is moved or changed and gets sent along with\n""                       the other framebuffer updates.  In this case, there\n""                       will be some lag between the vnc viewer pointer and\n""                       the remote cursor position.\n""\n""                       If the X display supports retrieving the cursor shape\n""                       information from the X server, then the default is\n""                       to use that mode.  On Solaris this can be done with\n""                       the SUN_OVL extension using -overlay (see also the\n""                       -overlay_nomouse option).  A similar overlay scheme\n""                       is used on IRIX.  Xorg (e.g. Linux) and recent Solaris\n""                       Xsun servers support the XFIXES extension to retrieve\n""                       the exact cursor shape from the X server.  If XFIXES\n""                       is present it is preferred over Overlay and is used by\n""                       default (see -noxfixes below).  This can be disabled\n""                       with -nocursor, and also some values of the \"mode\"\n""                       option below.\n""\n""                       The \"mode\" string can be used to fine-tune the\n""                       displaying of cursor shapes.  It can be used the\n""                       following ways:\n""\n""                       \"-cursor arrow\" - just show the standard arrow\n""                       nothing more or nothing less.\n""\n""                       \"-cursor none\" - same as \"-nocursor\"\n""\n""                       \"-cursor X\" - when the cursor appears to be on the\n""                       root window, draw the familiar X shape.  Some desktops\n""                       such as GNOME cover up the root window completely,\n""                       and so this will not work, try \"X1\", etc, to try to\n""                       shift the tree depth.  On high latency links or slow\n""                       machines there will be a time lag between expected and\n""                       the actual cursor shape.\n""\n""                       \"-cursor some\" - like \"X\" but use additional\n""                       heuristics to try to guess if the window should have\n""                       a windowmanager-like resizer cursor or a text input\n""                       I-beam cursor.  This is a complete hack, but may be\n""                       useful in some situations because it provides a little\n""                       more feedback about the cursor shape.\n""\n""                       \"-cursor most\" - try to show as many cursors as\n""                       possible.  Often this will only be the same as \"some\"\n""                       unless the display has overlay visuals or XFIXES\n""                       extensions available.  On Solaris and IRIX if XFIXES\n""                       is not available, -overlay mode will be attempted.\n""\n""-noxfixes              Do not use the XFIXES extension to draw the exact cursor\n""                       shape even if it is available.\n""-nocursorshape         Do not use the TightVNC CursorShapeUpdates extension\n""                       even if clients support it.  See -cursor above.\n""-cursorpos             Option -cursorpos enables sending the X cursor position\n""-nocursorpos           back to all vnc clients that support the TightVNC\n""                       CursorPosUpdates extension.  Other clients will be able\n""                       to see the pointer motions. Default: %s\n""-xwarppointer          Move the pointer with XWarpPointer(3X) instead of\n""                       the XTEST extension.  Use this as a workaround\n""                       if the pointer motion behaves incorrectly, e.g.\n""                       on touchscreens or other non-standard setups.\n""                       Also sometimes needed on XINERAMA displays.\n""\n""-buttonmap string      String to remap mouse buttons.  Format: IJK-LMN, this\n""                       maps buttons I -> L, etc., e.g.  -buttonmap 13-31\n""\n""                       Button presses can also be mapped to keystrokes: replace\n""                       a button digit on the right of the dash with :<sym>:\n""                       or :<sym1>+<sym2>: etc. for multiple keys. For example,\n""                       if the viewing machine has a mouse-wheel (buttons 4 5)\n""                       but the x11vnc side does not, these will do scrolls:\n""                              -buttonmap 12345-123:Prior::Next:\n""                              -buttonmap 12345-123:Up+Up+Up::Down+Down+Down:\n""\n""                       See <X11/keysymdef.h> header file for a list of Keysyms,\n""                       or use the xev(1) program.  Note: mapping of button\n""                       clicks to Keysyms may not work if -modtweak or -xkb is\n""                       needed for the Keysym.\n""\n""                       If you include a modifier like \"Shift_L\" the\n""                       modifier's up/down state is toggled, e.g. to send\n""                       \"The\" use :Shift_L+t+Shift_L+h+e: (the 1st one is\n""                       shift down and the 2nd one is shift up). (note: the\n""                       initial state of the modifier is ignored and not reset)\n""                       To include button events use \"Button1\", ... etc.\n""\n""-nodragging            Do not update the display during mouse dragging\n""                       events (mouse motion with a button held down).\n""                       Greatly improves response on slow setups, but you lose\n""                       all visual feedback for drags, text selection, and some\n""                       menu traversals.  It overrides any -pointer_mode setting\n""                       (think of it as pointer_mode 0)\n""-pointer_mode n        Various pointer update schemes.  The problem is pointer\n""                       motion can cause rapid changes on the screen, e.g. a\n""                       window drag.  Neither x11vnc's screen polling nor the\n""                       bandwidth to the vncviewers can keep up these rapid\n""                       screen changes: everything bogs down when dragging\n""                       or scrolling.  Note that most video h/w is optimized\n""                       for writing, not reading (a 50X rate difference is\n""                       possible) and x11vnc is reading all the time.  So a\n""                       scheme has to be used to \"eat\" much of that pointer\n""                       input before re-polling the screen. n can be 1 to %d.\n""\n""                       n=1 was the original scheme used to about Jan 2004: it\n""                       basically just skips -input_skip pointer events before\n""                       repolling the screen.  n=2 is an improved scheme:\n""                       by watching the current rate it tries to detect if\n""                       it should try to \"eat\" more pointer events.  n=3 is\n""                       basically a dynamic -nodragging mode: it detects if the\n""                       mouse drag motion has paused and refreshes the display.\n""                       n=4 is TBD, it will try measure screen read and client\n""                       write rates and try to insert \"frames\" between the\n""                       on/off states of mode 3.  The default n is %d.\n""-input_skip n          For the pointer handling when non-threaded: try to\n""                       read n user input events before scanning display. n < 0\n""                       means to act as though there is always user input.\n""                       Default: %d\n""\n""-debug_pointer         Print debugging output for every pointer event.\n""-debug_keyboard        Print debugging output for every keyboard event.\n""                       Same as -dp and -dk, respectively.  Use multiple\n""                       times for more output.\n""\n""-defer time            Time in ms to wait for updates before sending to client\n""                       (deferUpdateTime)  Default: %d\n""-wait time             Time in ms to pause between screen polls.  Used to cut\n""                       down on load.  Default: %d\n""-nap                   Monitor activity and if low take longer naps between\n""                       polls to really cut down load when idle.  Default: %s\n""-sb time               Time in seconds after NO activity (e.g. screen blank)\n""                       to really throttle down the screen polls (i.e. sleep\n""                       for about 1.5 secs). Use 0 to disable.  Default: %d\n""\n""-sigpipe string        Broken pipe (SIGPIPE) handling.  \"string\" can be\n""                       \"ignore\" or \"exit\".  For \"ignore\" libvncserver\n""                       will handle the abrupt loss of a client and continue,\n""                       for \"exit\" x11vnc will cleanup and exit at the 1st\n""                       broken connection.  Default: \"ignore\".\n""-threads               Whether or not to use the threaded libvncserver\n""-nothreads             algorithm [rfbRunEventLoop] if libpthread is available\n""                       Default: %s\n""\n""-fs f                  If the fraction of changed tiles in a poll is greater\n""                       than f, the whole screen is updated.  Default: %.2f\n""-gaps n                Heuristic to fill in gaps in rows or cols of n or\n""                       less tiles.  Used to improve text paging.  Default: %d\n""-grow n                Heuristic to grow islands of changed tiles n or wider\n""                       by checking the tile near the boundary.  Default: %d\n""-fuzz n                Tolerance in pixels to mark a tiles edges as changed.\n""                       Default: %d\n""\n""-gui [gui-opts]        Start up a simple tcl/tk gui based on the the remote\n""                       control options -remote/-query described below.\n""                       Requires the \"wish\" program to be installed on the\n""                       machine.  \"gui-opts\" is not required: the default is\n""                       to start up both the gui and x11vnc with the gui showing\n""                       up on the X display in the environment variable DISPLAY.\n""\n""                       \"gui-opts\" can be a comma separated list of items.\n""                       Currently there are only two types of items: 1) a gui\n""                       mode and 2) the X display the gui should display on.\n""                       The gui mode can be \"start\", \"conn\", or \"wait\"\n""                       \"start\" is the default mode above and is not required.\n""                       \"conn\" means do not automatically start up x11vnc,\n""                       but instead just try to connect to an existing x11vnc\n""                       process.  \"wait\" means just start the gui and nothing\n""                       else (you will later instruct the gui to start x11vnc\n""                       or connect to an existing one.)\n""\n""                       Note the possible confusion regarding the potentially\n""                       two different X displays: x11vnc polls one, but you\n""                       may want the gui to appear on another.  For example, if\n""                       you ssh in and x11vnc is not running yet you may want\n""                       the gui to come back to you via your ssh redirected X\n""                       display (e.g. localhost:10).\n""\n""                       Examples: \"x11vnc -gui\", \"x11vnc -gui localhost:10\",\n""                       \"x11vnc -gui :10\", \"x11vnc -gui wait,:10\",\n""                       \"x11vnc -gui <x11vnc-opts...>\"\n""\n""                       If you do not specify a gui X display in \"gui-opts\"\n""                       then the DISPLAY environment variable and -display\n""                       option are tried (in that order).  Regarding the x11vnc\n""                       X display the gui will try to connect to, it first\n""                       tries -display and then DISPLAY.  For example, \"x11vnc\n""                       -display :0 -gui otherhost:0\", will remote control an\n""                       x11vnc polling :0 and display the gui on otherhost:0\n""\n""                       If you do not intend to start x11vnc from the gui\n""                       (i.e. just remote control an existing one), then the\n""                       gui process can run on a different machine from the\n""                       x11vnc server as long as X permissions, etc. permit\n""                       communication between the two.\n""\n""-remote command        Remotely control some aspects of an already running\n""                       x11vnc server.  \"-R\" and \"-r\" are aliases for\n""                       \"-remote\".  After the remote control command is\n""                       sent to the running server the 'x11vnc -remote ...'\n""                       command exits.  You can often use the -query command\n""                       (see below) to see if the x11vnc server processed your\n""                       -remote command.\n""\n""                       The default communication channel is that of X\n""                       properties (specifically VNC_CONNECT), and so this\n""                       command must be run with correct settings for DISPLAY\n""                       and possibly XAUTHORITY to connect to the X server\n""                       and set the property.  Alternatively, use the -display\n""                       and -auth options to set them to the correct values.\n""                       The running server cannot use the -novncconnect option\n""                       because that disables the communication channel.\n""                       See below for alternate channels.\n""\n""                       For example: 'x11vnc -remote stop' (which is the same as\n""                       'x11vnc -R stop') will close down the x11vnc server.\n""                       'x11vnc -R shared' will enable shared connections, and\n""                       'x11vnc -R scale:3/4' will rescale the desktop.\n""\n""                       Note: the more drastic the change induced by the -remote\n""                       command, the bigger the chance for bugs or crashes.\n""                       Please report reproducible bugs.\n""\n""                       The following -remote/-R commands are supported:\n""\n""                       stop            terminate the server, same as \"quit\"\n""                                       \"exit\" or \"shutdown\"\n""                       ping            see if the x11vnc server responds.\n""                                       Return is: ans=ping:<xdisplay>\n""                       blacken         try to push a black fb update to all\n""                                       clients (due to timings a client\n""                                       could miss it). Same as \"zero\", also\n""                                       \"zero:x1,y1,x2,y2\" for a rectangle.\n""                       refresh         send the entire fb to all clients.\n""                       reset           recreate the fb, polling memory, etc.\n""                       id:windowid     set -id window to \"windowid\". empty\n""                                       or \"root\" to go back to root window\n""                       sid:windowid    set -sid window to \"windowid\"\n""                       flashcmap       enable  -flashcmap mode.\n""                       noflashcmap     disable -flashcmap mode.\n""                       notruecolor     enable  -notruecolor mode.\n""                       truecolor       disable -notruecolor mode.\n""                       overlay         enable  -overlay mode (if applicable).\n""                       nooverlay       disable -overlay mode.\n""                       overlay_cursor  in -overlay mode, enable cursor drawing.\n""                       overlay_nocursor disable cursor drawing. same as\n""                                        nooverlay_cursor.\n""                       visual:vis      set -visual to \"vis\"\n""                       scale:frac      set -scale to \"frac\"\n""                       viewonly        enable  -viewonly mode.\n""                       noviewonly      disable -viewonly mode.\n""                       shared          enable  -shared mode.\n""                       noshared        disable -shared mode.\n""                       forever         enable  -forever mode.\n""                       noforever       disable -forever mode.\n""                       deny            deny any new connections, same as \"lock\"\n""                       nodeny          allow new connections, same as \"unlock\"\n""                       connect:host    do reverse connection to host, \"host\"\n""                                       may be a comma separated list of hosts\n""                                       or host:ports.  See -connect.\n""                       disconnect:host disconnect any clients from \"host\"\n""                                       same as \"close:host\".  Use host\n""                                       \"all\" to close all current clients.\n""                                       If you know the client internal hex ID,\n""                                       e.g. 0x3 (returned by -query clients and\n""                                       RFB_CLIENT_ID), you can use that too.\n""                       allowonce:host  For the next connection only, allow\n""                                       connection from \"host\".\n""                       allow:hostlist  set -allow list to (comma separated)\n""                                       \"hostlist\". See -allow and -localhost.\n""                                       Do not use with -allow /path/to/file\n""                                       Use \"+host\" to add a single host, and\n""                                       use \"-host\" to delete a single host\n""                       localhost       enable  -localhost mode\n""                       nolocalhost     disable -localhost mode\n""                       accept:cmd      set -accept \"cmd\" (empty to disable).\n""                       gone:cmd        set -gone \"cmd\" (empty to disable).\n""                       noshm           enable  -noshm mode.\n""                       shm             disable -noshm mode (i.e. use shm).\n""                       flipbyteorder   enable -flipbyteorder mode, you may need\n""                                       to set noshm for this to do something.\n""                       noflipbyteorder disable -flipbyteorder mode.\n""                       onetile         enable  -onetile mode. (you may need to\n""                                       set shm for this to do something)\n""                       noonetile       disable -onetile mode.\n""                       blackout:str    set -blackout \"str\" (empty to disable).\n""                                       See -blackout for the form of \"str\"\n""                                       (basically: WxH+X+Y,...)\n""                                       Use \"+WxH+X+Y\" to append a single\n""                                       rectangle use \"-WxH+X+Y\" to delete one\n""                       xinerama        enable  -xinerama mode. (if applicable)\n""                       noxinerama      disable -xinerama mode.\n""                       xrandr          enable  -xrandr mode. (if applicable)\n""                       noxrandr        disable -xrandr mode.\n""                       xrandr_mode:mode set the -xrandr mode to \"mode\".\n""                       padgeom:WxH     set -padgeom to WxH (empty to disable)\n""                                       If WxH is \"force\" or \"do\" the padded\n""                                       geometry fb is immediately applied.\n""                       quiet           enable  -quiet mode.\n""                       noquiet         disable -quiet mode.\n""                       modtweak        enable  -modtweak mode.\n""                       nomodtweak      enable  -nomodtweak mode.\n""                       xkb             enable  -xkb modtweak mode.\n""                       noxkb           disable -xkb modtweak mode.\n""                       skip_keycodes:str enable -xkb -skip_keycodes \"str\".\n""                       add_keysyms     enable -add_keysyms mode.\n""                       noadd_keysyms   stop adding keysyms. those added will\n""                                       still be removed at exit.\n""                       clear_mods      enable  -clear_mods mode and clear them.\n""                       noclear_mods    disable -clear_mods mode.\n""                       clear_keys      enable  -clear_keys mode and clear them.\n""                       noclear_keys    disable -clear_keys mode.\n""                       remap:str       set -remap \"str\" (empty to disable).\n""                                       See -remap for the form of \"str\"\n""                                       (basically: key1-key2,key3-key4,...)\n""                                       Use \"+key1-key2\" to append a single\n""                                       keymapping, use \"-key1-key2\" to delete.\n""                       norepeat        enable  -norepeat mode.\n""                       repeat          disable -norepeat mode.\n""                       bell            enable  bell (if supported).\n""                       nobell          disable bell.\n""                       sel             disable -nosel mode.\n""                       nosel           enable  -nosel mode.\n""                       primary         disable -noprimary mode.\n""                       noprimary       enable  -noprimary mode.\n""                       cursor:mode     enable  -cursor \"mode\".\n""                       show_cursor     enable  showing a cursor.\n""                       noshow_cursor   disable showing a cursor. (same as\n""                                       \"nocursor\")\n""                       xfixes          enable  xfixes cursor shape mode.\n""                       noxfixes        disable xfixes cursor shape mode.\n""                       cursorshape     disable -nocursorshape mode.\n""                       nocursorshape   enable  -nocursorshape mode.\n""                       cursorpos       disable -nocursorpos mode.\n""                       nocursorpos     enable  -nocursorpos mode.\n""                       xwarp           enable  -xwarppointer mode.\n""                       noxwarp         disable -xwarppointer mode.\n""                       buttonmap:str   set -buttonmap \"str\", empty to disable\n""                       dragging        disable -nodragging mode.\n""                       nodragging      enable  -nodragging mode.\n""                       pointer_mode n  set -pointer_mode to n.\n""                       input_skip n    set -input_skip to n.\n""                       debug_pointer   enable  -debug_pointer, same as \"dp\"\n""                       nodebug_pointer disable -debug_pointer, same as \"nodp\"\n""                       debug_keyboard   enable  -debug_keyboard, same as \"dk\"\n""                       nodebug_keyboard disable -debug_keyboard, same as \"nodk\"\n""                       defer:n         set -defer to n ms,same as deferupdate:n\n""                       wait:n          set -wait to n ms.\n""                       nap             enable  -nap mode.\n""                       nonap           disable -nap mode.\n""                       sb:n            set -sb to n s, same as screen_blank:n\n""                       fs:frac         set -fs fraction to \"frac\", e.g. 0.5\n""                       gaps:n          set -gaps to n.\n""                       grow:n          set -grow to n.\n""                       fuzz:n          set -fuzz to n.\n""                       progressive:n   set libvncserver -progressive slice\n""                                       height parameter to n.\n""                       file:name       run -remote commands from file \"name\",\n""                                       one command per line,blank and # skipped\n""                       noremote        disable the -remote command processing,\n""                                       it cannot be turned back on.\n""\n""                       The vncconnect(1) command from standard VNC\n""                       distributions may also be used if string is prefixed\n""                       with \"cmd=\" E.g. 'vncconnect cmd=stop'.  Under some\n""                       circumstances xprop(1) can used if it supports -set\n""                       (see the FAQ).\n""\n""                       If \"-connect /path/to/file\" has been supplied to the\n""                       running x11vnc server then that file can be used as a\n""                       communication channel (this is the only way to remote\n""                       control one of many x11vnc's polling the same X display)\n""                       Simply run: 'x11vnc -connect /path/to/file -remote ...'\n""                       or you can directly write to the file via something\n""                       like: \"echo cmd=stop > /path/to/file\", etc.\n""\n""-query variable        Like -remote, except just query the value of\n""                       \"variable\".  \"-Q\" is an alias for \"-query\".\n""                       Multiple queries can be done by separating variables\n""                       by commas, e.g. -query var1,var2. The results come\n""                       back in the form ans=var1:value1,ans=var2:value2,...\n""                       to the standard output.  If a variable is read-only,\n""                       it comes back with prefix \"aro=\" instead of \"ans=\".\n""\n""                       Some -remote commands are pure actions that do not make\n""                       sense as variables, e.g. \"stop\" or \"disconnect\",\n""                       in these cases the value returned is \"N/A\".  To direct\n""                       a query straight to the VNC_CONNECT property or connect\n""                       file use \"qry=...\" instead of \"cmd=...\"\n""\n""                       Here is the current list of \"variables\" that can\n""                       be supplied to the -query command. This includes the\n""                       \"N/A\" ones that return no useful info.  For variables\n""                       names that do not correspond to an x11vnc option or\n""                       remote command, we hope the name makes it obvious what\n""                       the returned value corresponds to (hint: the ext_*\n""                       variables correspond to the presence of X extensions):\n""\n""                       ans= stop quit exit shutdown ping blacken zero\n""                       refresh reset close disconnect id sid flashcmap\n""                       noflashcmap truecolor notruecolor overlay nooverlay\n""                       overlay_cursor overlay_yescursor nooverlay_nocursor\n""                       nooverlay_cursor nooverlay_yescursor overlay_nocursor\n""                       visual scale viewonly noviewonly shared noshared\n""                       forever noforever once deny lock nodeny unlock connect\n""                       allowonce allow localhost nolocalhost accept gone shm\n""                       noshm flipbyteorder noflipbyteorder onetile noonetile\n""                       blackout xinerama noxinerama xrandr noxrandr xrandr_mode\n""                       padgeom quiet q noquiet modtweak nomodtweak xkb noxkb\n""                       skip_keycodes add_keysyms noadd_keysyms clear_mods\n""                       noclear_mods clear_keys noclear_keys remap repeat\n""                       norepeat bell nobell sel nosel primary noprimary\n""                       cursorshape nocursorshape cursorpos nocursorpos cursor\n""                       show_cursor noshow_cursor nocursor xfixes noxfixes xwarp\n""                       xwarppointer noxwarp noxwarppointer buttonmap dragging\n""                       nodragging pointer_mode input_skip debug_pointer dp\n""                       nodebug_pointer nodp debug_keyboard dk nodebug_keyboard\n""                       nodk deferupdate defer wait nap nonap sb screen_blank\n""                       fs gaps grow fuzz progressive noremote\n""\n""                       aro=  display vncdisplay desktopname desktop auth\n""                       rootshift scale_str scaled_x scaled_y scale_numer\n""                       scale_denom scale_fac scaling_noblend scaling_nomult4\n""                       scaling_pad scaling_interpolate inetd safer unsafe\n""                       passwdfile using_shm logfile o rc norc h help V version\n""                       lastmod bg nofb sigpipe threads clients client_count\n""                       pid ext_xtest ext_xkb ext_xshm ext_xinerama ext_overlay\n""                       ext_xfixes ext_xdamage ext_xrandr rootwin num_buttons\n""                       button_mask mouse_x mouse_y bpp depth indexed_color\n""                       dpy_x dpy_y rfbport rfbwait rfbauth passwd alwaysshared\n""                       dontdisconnect httpdir enablehttpproxy\n""\n""-sync                  By default -remote commands are run asynchronously, that\n""                       is, the request is posted and the program immediately\n""                       exits.  Use -sync to have the program wait for an\n""                       acknowledgement from the x11vnc server that command\n""                       was processed.  On the other hand -query requests are\n""                       always processed synchronously because they have wait\n""                       for the result.\n""\n""                       Also note that if both -remote and -query requests are\n""                       supplied on the command line, the -remote is processed\n""                       first (synchronously: no need for -sync), and then\n""                       the -query request is processed in the normal way.\n""                       This allows for a reliable way to see if the -remote\n""                       command was processed by querying for any new settings.\n""                       Note however that there is timeout of a few seconds so\n""                       if the x11vnc takes longer than that to process the\n""                       requests the requestor will think that a failure has\n""                       taken place.\n""\n""-noremote              Do not process any remote control commands or queries.\n""\n""                       A note about security wrt remote control commands.\n""                       If someone can connect to the X display and change the\n""                       property VNC_CONNECT, then they can remotely control\n""                       x11vnc.  Normally access to the X display is protected.\n""                       Note that if they can modify VNC_CONNECT, they could\n""                       also run their own x11vnc and have complete control\n""                       of the desktop.  If the  \"-connect /path/to/file\"\n""                       channel is being used, obviously anyone who can write\n""                       to /path/to/file can remotely control x11vnc.  So be\n""                       sure to protect the X display and that file's write\n""                       permissions.\n""\n""-unsafe                If x11vnc is running as root (e.g. inetd or Xsetup for\n""                       a display manager) a few remote commands are disabled\n""                       (currently: id:pick, accept:<cmd>, and gone:<cmd>)\n""                       because they are associated with running external\n""                       programs.  If you specify -unsafe, then these remote\n""                       control commands are allowed when running as root.\n""                       When running as non-root all commands are allowed.\n""                       See -safer below.\n""-safer                 Even if not running as root, disable the above unsafe\n""                       remote control commands.\n""\n""-deny_all              For use with -remote nodeny: start out denying all\n""                       incoming clients until \"-remote nodeny\" is used to\n""                       let them in.\n""%s\n""\n""These options are passed to libvncserver:\n""\n";	/* have both our help and rfbUsage to stdout for more(1), etc. */	dup2(1, 2);	fprintf(stderr, help, lastmod,		view_only ? "on":"off",		shared ? "on":"off",		vnc_connect ? "-vncconnect":"-novncconnect",		use_modifier_tweak ? "-modtweak":"-nomodtweak",		no_autorepeat ? "-norepeat":"-repeat",		cursor_pos_updates ? "-cursorpos":"-nocursorpos",		pointer_mode_max, pointer_mode,		ui_skip,		defer_update,		waitms,		take_naps ? "on":"off",		screen_blank,		use_threads ? "-threads":"-nothreads",		fs_frac,		gaps_fill,		grow_fill,		tile_fuzz,		""	);	rfbUsage();	exit(1);}