Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
d7d55ec8
Commit
d7d55ec8
authored
Jul 12, 2006
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: wording changes; remove "-rawfb cons" in favor of "console"
parent
0abd329d
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1234 additions
and
1200 deletions
+1234
-1200
README
x11vnc/README
+1114
-1092
help.c
x11vnc/help.c
+56
-45
keyboard.c
x11vnc/keyboard.c
+1
-1
linuxfb.c
x11vnc/linuxfb.c
+9
-12
params.h
x11vnc/params.h
+1
-1
pointer.c
x11vnc/pointer.c
+4
-4
screen.c
x11vnc/screen.c
+1
-1
user.c
x11vnc/user.c
+1
-1
x11vnc.1
x11vnc/x11vnc.1
+47
-43
No files found.
x11vnc/README
View file @
d7d55ec8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
x11vnc/help.c
View file @
d7d55ec8
...
@@ -326,7 +326,9 @@ void print_help(int mode) {
...
@@ -326,7 +326,9 @@ void print_help(int mode) {
" to the program location and in standard locations
\n
"
" to the program location and in standard locations
\n
"
" (/usr/local/share/x11vnc/classes, etc). Under -ssl or
\n
"
" (/usr/local/share/x11vnc/classes, etc). Under -ssl or
\n
"
" -stunnel the ssl classes subdirectory is sought.
\n
"
" -stunnel the ssl classes subdirectory is sought.
\n
"
#ifndef REL8x
"-http_ssl As -http, but force lookup for ssl classes subdir.
\n
"
"-http_ssl As -http, but force lookup for ssl classes subdir.
\n
"
#endif
"
\n
"
"
\n
"
"-connect string For use with
\"
vncviewer -listen
\"
reverse connections.
\n
"
"-connect string For use with
\"
vncviewer -listen
\"
reverse connections.
\n
"
" If
\"
string
\"
has the form
\"
host
\"
or
\"
host:port
\"\n
"
" If
\"
string
\"
has the form
\"
host
\"
or
\"
host:port
\"\n
"
...
@@ -396,14 +398,16 @@ void print_help(int mode) {
...
@@ -396,14 +398,16 @@ void print_help(int mode) {
" a global -viewonly is in effect (all input is discarded
\n
"
" a global -viewonly is in effect (all input is discarded
\n
"
" in that case).
\n
"
" in that case).
\n
"
"
\n
"
"
\n
"
"-grabkbd When VNC viewers are connected, attempt to the grab the
\n
"
"-grabkbd When VNC viewers are connected, attempt to the grab
\n
"
" keyboard so someone sitting at the physical display
\n
"
" the keyboard so a (non-malicious) user sitting at the
\n
"
" is not able to enter keystrokes. This method uses
\n
"
" physical display is not able to enter keystrokes.
\n
"
" XGrabKeyboard(3X11) and so it is not secure and does not
\n
"
" This method uses XGrabKeyboard(3X11) and so it is
\n
"
" rule out the person at the physical display injecting
\n
"
" not secure and does not rule out the person at the
\n
"
" keystrokes by flooding the server with them, grabbing
\n
"
" physical display injecting keystrokes by flooding the
\n
"
" the keyboard himself, etc. Some degree of cooperation
\n
"
" server with them, grabbing the keyboard himself, etc.
\n
"
" from the person at the display is assumed.
\n
"
" Some degree of cooperation from the person at the
\n
"
" display is assumed. This is intended for remote
\n
"
" help-desk or educational usage modes.
\n
"
"-grabptr As -grabkbd, but for the mouse pointer using
\n
"
"-grabptr As -grabkbd, but for the mouse pointer using
\n
"
" XGrabPointer(3X11). Unfortunately due to the way the X
\n
"
" XGrabPointer(3X11). Unfortunately due to the way the X
\n
"
" server works, the mouse can still be moved around by the
\n
"
" server works, the mouse can still be moved around by the
\n
"
...
@@ -585,6 +589,7 @@ void print_help(int mode) {
...
@@ -585,6 +589,7 @@ void print_help(int mode) {
" from inetd and xdm/gdm/kdm). All of the -unixpw options
\n
"
" from inetd and xdm/gdm/kdm). All of the -unixpw options
\n
"
" and contraints apply.
\n
"
" and contraints apply.
\n
"
"
\n
"
"
\n
"
#endif
"-display WAIT:... A special usage mode for the normal -display option.
\n
"
"-display WAIT:... A special usage mode for the normal -display option.
\n
"
" Useful with -unixpw, but can be used independently
\n
"
" Useful with -unixpw, but can be used independently
\n
"
" of it. If the display string begins with WAIT: then
\n
"
" of it. If the display string begins with WAIT: then
\n
"
...
@@ -610,6 +615,7 @@ void print_help(int mode) {
...
@@ -610,6 +615,7 @@ void print_help(int mode) {
" of the form XAUTHORITY=<file> or raw xauthority data for
\n
"
" of the form XAUTHORITY=<file> or raw xauthority data for
\n
"
" the display (e.g.
\"
xauth extract - $DISPLAY
\"
output).
\n
"
" the display (e.g.
\"
xauth extract - $DISPLAY
\"
output).
\n
"
"
\n
"
"
\n
"
#ifndef REL8x
" In the case of -unixpw (but not -unixpw_nis), then the
\n
"
" In the case of -unixpw (but not -unixpw_nis), then the
\n
"
" above command is run as the user who just authenticated
\n
"
" above command is run as the user who just authenticated
\n
"
" via the login and password prompt.
\n
"
" via the login and password prompt.
\n
"
...
@@ -650,6 +656,7 @@ void print_help(int mode) {
...
@@ -650,6 +656,7 @@ void print_help(int mode) {
" process that will not switch, but it is only encoding
\n
"
" process that will not switch, but it is only encoding
\n
"
" and decoding the encrypted stream at that point.
\n
"
" and decoding the encrypted stream at that point.
\n
"
"
\n
"
"
\n
"
#endif
" As a special case, WAIT:cmd=FINDDISPLAY will run a
\n
"
" As a special case, WAIT:cmd=FINDDISPLAY will run a
\n
"
" script that works on most Unixes to determine a user's
\n
"
" script that works on most Unixes to determine a user's
\n
"
" DISPLAY variable and xauthority data (see who(1)).
\n
"
" DISPLAY variable and xauthority data (see who(1)).
\n
"
...
@@ -672,6 +679,7 @@ void print_help(int mode) {
...
@@ -672,6 +679,7 @@ void print_help(int mode) {
" the VNC client first attaches to since some VNC viewers
\n
"
" the VNC client first attaches to since some VNC viewers
\n
"
" will not automatically adjust to a new framebuffer size.
\n
"
" will not automatically adjust to a new framebuffer size.
\n
"
"
\n
"
"
\n
"
#ifndef REL8x
"-ssl [pem] Use the openssl library (www.openssl.org) to provide a
\n
"
"-ssl [pem] Use the openssl library (www.openssl.org) to provide a
\n
"
" built-in encrypted SSL tunnel between VNC viewers and
\n
"
" built-in encrypted SSL tunnel between VNC viewers and
\n
"
" x11vnc. This requires libssl support to be compiled
\n
"
" x11vnc. This requires libssl support to be compiled
\n
"
...
@@ -2375,7 +2383,7 @@ void print_help(int mode) {
...
@@ -2375,7 +2383,7 @@ void print_help(int mode) {
" discusion below where the device may be queried for
\n
"
" discusion below where the device may be queried for
\n
"
" (and possibly set) the framebuffer parameters.
\n
"
" (and possibly set) the framebuffer parameters.
\n
"
"
\n
"
"
\n
"
" If the string begins with
\"
cons
\"
,
\"
/dev/fb
\"
, or
\n
"
" If the string begins with
\"
cons
ole
\"
,
\"
/dev/fb
\"
, or
\n
"
"
\"
fb
\"
, see the LINUX CONSOLE discussion below where
\n
"
"
\"
fb
\"
, see the LINUX CONSOLE discussion below where
\n
"
" the framebuffer device is opened and keystrokes (and
\n
"
" the framebuffer device is opened and keystrokes (and
\n
"
" possibly mouse events) are inserted into the console.
\n
"
" possibly mouse events) are inserted into the console.
\n
"
...
@@ -2519,38 +2527,38 @@ void print_help(int mode) {
...
@@ -2519,38 +2527,38 @@ void print_help(int mode) {
" the following method because it will be faster and more
\n
"
" the following method because it will be faster and more
\n
"
" accurate for Linux text console.
\n
"
" accurate for Linux text console.
\n
"
"
\n
"
"
\n
"
" If the rawfb string begins with
\"
cons
\"
the framebuffer
\n
"
" If the rawfb string begins with
\"
cons
ole
\"
the
\n
"
"
device /dev/fb0 is opened (this requires the appropriate
\n
"
"
framebuffer device /dev/fb0 is opened (this requires
\n
"
"
kernel modules to be installed) and so is /dev/tty0.
\n
"
"
the appropriate kernel modules to be installed) and so
\n
"
"
The latter is used to inject keystrokes (not all are
\n
"
"
is /dev/tty0. The latter is used to inject keystrokes
\n
"
"
supported, but the basic ones are). You will need to
\n
"
"
(not all are supported, but the basic ones are).
\n
"
"
be root to inject keystrokes. /dev/tty0 refers to the
\n
"
"
You will need to be root to inject keystrokes.
\n
"
"
active VT, to indicate one explicitly, use
\"
cons2
\"
,
\n
"
"
/dev/tty0 refers to the active VT, to indicate one
\n
"
" etc. using the VT number.
\n
"
" e
xplicitly, use
\"
console2
\"
, e
tc. using the VT number.
\n
"
"
\n
"
"
\n
"
" If the Linux version seems to be 2.6 or later and
\n
"
" If the Linux version seems to be 2.6 or later and
the
\n
"
"
the
\"
uinput
\"
module appears to be present, then
\n
"
"
\"
uinput
\"
module appears to be present, then the uinput
\n
"
"
the uinput method will be used instead of /dev/ttyN.
\n
"
"
method will be used instead of /dev/ttyN. uinput allows
\n
"
"
uinput allows insertion of BOTH keystrokes and mouse
\n
"
"
insertion of BOTH keystrokes and mouse input and so it
\n
"
"
input and so it preferred when accessing graphical
\n
"
"
preferred when accessing graphical (e.g. QT-embedded)
\n
"
"
(e.g. QT-embedded) linux console apps. See -pipeinput
\n
"
"
linux console apps. See -pipeinput UINPUT below for
\n
"
"
UINPUT below for more information on this mode; you
\n
"
"
more information on this mode; you will have to use
\n
"
"
will have to use -pipeinput if you want to tweak any
\n
"
"
-pipeinput if you want to tweak any UINPUT parameters.
\n
"
"
UINPUT parameters. You may also want to also use the
\n
"
"
You may also want to also use the -nodragging and
\n
"
" -
nodragging and -cursor none options. Use
\"
cons0
\"
,
\n
"
" -
cursor none options. Use
\"
console0
\"
, etc or
\n
"
"
etc or -pipeinput CONS
to force the /dev/ttyN method.
\n
"
"
-pipeinput CONSOLE
to force the /dev/ttyN method.
\n
"
"
\n
"
"
\n
"
" Note you can change VT remotely using the chvt(1)
\n
"
" Note you can change VT remotely using the chvt(1)
\n
"
" command. Sometimes switching out and back corrects
\n
"
" command. Sometimes switching out and back corrects
\n
"
" the framebuffer state.
\n
"
" the framebuffer state.
\n
"
"
\n
"
"
\n
"
" To skip input injecting entirely use
\"
consx
\"
.
\n
"
" To skip input injecting entirely use
\"
cons
ole
x
\"
.
\n
"
"
\n
"
"
\n
"
" The string
s
\"
console
\"
, or
\"
/dev/fb0
\"
can be use
d
\n
"
" The string
\"
/dev/fb0
\"
(1, etc.) can be used instea
d
\n
"
"
instead of
\"
cons
\"
. The latter can be used to specify
\n
"
"
of
\"
console
\"
. This can be used to specify a different
\n
"
"
a different framebuffer device, e.g. /dev/fb1. As a
\n
"
"
framebuffer device, e.g. /dev/fb1. As a shortcut the
\n
"
"
shortcut the
\"
/dev/
\"
can be dropped. If the name is
\n
"
"
\"
/dev/
\"
can be dropped. If the name is something
\n
"
"
something nonstandard, use
\"
cons
:/dev/foofb
\"\n
"
"
nonstandard, use
\"
console
:/dev/foofb
\"\n
"
"
\n
"
"
\n
"
" If you do not want x11vnc to guess the framebuffer's
\n
"
" If you do not want x11vnc to guess the framebuffer's
\n
"
" WxHxB and masks automatically (sometimes the kernel
\n
"
" WxHxB and masks automatically (sometimes the kernel
\n
"
...
@@ -2558,12 +2566,12 @@ void print_help(int mode) {
...
@@ -2558,12 +2566,12 @@ void print_help(int mode) {
" @WxHxB at the end of the string.
\n
"
" @WxHxB at the end of the string.
\n
"
"
\n
"
"
\n
"
" Examples:
\n
"
" Examples:
\n
"
" -rawfb cons
(same as -rawfb console)
\n
"
" -rawfb cons
ole
(same as -rawfb console)
\n
"
" -rawfb /dev/fb0 (same)
\n
"
" -rawfb /dev/fb0 (same)
\n
"
" -rawfb cons
3
(force /dev/tty3)
\n
"
" -rawfb cons
ole3
(force /dev/tty3)
\n
"
" -rawfb cons
x
(no keystrokes or mouse)
\n
"
" -rawfb cons
olex
(no keystrokes or mouse)
\n
"
" -rawfb console:/dev/nonstd
\n
"
" -rawfb console:/dev/nonstd
\n
"
" -rawfb cons -pipeinput UINPUT:accel=4.0
\n
"
" -rawfb cons
ole
-pipeinput UINPUT:accel=4.0
\n
"
"
\n
"
"
\n
"
"-freqtab file For use with
\"
-rawfb video
\"
for TV tuner devices to
\n
"
"-freqtab file For use with
\"
-rawfb video
\"
for TV tuner devices to
\n
"
" specify station frequencies. Instead of using the built
\n
"
" specify station frequencies. Instead of using the built
\n
"
...
@@ -2610,9 +2618,10 @@ void print_help(int mode) {
...
@@ -2610,9 +2618,10 @@ void print_help(int mode) {
" format to HI240, RGB565, RGB24, RGB32, RGB555, and
\n
"
" format to HI240, RGB565, RGB24, RGB32, RGB555, and
\n
"
" GREY respectively. See -rawfb video for details.
\n
"
" GREY respectively. See -rawfb video for details.
\n
"
"
\n
"
"
\n
"
" If cmd is
\"
CONS
\"
or
\"
CONSn
\"
where n is a Linux
\n
"
" If cmd is
\"
CONSOLE
\"
or
\"
CONSOLEn
\"
where n
\n
"
" console number, then the linux console keystroke
\n
"
" is a Linux console number, then the linux console
\n
"
" insertion to /dev/ttyN (see -rawfb cons) is performed.
\n
"
" keystroke insertion to /dev/ttyN (see -rawfb console)
\n
"
" is performed.
\n
"
"
\n
"
"
\n
"
" If cmd begins with
\"
UINPUT
\"
then the Linux uinput
\n
"
" If cmd begins with
\"
UINPUT
\"
then the Linux uinput
\n
"
" module is used to insert both keystroke and mouse events
\n
"
" module is used to insert both keystroke and mouse events
\n
"
...
@@ -2667,7 +2676,7 @@ void print_help(int mode) {
...
@@ -2667,7 +2676,7 @@ void print_help(int mode) {
" the thresh=n mode will be enabled. It it currently
\n
"
" the thresh=n mode will be enabled. It it currently
\n
"
" not working well. If |dx| <= thresh and |dy| < thresh
\n
"
" not working well. If |dx| <= thresh and |dy| < thresh
\n
"
" no acceleration is applied. Use
\"
thresh=+n
\"
|dx| +
\n
"
" no acceleration is applied. Use
\"
thresh=+n
\"
|dx| +
\n
"
" |dy| <
=
thresh to be used instead (X11?)
\n
"
" |dy| < thresh to be used instead (X11?)
\n
"
"
\n
"
"
\n
"
" Example:
\n
"
" Example:
\n
"
" -pipeinput UINPUT:accel=4.0 -cursor none
\n
"
" -pipeinput UINPUT:accel=4.0 -cursor none
\n
"
...
@@ -3505,8 +3514,8 @@ void nopassword_warning_msg(int gotloc) {
...
@@ -3505,8 +3514,8 @@ void nopassword_warning_msg(int gotloc) {
}
}
void
print_license
(
void
)
{
void
print_license
(
void
)
{
#if !SKIP_HELP
char
license
[]
=
char
license
[]
=
#if !SKIP_HELP
" GNU GENERAL PUBLIC LICENSE
\n
"
" GNU GENERAL PUBLIC LICENSE
\n
"
" Version 2, June 1991
\n
"
" Version 2, June 1991
\n
"
"
\n
"
"
\n
"
...
@@ -3765,6 +3774,7 @@ void print_license(void) {
...
@@ -3765,6 +3774,7 @@ void print_license(void) {
"of preserving the free status of all derivatives of our free software and
\n
"
"of preserving the free status of all derivatives of our free software and
\n
"
"of promoting the sharing and reuse of software generally.
\n
"
"of promoting the sharing and reuse of software generally.
\n
"
"
\n
"
"
\n
"
#endif
" NO WARRANTY
\n
"
" NO WARRANTY
\n
"
"
\n
"
"
\n
"
" 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
\n
"
" 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
\n
"
...
@@ -3787,6 +3797,7 @@ void print_license(void) {
...
@@ -3787,6 +3797,7 @@ void print_license(void) {
"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
\n
"
"PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
\n
"
"POSSIBILITY OF SUCH DAMAGES.
\n
"
"POSSIBILITY OF SUCH DAMAGES.
\n
"
"
\n
"
"
\n
"
#if !SKIP_HELP
" END OF TERMS AND CONDITIONS
\n
"
" END OF TERMS AND CONDITIONS
\n
"
"
\n
"
"
\n
"
" Appendix: How to Apply These Terms to Your New Programs
\n
"
" Appendix: How to Apply These Terms to Your New Programs
\n
"
...
@@ -3847,6 +3858,7 @@ void print_license(void) {
...
@@ -3847,6 +3858,7 @@ void print_license(void) {
"consider it more useful to permit linking proprietary applications with the
\n
"
"consider it more useful to permit linking proprietary applications with the
\n
"
"library. If this is what you want to do, use the GNU Library General
\n
"
"library. If this is what you want to do, use the GNU Library General
\n
"
"Public License instead of this License.
\n
"
"Public License instead of this License.
\n
"
#endif
;
;
char
top
[]
=
char
top
[]
=
...
@@ -3860,7 +3872,6 @@ void print_license(void) {
...
@@ -3860,7 +3872,6 @@ void print_license(void) {
dup2
(
1
,
2
);
dup2
(
1
,
2
);
fprintf
(
stderr
,
top
,
lastmod
);
fprintf
(
stderr
,
top
,
lastmod
);
fprintf
(
stderr
,
"%s"
,
license
);
fprintf
(
stderr
,
"%s"
,
license
);
#endif
exit
(
1
);
exit
(
1
);
}
}
x11vnc/keyboard.c
View file @
d7d55ec8
...
@@ -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_CONS
OLE
)
{
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
);
...
...
x11vnc/linuxfb.c
View file @
d7d55ec8
...
@@ -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
(
"cons
ole
:"
)
+
strlen
(
str
)
+
1
);
sprintf
(
in
,
"cons:%s"
,
str
);
sprintf
(
in
,
"cons
ole
:%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
(
"cons
ole
:/dev/"
)
+
strlen
(
str
)
+
1
);
sprintf
(
in
,
"cons:/dev/%s"
,
str
);
sprintf
(
in
,
"cons
ole
:/dev/%s"
,
str
);
}
}
if
(
strstr
(
in
,
"cons"
)
!=
in
)
{
if
(
strstr
(
in
,
"cons
ole
"
)
!=
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
,
"cons
x"
)
||
!
strcmp
(
in
,
"cons
olex"
))
{
if
(
!
strcmp
(
in
,
"consolex"
))
{
do_input
=
0
;
do_input
=
0
;
}
else
if
(
!
strcmp
(
in
,
"cons
"
)
||
!
strcmp
(
in
,
"cons
ole"
))
{
}
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
,
"CONS
OLE
%d"
,
tty
);
rfbLog
(
"console_guess: file pipeinput %s
\n
"
,
rfbLog
(
"console_guess: file pipeinput %s
\n
"
,
pipeinput_str
);
pipeinput_str
);
initialize_pipeinput
();
initialize_pipeinput
();
...
...
x11vnc/params.h
View file @
d7d55ec8
...
@@ -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_CONS
OLE
0x2
#define PIPEINPUT_UINPUT 0x3
#define PIPEINPUT_UINPUT 0x3
#define MAX_BUTTONS 5
#define MAX_BUTTONS 5
...
...
x11vnc/pointer.c
View file @
d7d55ec8
...
@@ -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_CONS
OLE
)
{
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
,
"CONS
OLE
"
)
==
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
,
"CONS
OLE
%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_CONS
OLE
;
}
else
{
}
else
{
rfbLog
(
"pipeinput: could not open: %s
\n
"
,
dev
);
rfbLog
(
"pipeinput: could not open: %s
\n
"
,
dev
);
rfbLogPerror
(
"open"
);
rfbLogPerror
(
"open"
);
...
...
x11vnc/screen.c
View file @
d7d55ec8
...
@@ -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
,
"cons
ole
"
)
==
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
)
{
...
...
x11vnc/user.c
View file @
d7d55ec8
...
@@ -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
);
...
...
x11vnc/x11vnc.1
View file @
d7d55ec8
...
@@ -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 "cons
ole
", "/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 "cons
ole" 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.
e
xplicitly, use "console2", e
tc. 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 "cons
ole
x".
.IP
.IP
The string
s "console", or "/dev/fb0" can be use
d
The string
"/dev/fb0" (1, etc.) can be used instea
d
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 cons
ole
(same as \fB-rawfb\fR console)
\fB-rawfb\fR /dev/fb0 (same)
\fB-rawfb\fR /dev/fb0 (same)
\fB-rawfb\fR cons
3
(force /dev/tty3)
\fB-rawfb\fR cons
ole3
(force /dev/tty3)
\fB-rawfb\fR cons
x
(no keystrokes or mouse)
\fB-rawfb\fR cons
olex
(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 cons
ole
\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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment