"                       polls to really cut down load when idle (default %s).\n"
"                       polls to really cut down load when idle.  Default: %s\n" "\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""\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\n""listening as a VNC server it will print out a string: PORT=XXXX where\n""XXXX is typically 5900 (the default VNC port).  One would next run something\n""like this on the local machine: \"vncviewer host:N\" where N is XXXX - 5900.\n""\n""By default x11vnc will not allow the screen to be shared and it will\n""exit as soon as a client disconnects.  See -shared and -forever below\n""to override these protections.\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 lines.  The \"#\"\n""character comments out to the end of the line in the usual way.  Leading and\n""trailing whitespace is trimmed off.  Lines may be continued with a \"\\\"\n""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""-id windowid           Show the window corresponding to <windowid> not the\n""                       entire display. Warning: bugs! new toplevels missed!...\n""-flashcmap             In 8bpp indexed color, let the installed colormap flash\n""                       as the pointer moves from window to window (slow).\n""-notruecolor           Force 8bpp indexed color even if it looks like TrueColor.\n""\n""-scale fraction        Scale the framebuffer by factor \"fraction\".  Values\n""                       less than 1 shrink the fb.  Note: image may not be sharp\n""                       and response may be slower.  If \"fraction\" contains\n""                       a decimal point \".\" it is taken as a floating point\n""                       number, alternatively the notation \"m/n\" may be used\n""                       to denote fractions, 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""-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... It is useful for\n""                       testing and for some workarounds.  n may be a decimal\n""                       number, or 0x hex.  Run xdpyinfo(1) for the values.\n""                       One may also use \"TrueColor\", etc. see <X11/X.h>\n""                       for a list.  If the string ends in \":m\" for better\n""                       or for worse the visual depth is forced to be m.\n""\n""-viewonly              All 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.  This is the Default behavior.\n""-forever               Keep listening for more connections rather than exiting\n""                       as soon as the first client(s) disconnect. Same as -many\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""                       VNC program vncconnect(1).  When the property is set\n""                       to host or host:port establish a reverse connection.\n""                       Using xprop(1) instead of vncconnect may work, see FAQ.\n""-auth file             Set the X authority file to be \"file\", equivalent\n""                       to setting the XAUTHORITY environment var to \"file\"\n""                       before startup. See Xsecurity(7), xauth(1) man pages.\n""-allow addr1[,addr2..] Only allow client connections from IP addresses matching\n""                       the comma separated list of numerical addresses.\n""                       Can be a prefix, e.g. \"192.168.100.\" to match a\n""                       simple subnet, for more control build libvncserver\n""                       with libwrap support.  If the list contains a \"/\"\n""                       it instead is a interpreted as a file containing\n""                       addresses or prefixes that is re-read each time a new\n""                       client connects.  Lines can be commented out with the\n""                       \"#\" 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.\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 X11\n""                       display) to decide whether an incoming client should be\n""                       allowed to connect or not.  \"string\" is an external\n""                       command run via system(3) (see below for special cases).\n""                       Be sure to quote \"string\" if it contains spaces,\n""                       etc.  If the external command returns 0 the client is\n""                       accepted, otherwise the client is rejected.  See below\n""                       for an 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.\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.\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 or\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 keystroke\n""                       responses.  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""\n""-gone string           As -accept string, except to run a user supplied command\n""                       when a client goes away (disconnects).  Unlike -accept,\n""                       the command return code is not interpreted by x11vnc.\n""\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.\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""-blackout string       Black out rectangles on the screen. string is a comma\n""                       separated list of WxH+X+Y type geometries for each rect.\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 areas\n""                       to black out (if your system has libXinerama).\n""\n""-o logfile             Write stderr messages to file \"logfile\" instead of\n""                       to the terminal.  Same as -logfile.\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              Handle AltGr/Shift modifiers for differing languages\n""                       between client and host (Default %s).  Also helps\n""                       resolve cases with a keysym bound to multiple keys.\n""-nomodtweak            Try to send the keysym directly to the X server.\n""                       This may cause problems if a keysym is bound to multiple\n""                       keys, e.g. when typing \"<\" if the Xserver defines a\n""                       \"< and >\" key in addition to a \"< and comma\" key.\n"#if 0"-isolevel3             When in modtweak mode, send ISO_Level3_Shift to the X\n""                       server instead of Mode_switch (AltGr).\n"#endif"-xkb                   Use XKEYBOARD extension (if it exists) to do the modifier\n""                       tweaking.\n""-skip_keycodes string  Skip keycodes not on your keyboard but your X server\n""                       thinks exist.  Currently only applies to -xkb mode.\n""                       \"string\" is a comma separated list of decimal\n""                       keycodes.  Use this option to help x11vnc in the reverse\n""                       problem it tries to solve: Keysym -> Keycode(s) when\n""                       ambiguities exist.  E.g. -skip_keycodes 94,114\n""-add_keysyms           If a keysym is received from a VNC viewer, but\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""                       Mostly for testing.  This option and -clear_mods can\n""                       interfere with 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,...  To map a key to a\n""                       button click, use the fake keysyms \"Button1\", ...,\n""                       etc. E.g. -remap Super_R-Button2\n""\n""-nofb                  Ignore framebuffer: only process keyboard and pointer.\n""                       Intended for use with Win2VNC and x2vnc dual displays.\n""-nobell                Do not watch for XBell events. (no beeps will be heard)\n""-nosel                 Do not manage exchange of X selection/cutbuffer.\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""-nocursor              Do not have the viewer show a local cursor.\n""-mouse                 Draw a 2nd cursor at the current X pointer position.\n""-mouseX                As -mouse, but also draw an X on root background.\n""-X                     Shorthand for -mouseX -nocursor.\n""-xwarppointer          Move the pointer with XWarpPointer() instead of XTEST\n""                       (try as a workaround if pointer behaves poorly, e.g.\n""                       on touchscreens or other non-standard setups).\n""-cursorpos             Send the X cursor position back to all vnc clients that\n""                       support the TightVNC CursorPosUpdates extension.\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""                       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 events\n""                       (mouse motion with a button held down).  Greatly\n""                       improves response on slow setups, but you lose all\n""                       visual feedback for drags, text selection, and some\n""                       menu traversals.\n""-old_pointer           Do not use the new pointer input handling mechanisms.\n""                       See check_input() and pointer() for details.\n""-input_skip n          For the old 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""-norepeat              Disable X server key auto repeat when clients are\n""                       connected.  This works around a repeating keystrokes\n""                       bug (triggered by long processing delays between key\n""                       down and key up client events: either from large screen\n""                       changes or high latency).  Note: your VNC viewer side\n""                       will likely do autorepeating, so this is no loss unless\n""                       someone is simultaneously at the real X display.\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""                       [rfbDeferUpdateTime]  (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""-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 is \"ignore\".\n"#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD"-threads               Whether or not to use the threaded libvncserver\n""-nothreads             algorithm [rfbRunEventLoop] (default %s).\n"#endif"\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""-onetile               Do not use the new copy_tiles() framebuffer mechanism,\n""                       just use 1 shm tile for polling.  Same as -old_copytile.\n""                       Limits shm segments used to 3.\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""%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",		use_modifier_tweak ? "on":"off",		defer_update,		waitms,		take_naps ? "on":"off",#ifdef LIBVNCSERVER_HAVE_LIBPTHREAD		use_threads ? "on":"off",#endif		fs_frac,		gaps_fill,		grow_fill,		tile_fuzz,		""	);	rfbUsage();	exit(1);}