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