Commit d7d55ec8 authored by runge's avatar runge

x11vnc: wording changes; remove "-rawfb cons" in favor of "console"

parent 0abd329d
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -2486,7 +2486,7 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) { ...@@ -2486,7 +2486,7 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if (pipeinput_int == PIPEINPUT_VID) { if (pipeinput_int == PIPEINPUT_VID) {
v4l_key_command(down, keysym, client); v4l_key_command(down, keysym, client);
} else if (pipeinput_int == PIPEINPUT_CONS) { } else if (pipeinput_int == PIPEINPUT_CONSOLE) {
console_key_command(down, keysym, client); console_key_command(down, keysym, client);
} else if (pipeinput_int == PIPEINPUT_UINPUT) { } else if (pipeinput_int == PIPEINPUT_UINPUT) {
uinput_key_command(down, keysym, client); uinput_key_command(down, keysym, client);
......
...@@ -26,15 +26,15 @@ char *console_guess(char *str, int *fd) { ...@@ -26,15 +26,15 @@ char *console_guess(char *str, int *fd) {
if (strstr(in, "/dev/fb") == in) { if (strstr(in, "/dev/fb") == in) {
free(in); free(in);
in = (char *) malloc(strlen("cons:") + strlen(str) + 1); in = (char *) malloc(strlen("console:") + strlen(str) + 1);
sprintf(in, "cons:%s", str); sprintf(in, "console:%s", str);
} else if (strstr(in, "fb") == in) { } else if (strstr(in, "fb") == in) {
free(in); free(in);
in = (char *) malloc(strlen("cons:/dev/") + strlen(str) + 1); in = (char *) malloc(strlen("console:/dev/") + strlen(str) + 1);
sprintf(in, "cons:/dev/%s", str); sprintf(in, "console:/dev/%s", str);
} }
if (strstr(in, "cons") != in) { if (strstr(in, "console") != in) {
rfbLog("console_guess: unrecognized console/fb format: %s\n", str); rfbLog("console_guess: unrecognized console/fb format: %s\n", str);
free(in); free(in);
return NULL; return NULL;
...@@ -77,19 +77,16 @@ char *console_guess(char *str, int *fd) { ...@@ -77,19 +77,16 @@ char *console_guess(char *str, int *fd) {
have_uinput = check_uinput(); have_uinput = check_uinput();
} }
if (!strcmp(in, "consx") || !strcmp(in, "consolex")) { if (!strcmp(in, "consolex")) {
do_input = 0; do_input = 0;
} else if (!strcmp(in, "cons") || !strcmp(in, "console")) { } else if (!strcmp(in, "console")) {
/* current active VT: */ /* current active VT: */
if (! have_uinput) { if (! have_uinput) {
tty = 0; tty = 0;
} }
} else { } else {
int n; int n;
if (sscanf(in, "cons%d", &n) == 1) { if (sscanf(in, "console%d", &n) != 1) {
tty = n;
have_uinput = 0;
} else if (sscanf(in, "console%d", &n) != 1) {
tty = n; tty = n;
have_uinput = 0; have_uinput = 0;
} }
...@@ -98,7 +95,7 @@ char *console_guess(char *str, int *fd) { ...@@ -98,7 +95,7 @@ char *console_guess(char *str, int *fd) {
if (do_input) { if (do_input) {
if (tty >=0 && tty < 64) { if (tty >=0 && tty < 64) {
pipeinput_str = (char *) malloc(10); pipeinput_str = (char *) malloc(10);
sprintf(pipeinput_str, "CONS%d", tty); sprintf(pipeinput_str, "CONSOLE%d", tty);
rfbLog("console_guess: file pipeinput %s\n", rfbLog("console_guess: file pipeinput %s\n",
pipeinput_str); pipeinput_str);
initialize_pipeinput(); initialize_pipeinput();
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define PIPEINPUT_NONE 0x0 #define PIPEINPUT_NONE 0x0
#define PIPEINPUT_VID 0x1 #define PIPEINPUT_VID 0x1
#define PIPEINPUT_CONS 0x2 #define PIPEINPUT_CONSOLE 0x2
#define PIPEINPUT_UINPUT 0x3 #define PIPEINPUT_UINPUT 0x3
#define MAX_BUTTONS 5 #define MAX_BUTTONS 5
......
...@@ -521,7 +521,7 @@ static void pipe_pointer(int mask, int x, int y, rfbClientPtr client) { ...@@ -521,7 +521,7 @@ static void pipe_pointer(int mask, int x, int y, rfbClientPtr client) {
if (pipeinput_int == PIPEINPUT_VID) { if (pipeinput_int == PIPEINPUT_VID) {
v4l_pointer_command(mask, x, y, client); v4l_pointer_command(mask, x, y, client);
} else if (pipeinput_int == PIPEINPUT_CONS) { } else if (pipeinput_int == PIPEINPUT_CONSOLE) {
console_pointer_command(mask, x, y, client); console_pointer_command(mask, x, y, client);
} else if (pipeinput_int == PIPEINPUT_UINPUT) { } else if (pipeinput_int == PIPEINPUT_UINPUT) {
uinput_pointer_command(mask, x, y, client); uinput_pointer_command(mask, x, y, client);
...@@ -924,10 +924,10 @@ if (0) fprintf(stderr, "initialize_pipeinput: %s -- %s\n", pipeinput_str, p); ...@@ -924,10 +924,10 @@ if (0) fprintf(stderr, "initialize_pipeinput: %s -- %s\n", pipeinput_str, p);
if (!strcmp(p, "VID")) { if (!strcmp(p, "VID")) {
pipeinput_int = PIPEINPUT_VID; pipeinput_int = PIPEINPUT_VID;
return; return;
} else if (strstr(p, "CONS") == p) { } else if (strstr(p, "CONSOLE") == p) {
int tty = 0, n; int tty = 0, n;
char dev[32]; char dev[32];
if (sscanf(p, "CONS%d", &n) == 1) { if (sscanf(p, "CONSOLE%d", &n) == 1) {
tty = n; tty = n;
} }
sprintf(dev, "/dev/tty%d", tty); sprintf(dev, "/dev/tty%d", tty);
...@@ -938,7 +938,7 @@ if (0) fprintf(stderr, "initialize_pipeinput: %s -- %s\n", pipeinput_str, p); ...@@ -938,7 +938,7 @@ if (0) fprintf(stderr, "initialize_pipeinput: %s -- %s\n", pipeinput_str, p);
free(pipeinput_cons_dev); free(pipeinput_cons_dev);
} }
pipeinput_cons_dev = strdup(dev); pipeinput_cons_dev = strdup(dev);
pipeinput_int = PIPEINPUT_CONS; pipeinput_int = PIPEINPUT_CONSOLE;
} else { } else {
rfbLog("pipeinput: could not open: %s\n", dev); rfbLog("pipeinput: could not open: %s\n", dev);
rfbLogPerror("open"); rfbLogPerror("open");
......
...@@ -961,7 +961,7 @@ if (db) fprintf(stderr, "initialize_raw_fb reset\n"); ...@@ -961,7 +961,7 @@ if (db) fprintf(stderr, "initialize_raw_fb reset\n");
rawfb_dev_video = 1; rawfb_dev_video = 1;
} else if (strstr(str, "dev/video")) { } else if (strstr(str, "dev/video")) {
rawfb_dev_video = 1; rawfb_dev_video = 1;
} else if (strstr(str, "cons") == str || strstr(str, "fb") == str || } else if (strstr(str, "console") == str || strstr(str, "fb") == str ||
strstr(str, "/dev/fb") == str) { strstr(str, "/dev/fb") == str) {
char *str2 = console_guess(str, &raw_fb_fd); char *str2 = console_guess(str, &raw_fb_fd);
if (str2 == NULL) { if (str2 == NULL) {
......
...@@ -1152,7 +1152,7 @@ int wait_for_client(int *argc, char** argv, int http) { ...@@ -1152,7 +1152,7 @@ int wait_for_client(int *argc, char** argv, int http) {
if (!strcmp(argv[i], "-desktop")) { if (!strcmp(argv[i], "-desktop")) {
dt = 1; dt = 1;
} }
if (1) fprintf(stderr, "args %d %s\n", i, argv[i]); if (db) fprintf(stderr, "args %d %s\n", i, argv[i]);
} }
str = strdup(use_dpy); str = strdup(use_dpy);
......
...@@ -481,15 +481,18 @@ in that case). ...@@ -481,15 +481,18 @@ in that case).
.PP .PP
\fB-grabkbd\fR \fB-grabkbd\fR
.IP .IP
When VNC viewers are connected, attempt to the grab the When VNC viewers are connected, attempt to the grab
keyboard so someone sitting at the physical display the keyboard so a (non-malicious) user sitting at the
is not able to enter keystrokes. This method uses physical display is not able to enter keystrokes.
This method uses
.IR XGrabKeyboard (3X11) .IR XGrabKeyboard (3X11)
and so it is not secure and does not and so it is
rule out the person at the physical display injecting not secure and does not rule out the person at the
keystrokes by flooding the server with them, grabbing physical display injecting keystrokes by flooding the
the keyboard himself, etc. Some degree of cooperation server with them, grabbing the keyboard himself, etc.
from the person at the display is assumed. Some degree of cooperation from the person at the
display is assumed. This is intended for remote
help-desk or educational usage modes.
.PP .PP
\fB-grabptr\fR \fB-grabptr\fR
.IP .IP
...@@ -2827,7 +2830,7 @@ If the string begins with "video", see the VIDEO4LINUX ...@@ -2827,7 +2830,7 @@ If the string begins with "video", see the VIDEO4LINUX
discusion below where the device may be queried for discusion below where the device may be queried for
(and possibly set) the framebuffer parameters. (and possibly set) the framebuffer parameters.
.IP .IP
If the string begins with "cons", "/dev/fb", or If the string begins with "console", "/dev/fb", or
"fb", see the LINUX CONSOLE discussion below where "fb", see the LINUX CONSOLE discussion below where
the framebuffer device is opened and keystrokes (and the framebuffer device is opened and keystrokes (and
possibly mouse events) are inserted into the console. possibly mouse events) are inserted into the console.
...@@ -2982,39 +2985,39 @@ is on your system you may want to use that instead of ...@@ -2982,39 +2985,39 @@ is on your system you may want to use that instead of
the following method because it will be faster and more the following method because it will be faster and more
accurate for Linux text console. accurate for Linux text console.
.IP .IP
If the rawfb string begins with "cons" the framebuffer If the rawfb string begins with "console" the
device /dev/fb0 is opened (this requires the appropriate framebuffer device /dev/fb0 is opened (this requires
kernel modules to be installed) and so is /dev/tty0. the appropriate kernel modules to be installed) and so
The latter is used to inject keystrokes (not all are is /dev/tty0. The latter is used to inject keystrokes
supported, but the basic ones are). You will need to (not all are supported, but the basic ones are).
be root to inject keystrokes. /dev/tty0 refers to the You will need to be root to inject keystrokes.
active VT, to indicate one explicitly, use "cons2", /dev/tty0 refers to the active VT, to indicate one
etc. using the VT number. explicitly, use "console2", etc. using the VT number.
.IP .IP
If the Linux version seems to be 2.6 or later and If the Linux version seems to be 2.6 or later and the
the "uinput" module appears to be present, then "uinput" module appears to be present, then the uinput
the uinput method will be used instead of /dev/ttyN. method will be used instead of /dev/ttyN. uinput allows
uinput allows insertion of BOTH keystrokes and mouse insertion of BOTH keystrokes and mouse input and so it
input and so it preferred when accessing graphical preferred when accessing graphical (e.g. QT-embedded)
(e.g. QT-embedded) linux console apps. See \fB-pipeinput\fR linux console apps. See \fB-pipeinput\fR UINPUT below for
UINPUT below for more information on this mode; you more information on this mode; you will have to use
will have to use \fB-pipeinput\fR if you want to tweak any \fB-pipeinput\fR if you want to tweak any UINPUT parameters.
UINPUT parameters. You may also want to also use the You may also want to also use the \fB-nodragging\fR and
\fB-nodragging\fR and \fB-cursor\fR none options. Use "cons0", \fB-cursor\fR none options. Use "console0", etc or
etc or \fB-pipeinput\fR CONS to force the /dev/ttyN method. \fB-pipeinput\fR CONSOLE to force the /dev/ttyN method.
.IP .IP
Note you can change VT remotely using the Note you can change VT remotely using the
.IR chvt (1) .IR chvt (1)
command. Sometimes switching out and back corrects command. Sometimes switching out and back corrects
the framebuffer state. the framebuffer state.
.IP .IP
To skip input injecting entirely use "consx". To skip input injecting entirely use "consolex".
.IP .IP
The strings "console", or "/dev/fb0" can be used The string "/dev/fb0" (1, etc.) can be used instead
instead of "cons". The latter can be used to specify of "console". This can be used to specify a different
a different framebuffer device, e.g. /dev/fb1. As a framebuffer device, e.g. /dev/fb1. As a shortcut the
shortcut the "/dev/" can be dropped. If the name is "/dev/" can be dropped. If the name is something
something nonstandard, use "cons:/dev/foofb" nonstandard, use "console:/dev/foofb"
.IP .IP
If you do not want x11vnc to guess the framebuffer's If you do not want x11vnc to guess the framebuffer's
WxHxB and masks automatically (sometimes the kernel WxHxB and masks automatically (sometimes the kernel
...@@ -3022,12 +3025,12 @@ given inaccurate information), specify them with a ...@@ -3022,12 +3025,12 @@ given inaccurate information), specify them with a
@WxHxB at the end of the string. @WxHxB at the end of the string.
.IP .IP
Examples: Examples:
\fB-rawfb\fR cons (same as \fB-rawfb\fR console) \fB-rawfb\fR console (same as \fB-rawfb\fR console)
\fB-rawfb\fR /dev/fb0 (same) \fB-rawfb\fR /dev/fb0 (same)
\fB-rawfb\fR cons3 (force /dev/tty3) \fB-rawfb\fR console3 (force /dev/tty3)
\fB-rawfb\fR consx (no keystrokes or mouse) \fB-rawfb\fR consolex (no keystrokes or mouse)
\fB-rawfb\fR console:/dev/nonstd \fB-rawfb\fR console:/dev/nonstd
\fB-rawfb\fR cons \fB-pipeinput\fR UINPUT:accel=4.0 \fB-rawfb\fR console \fB-pipeinput\fR UINPUT:accel=4.0
.PP .PP
\fB-freqtab\fR \fIfile\fR \fB-freqtab\fR \fIfile\fR
.IP .IP
...@@ -3078,9 +3081,10 @@ F1, F2, ..., F6 will switch the video capture pixel ...@@ -3078,9 +3081,10 @@ F1, F2, ..., F6 will switch the video capture pixel
format to HI240, RGB565, RGB24, RGB32, RGB555, and format to HI240, RGB565, RGB24, RGB32, RGB555, and
GREY respectively. See \fB-rawfb\fR video for details. GREY respectively. See \fB-rawfb\fR video for details.
.IP .IP
If cmd is "CONS" or "CONSn" where n is a Linux If cmd is "CONSOLE" or "CONSOLEn" where n
console number, then the linux console keystroke is a Linux console number, then the linux console
insertion to /dev/ttyN (see \fB-rawfb\fR cons) is performed. keystroke insertion to /dev/ttyN (see \fB-rawfb\fR console)
is performed.
.IP .IP
If cmd begins with "UINPUT" then the Linux uinput If cmd begins with "UINPUT" then the Linux uinput
module is used to insert both keystroke and mouse events module is used to insert both keystroke and mouse events
...@@ -3137,7 +3141,7 @@ If you set the env. var X11VNC_UINPUT_THRESHOLDS then ...@@ -3137,7 +3141,7 @@ If you set the env. var X11VNC_UINPUT_THRESHOLDS then
the thresh=n mode will be enabled. It it currently the thresh=n mode will be enabled. It it currently
not working well. If |dx| <= thresh and |dy| < thresh not working well. If |dx| <= thresh and |dy| < thresh
no acceleration is applied. Use "thresh=+n" |dx| + no acceleration is applied. Use "thresh=+n" |dx| +
|dy| <= thresh to be used instead (X11?) |dy| < thresh to be used instead (X11?)
.IP .IP
Example: Example:
\fB-pipeinput\fR UINPUT:accel=4.0 \fB-cursor\fR none \fB-pipeinput\fR UINPUT:accel=4.0 \fB-cursor\fR none
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment