diff options
author | runge <runge> | 2006-07-09 01:48:31 +0000 |
---|---|---|
committer | runge <runge> | 2006-07-09 01:48:31 +0000 |
commit | 079528470d8a1dfeab321ebdc2ab6c42943ed296 (patch) | |
tree | aaa83a4d318c1c72a7698c3b8a6b5318397688d3 /x11vnc/help.c | |
parent | 8cda60969b6d2df88e0f4fc0fd267dc26adb3872 (diff) | |
download | libtdevnc-079528470d8a1dfeab321ebdc2ab6c42943ed296.tar.gz libtdevnc-079528470d8a1dfeab321ebdc2ab6c42943ed296.zip |
x11vnc: add uinput support for full input into linux fb device (e.g. qt-embed).
Diffstat (limited to 'x11vnc/help.c')
-rw-r--r-- | x11vnc/help.c | 185 |
1 files changed, 135 insertions, 50 deletions
diff --git a/x11vnc/help.c b/x11vnc/help.c index 241e37c..6f2fb1f 100644 --- a/x11vnc/help.c +++ b/x11vnc/help.c @@ -2192,6 +2192,9 @@ void print_help(int mode) { " means to act as though there is always user input.\n" " Default: %d\n" "\n" +"-allinput Have x11vnc read and process all available client input\n" +" before proceeding.\n" +"\n" "-speeds rd,bw,lat x11vnc tries to estimate some speed parameters that\n" " are used to optimize scheduling (e.g. -pointer_mode\n" " 4, -wireframe, -scrollcopyrect) and other things.\n" @@ -2348,13 +2351,19 @@ void print_help(int mode) { " For shared memory segments string is of the\n" " form: \"shm:N@WxHxB\" which specifies a shmid\n" " N and framebuffer Width, Height, and Bits\n" -" per pixel. To memory map mmap(2) a file use:\n" -" \"map:/path/to/a/file@WxHxB\". If there is trouble\n" -" with mmap, use \"file:/...\" for slower lseek(2) based\n" -" reading. Use \"snap:...\" to imply -snapfb mode and the\n" -" \"file:\" access (this is for devices that only provide\n" -" the fb all at once). If you do not supply a type \"map\"\n" -" is assumed if the file exists.\n" +" per pixel.\n" +"\n" +" For file polling to memory map mmap(2) a file use:\n" +" \"map:/path/to/a/file@WxHxB\", with WxHxB as above.\n" +" \"mmap:...\" is the same. If there is trouble with mmap,\n" +" use \"file:/...\" for slower lseek(2) based reading.\n" +" Use \"snap:...\" to imply -snapfb mode and the \"file:\"\n" +" access (this is for devices that only provide the fb\n" +" all at once).\n" +"\n" +" If you do not supply a type \"map\" is assumed if\n" +" the file exists (see the next paragraphs for some\n" +" exceptions to this.)\n" "\n" " If string is \"setup:cmd\", then the command \"cmd\"\n" " is run and the first line from it is read and used\n" @@ -2362,13 +2371,14 @@ void print_help(int mode) { " determining WxHxB, etc. These are often done as root\n" " so take care.\n" "\n" -" If the string begins with \"video\", see the video4linux\n" +" If the string begins with \"video\", see the VIDEO4LINUX\n" " discusion below where the device may be queried for\n" " (and possibly set) the framebuffer parameters.\n" "\n" -" If the strings begins with \"cons\", see the linux\n" -" console discussion below where the framebuffer device\n" -" is opened and keystrokes are inserted into the console.\n" +" If the string begins with \"cons\", \"/dev/fb\", or\n" +" \"fb\", see the LINUX CONSOLE discussion below where\n" +" the framebuffer device is opened and keystrokes (and\n" +" possibly mouse events) are inserted into the console.\n" "\n" " Optional suffixes are \":R/G/B\" and \"+O\" to specify\n" " red, green, and blue masks and an offset into the\n" @@ -2388,11 +2398,12 @@ void print_help(int mode) { "\n" " (see ipcs(1) and fbset(1) for the first two examples)\n" "\n" -" All user input is discarded by default (but see the\n" -" -pipeinput option). Most of the X11 (screen, keyboard,\n" -" mouse) options do not make sense and many will cause\n" -" this mode to crash, so please think twice before\n" -" setting or changing them in a running x11vnc.\n" +" In general all user input is discarded by default (see\n" +" the -pipeinput option for how to use a helper program\n" +" to insert). Most of the X11 (screen, keyboard, mouse)\n" +" options do not make sense and many will cause this\n" +" mode to crash, so please think twice before setting or\n" +" changing them in a running x11vnc.\n" "\n" " If you DO NOT want x11vnc to close the X DISPLAY in\n" " rawfb mode, prepend a \"+\" e.g. +file:/dev/fb0...\n" @@ -2411,13 +2422,13 @@ void print_help(int mode) { " SNAPFB_RAWFB_RESET=1 as well.\n" "\n" " If you want x11vnc to dynamically transform a 24bpp\n" -" rawfb to 32bpp (note that this will be slower) use\n" -" the -24to32 option. This would be useful for, say,\n" -" for a video camera that delivers the pixel data as\n" +" rawfb to 32bpp (note that this will be slower) also\n" +" supply the -24to32 option. This would be useful for,\n" +" say, a video camera that delivers the pixel data as\n" " 24bpp packed RGB. This is the default under \"video\"\n" " mode if the bpp is 24.\n" "\n" -" video4linux: on Linux some attempt is made to handle\n" +" VIDEO4LINUX: on Linux some attempt is made to handle\n" " video devices (webcams or TV tuners) automatically.\n" " The idea is the WxHxB will be extracted from the\n" " device itself. So if you do not supply \"@WxHxB...\n" @@ -2495,44 +2506,63 @@ void print_help(int mode) { "\n" " See the -pipeinput VID option below for a way to control\n" " the settings through the VNC Viewer via keystrokes.\n" +" As a shortcut, if the string begins \"Video..\" instead\n" +" of \"video..\" then -pipeinput VID is implied.\n" "\n" " As above, if you specify a \"@WxHxB...\" after the\n" " <settings> string they are used verbatim: the device\n" " is not queried for the current values. Otherwise the\n" " device will be queried.\n" "\n" -" Linux console: If the libvncserver LinuxVNC command is\n" -" on your system use that instead of the following method\n" -" because it will be faster and more accurate for Linux\n" -" text console.\n" +" LINUX CONSOLE: If the libvncserver LinuxVNC program\n" +" is on your system you may want to use that instead of\n" +" the following method because it will be faster and more\n" +" accurate for Linux text console.\n" "\n" " If the rawfb string begins with \"cons\" the framebuffer\n" " device /dev/fb0 is opened (this requires the appropriate\n" -" kernel modules) and so is /dev/tty0. The latter is\n" -" used to inject keystrokes (not all are supported,\n" -" but the basic ones are). You will need to be root to\n" -" inject keystrokes. /dev/tty0 refers to the active VT,\n" -" to indicate one explicitly, use \"cons2\", etc. using\n" -" the VT number. Note you can change VT remotely using\n" -" the chvt(1) command. Sometimes switching out and back\n" -" corrects the framebuffer. To skip injecting entirely\n" -" use \"consx\".\n" +" kernel modules to be installed) and so is /dev/tty0.\n" +" The latter is used to inject keystrokes (not all are\n" +" supported, but the basic ones are). You will need to\n" +" be root to inject keystrokes. /dev/tty0 refers to the\n" +" active VT, to indicate one explicitly, use \"cons2\",\n" +" etc. using the VT number.\n" +"\n" +" If the Linux version seems to be 2.6 or later and the\n" +" \"uinput\" module appears to be present, then the uinput\n" +" method will be used instead of /dev/ttyN. uinput allows\n" +" insertion of BOTH keystrokes and mouse input and so it\n" +" preferred when accessing graphical (e.g. QT-embedded)\n" +" linux console apps. See -pipeinput UINPUT below\n" +" for more information on this mode (you may want to\n" +" also use the -nodragging and -cursor none options).\n" +" Use \"cons0\", etc or -pipeinput CONS to force the\n" +" /dev/ttyN method.\n" +"\n" +" Note you can change VT remotely using the chvt(1)\n" +" command. Sometimes switching out and back corrects\n" +" the framebuffer state.\n" +"\n" +" To skip input injecting entirely use \"consx\".\n" "\n" " The strings \"console\", or \"/dev/fb0\" can be used\n" " instead of \"cons\". The latter can be used to specify\n" -" a different framebuffer device, e.g. /dev/fb1. If the\n" -" name is something nonstandard, use \"cons:/dev/foofb\"\n" +" a different framebuffer device, e.g. /dev/fb1. As a\n" +" shortcut the \"/dev/\" can be dropped. If the name is\n" +" something nonstandard, use \"cons:/dev/foofb\"\n" "\n" " If you do not want x11vnc to guess the framebuffer's\n" -" WxHxB and masks automatically, specify them with a\n" +" WxHxB and masks automatically (sometimes the kernel\n" +" given inaccurate information), specify them with a\n" " @WxHxB at the end of the string.\n" "\n" " Examples:\n" " -rawfb cons (same as -rawfb console)\n" " -rawfb /dev/fb0 (same)\n" " -rawfb cons3 (force /dev/tty3)\n" -" -rawfb consx (no keystrokes)\n" +" -rawfb consx (no keystrokes or mouse)\n" " -rawfb console:/dev/nonstd\n" +" -rawfb cons -pipeinput UINPUT:accel=1.5\n" "\n" "-freqtab file For use with \"-rawfb video\" for TV tuner devices to\n" " specify station frequencies. Instead of using the built\n" @@ -2561,6 +2591,8 @@ void print_help(int mode) { " value is stored in X11VNC_RAWFB_STR for the pipe command\n" " to use if it wants. Do 'env | grep X11VNC' for more.\n" "\n" +" Built-in pipeinput modes:\n" +"\n" " If cmd is \"VID\" and you are using the -rawfb for a\n" " video capture device, then an internal list of keyboard\n" " mappings is used to set parameters of the video.\n" @@ -2579,7 +2611,57 @@ void print_help(int mode) { "\n" " If cmd is \"CONS\" or \"CONSn\" where n is a Linux\n" " console number, then the linux console keystroke\n" -" insertion (see -rawfb cons) is performed.\n" +" insertion to /dev/ttyN (see -rawfb cons) is performed.\n" +"\n" +" If cmd begins with \"UINPUT\" then the Linux uinput\n" +" module is used to insert both keystroke and mouse events\n" +" to the Linux console (see -rawfb above). This usually\n" +" is the /dev/input/uinput device file (you may need to\n" +" create it with \"mknod /dev/input/uinput c 10 223\"\n" +" and insert the module with \"modprobe uinput\".\n" +"\n" +" The UINPUT mode currently only does US keyboards (a\n" +" scan code option may be added), and not all keysyms\n" +" are supported.\n" +"\n" +" You may want to use the options -cursor none and\n" +" -nodragging in this mode.\n" +"\n" +" Additional tuning options may be supplied via:\n" +" UINPUT:opt1,opt2,... (a comma separated list). If an\n" +" option begins with \"/\" it is taken as the uinput\n" +" device file.\n" +" \n" +" Which uinput is injected can be controlled by an option\n" +" string made of the characters \"K\", \"M\", and \"B\"\n" +" (see the -input option), e.g. \"KM\" allows keystroke\n" +" and motion but not button clicks.\n" +"\n" +" A UINPUT option of the form: accel=f, or accel=fx+fy\n" +" sets the mouse motion \"acceleration\". This is used\n" +" to correct raw mouse relative motion into how much the\n" +" application cursor moves (x11vnc has no control over\n" +" how the application interprets the raw mouse motions).\n" +" Typically the acceleration for an X display is 2 (see\n" +" xset \"m\" option). \"f\" is a floating point number,\n" +" e.g. 2.0. Use \"fx+fy\" if you need to supply different\n" +" corrections for x and y.\n" +"\n" +" Note: the default acceleration is 2.0 since it seems\n" +" both X and qt-embedded often use this value.\n" +"\n" +" Even with a correct accel setting the mouse position\n" +" will get out of sync (probably due to a mouse\n" +" \"threshold\" setting where the acceleration doe not\n" +" apply, set xset(1)). The option reset=N sets the number\n" +" of ms (default 500) after which the cursor is attempted\n" +" to be reset (by forcing the mouse to (0, 0) via small\n" +" increments and then back out to (x, y) in 1 jump), This\n" +" correction seems to be needed but can cause jerkiness\n" +" or unexpected behavior. Use reset=0 to disable.\n" +"\n" +" Example:\n" +" -pipeinput UINPUT:accel=1.0 -cursor none\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" @@ -2907,6 +2989,8 @@ void print_help(int mode) { " reset_record reset RECORD extension (if avail.)\n" " pointer_mode:n set -pointer_mode to n. same as \"pm\"\n" " input_skip:n set -input_skip to n.\n" +" allinput enable use of -allinput mode.\n" +" noallinput disable use of -allinput mode.\n" " speeds:str set -speeds to str.\n" " wmdt:str set -wmdt to str.\n" " debug_pointer enable -debug_pointer, same as \"dp\"\n" @@ -2936,6 +3020,8 @@ void print_help(int mode) { " snapfb enable -snapfb mode.\n" " nosnapfb disable -snapfb mode.\n" " rawfb:str set -rawfb mode to \"str\".\n" +" uinput_accel:f set uinput_accel to f.\n" +" uinput_reset:n set uinput_reset to n ms.\n" " progressive:n set libvncserver -progressive slice\n" " height parameter to n.\n" " desktop:str set -desktop name to str for new clients.\n" @@ -3009,7 +3095,6 @@ void print_help(int mode) { " 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 waitmapped\n" " nowaitmapped clip flashcmap noflashcmap shiftcmap\n" @@ -3040,16 +3125,17 @@ void print_help(int mode) { " nodragging wireframe_mode wireframe wf nowireframe\n" " nowf wirecopyrect wcr nowirecopyrect nowcr scr_area\n" " scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n" -" scr_parms scrollcopyrect scr noscrollcopyrect noscr\n" -" fixscreen noxrecord xrecord reset_record pointer_mode\n" -" pm input_skip input grabkbd nograbkbd grabptr\n" -" nograbptr client_input speeds wmdt debug_pointer dp\n" -" nodebug_pointer nodp debug_keyboard dk nodebug_keyboard\n" -" nodk deferupdate defer wait_ui wait_bog nowait_bog\n" -" slow_fb wait readtimeout nap nonap sb screen_blank\n" -" fbpm nofbpm fs gaps grow fuzz snapfb nosnapfb rawfb\n" -" progressive rfbport http nohttp httpport httpdir\n" -" enablehttpproxy noenablehttpproxy alwaysshared\n" +" scr_parms scrollcopyrect scr noscrollcopyrect\n" +" noscr fixscreen noxrecord xrecord reset_record\n" +" pointer_mode pm input_skip allinput noallinput input\n" +" grabkbd nograbkbd grabptr nograbptr client_input\n" +" speeds wmdt debug_pointer dp nodebug_pointer nodp\n" +" debug_keyboard dk nodebug_keyboard nodk deferupdate\n" +" defer wait_ui wait_bog nowait_bog slow_fb wait\n" +" readtimeout nap nonap sb screen_blank fbpm nofbpm\n" +" fs gaps grow fuzz snapfb nosnapfb rawfb uinput_accel\n" +" uinput_reset progressive rfbport http nohttp httpport\n" +" httpdir enablehttpproxy noenablehttpproxy alwaysshared\n" " noalwaysshared nevershared noalwaysshared dontdisconnect\n" " nodontdisconnect desktop debug_xevents nodebug_xevents\n" " debug_xevents debug_xdamage nodebug_xdamage\n" @@ -3074,7 +3160,6 @@ void print_help(int mode) { " mouse_x mouse_y bpp depth indexed_color dpy_x dpy_y\n" " wdpy_x wdpy_y off_x off_y cdpy_x cdpy_y coff_x coff_y\n" " rfbauth passwd viewpasswd\n" -"\n" "-QD variable Just like -query variable, but returns the default\n" " value for that parameter (no running x11vnc server\n" " is consulted)\n" |