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
128ee3ec
Commit
128ee3ec
authored
Mar 16, 2009
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some -remap tricks. Limit rfbCFD message count.
parent
9ae2e839
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
117 additions
and
18 deletions
+117
-18
README
x11vnc/README
+19
-3
enc.h
x11vnc/enc.h
+12
-2
help.c
x11vnc/help.c
+17
-1
keyboard.c
x11vnc/keyboard.c
+38
-8
util.c
x11vnc/util.c
+12
-1
x11vnc.1
x11vnc/x11vnc.1
+17
-1
x11vnc.c
x11vnc/x11vnc.c
+1
-1
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+1
-1
No files found.
x11vnc/README
View file @
128ee3ec
...
...
@@ -2,7 +2,7 @@
Copyright
(
C
)
2002
-
2009
Karl
J
.
Runge
<
runge
@
karlrunge
.
com
>
All
rights
reserved
.
x11vnc
README
file
Date
:
S
at
Mar
14
21
:
57
:
32
EDT
2009
x11vnc
README
file
Date
:
S
un
Mar
15
18
:
06
:
19
EDT
2009
The
following
information
is
taken
from
these
URLs
:
...
...
@@ -12500,7 +12500,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-03-1
4
x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-03-1
5
x11vnc options:
-display disp -auth file -N
...
...
@@ -12625,7 +12625,7 @@ libvncserver-tight-extension options:
% x11vnc -help
x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-03-1
4
x11vnc: allow VNC connections to real X11 displays. 0.9.7 lastmod: 2009-03-1
5
(type "
x11vnc
-
opts
" to just list the options.)
...
...
@@ -15251,10 +15251,26 @@ t
"
string
" exists, it is instead interpreted as this
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
header file for a list of Keysym names, or use xev(1).
To map a key to a button click, use the fake Keysyms
"
Button1
", ..., etc. E.g: "
-
remap
Super_R
-
Button2
"
(useful for pasting on a laptop)
I use these if the machine I am viewing from does not
have a scrollwheel or I don't like using the one it has:
-remap Super_R-Button4,Menu-Button5
-remap KP_Add-Button4,KP_Enter-Button5
the former would be used on a PC, the latter on a
MacBook. This way those little used keys can be used
to generate bigger hops than the Up and Down arrows
provide. One can scroll through text or web pages more
quickly this way (especially if x11vnc scroll detection
is active.)
Use Button44, Button12, etc. for multiple clicks.
To disable a keysym (i.e. make it so it will not be
injected), remap it to "
NoSymbol
" or "
None
".
...
...
x11vnc/enc.h
View file @
128ee3ec
...
...
@@ -66,7 +66,7 @@ so, delete this exception statement from your version.
* without using SSH or SSL.
*
* -----------------------------------------------------------------------
* Copyright (
c) 2008
Karl J. Runge <runge@karlrunge.com>
* Copyright (
C) 2008-2009
Karl J. Runge <runge@karlrunge.com>
* All rights reserved.
*
* This is free software; you can redistribute it and/or modify
...
...
@@ -81,7 +81,17 @@ so, delete this exception statement from your version.
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
* USA or see <http://www.gnu.org/licenses/>.
*
* In addition, as a special exception, Karl J. Runge
* gives permission to link the code of its release of x11vnc with the
* OpenSSL project's "OpenSSL" library (or with modified versions of it
* that use the same license as the "OpenSSL" library), and distribute
* the linked executables. You must obey the GNU General Public License
* in all respects for all of the code used other than "OpenSSL". If you
* modify this file, you may extend this exception to your version of the
* file, but you are not obligated to do so. If you do not wish to do
* so, delete this exception statement from your version.
* -----------------------------------------------------------------------
*/
...
...
x11vnc/help.c
View file @
128ee3ec
...
...
@@ -2683,10 +2683,26 @@ void print_help(int mode) {
"
\"
string
\"
exists, it is instead interpreted as this
\n
"
" form: key1-key2,key3-key4,... See <X11/keysymdef.h>
\n
"
" header file for a list of Keysym names, or use xev(1).
\n
"
"
\n
"
" To map a key to a button click, use the fake Keysyms
\n
"
"
\"
Button1
\"
, ..., etc. E.g:
\"
-remap Super_R-Button2
\"\n
"
" (useful for pasting on a laptop)
\n
"
"
\n
"
" I use these if the machine I am viewing from does not
\n
"
" have a scrollwheel or I don't like using the one it has:
\n
"
"
\n
"
" -remap Super_R-Button4,Menu-Button5
\n
"
" -remap KP_Add-Button4,KP_Enter-Button5
\n
"
"
\n
"
" the former would be used on a PC, the latter on a
\n
"
" MacBook. This way those little used keys can be used
\n
"
" to generate bigger hops than the Up and Down arrows
\n
"
" provide. One can scroll through text or web pages more
\n
"
" quickly this way (especially if x11vnc scroll detection
\n
"
" is active.)
\n
"
"
\n
"
" Use Button44, Button12, etc. for multiple clicks.
\n
"
"
\n
"
" To disable a keysym (i.e. make it so it will not be
\n
"
" injected), remap it to
\"
NoSymbol
\"
or
\"
None
\"
.
\n
"
"
\n
"
...
...
@@ -5432,7 +5448,7 @@ void print_license(void) {
"
\n
"
"x11vnc: a VNC server for X displays. %s
\n
"
"
\n
"
"Copyright (
c) 2002-2008
Karl J. Runge <runge@karlrunge.com>
\n
"
"Copyright (
C) 2002-2009
Karl J. Runge <runge@karlrunge.com>
\n
"
"All rights reserved.
\n
"
"
\n
"
;
...
...
x11vnc/keyboard.c
View file @
128ee3ec
...
...
@@ -2860,6 +2860,8 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if
(
isbutton
)
{
int
mask
,
button
=
(
int
)
keysym
;
int
x
=
cursor_x
,
y
=
cursor_y
;
char
*
b
,
bstr
[
32
];
if
(
!
down
)
{
return
;
}
...
...
@@ -2874,10 +2876,23 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
* remap the button click to keystroke sequences!
* Usually just will simulate the button click.
*/
mask
=
1
<<
(
button
-
1
);
pointer
(
mask
,
x
,
y
,
client
);
mask
=
0
;
pointer
(
mask
,
x
,
y
,
client
);
/* loop over possible multiclicks: Button123 */
sprintf
(
bstr
,
"%d"
,
button
);
b
=
bstr
;
while
(
*
b
!=
'\0'
)
{
char
t
[
2
];
int
butt
;
t
[
0
]
=
*
b
;
t
[
1
]
=
'\0'
;
if
(
sscanf
(
t
,
"%d"
,
&
butt
)
==
1
)
{
mask
=
1
<<
(
butt
-
1
);
pointer
(
mask
,
x
,
y
,
client
);
mask
=
0
;
pointer
(
mask
,
x
,
y
,
client
);
}
b
++
;
}
return
;
}
...
...
@@ -3302,6 +3317,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if
(
isbutton
)
{
int
mask
,
button
=
(
int
)
keysym
;
char
*
b
,
bstr
[
32
];
if
(
!
down
)
{
return
;
/* nothing to send */
}
...
...
@@ -3317,10 +3334,23 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
* remap the button click to keystroke sequences!
* Usually just will simulate the button click.
*/
mask
=
1
<<
(
button
-
1
);
do_button_mask_change
(
mask
,
button
);
/* down */
mask
=
0
;
do_button_mask_change
(
mask
,
button
);
/* up */
/* loop over possible multiclicks: Button123 */
sprintf
(
bstr
,
"%d"
,
button
);
b
=
bstr
;
while
(
*
b
!=
'\0'
)
{
char
t
[
2
];
int
butt
;
t
[
0
]
=
*
b
;
t
[
1
]
=
'\0'
;
if
(
sscanf
(
t
,
"%d"
,
&
butt
)
==
1
)
{
mask
=
1
<<
(
butt
-
1
);
do_button_mask_change
(
mask
,
butt
);
/* down */
mask
=
0
;
do_button_mask_change
(
mask
,
butt
);
/* up */
}
b
++
;
}
XFlush_wr
(
dpy
);
X_UNLOCK
;
return
;
...
...
x11vnc/util.c
View file @
128ee3ec
...
...
@@ -568,7 +568,18 @@ void rfbCFD(long usec) {
return
;
}
if
(
unixpw
&&
unixpw_in_progress
&&
!
unixpw_in_rfbPE
)
{
rfbLog
(
"unixpw_in_rfbPE: skipping rfbCFD
\n
"
);
static
int
msgs
=
0
;
static
double
last_reset
=
0
.
0
;
if
(
dnow
()
>
last_reset
+
5
.
0
)
{
msgs
=
0
;
last_reset
=
dnow
();
}
if
(
msgs
++
<
10
)
{
rfbLog
(
"unixpw_in_rfbPE: skipping rfbCFD
\n
"
);
if
(
msgs
==
10
)
{
rfbLog
(
"unixpw_in_rfbPE: skipping rfbCFD ...
\n
"
);
}
}
return
;
}
if
(
usec
>
USEC_MAX
)
{
...
...
x11vnc/x11vnc.1
View file @
128ee3ec
...
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "March 2009" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.7, lastmod: 2009-03-1
4
version: 0.9.7, lastmod: 2009-03-1
5
.SH SYNOPSIS
.B x11vnc
[OPTION]...
...
...
@@ -3048,10 +3048,26 @@ or hex value) separated by a space. If no file named
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
header file for a list of Keysym names, or use
.IR xev (1).
.IP
To map a key to a button click, use the fake Keysyms
"Button1", ..., etc. E.g: "\fB-remap\fR \fISuper_R-Button2\fR"
(useful for pasting on a laptop)
.IP
I use these if the machine I am viewing from does not
have a scrollwheel or I don't like using the one it has:
.IP
\fB-remap\fR Super_R-Button4,Menu-Button5
\fB-remap\fR KP_Add-Button4,KP_Enter-Button5
.IP
the former would be used on a PC, the latter on a
MacBook. This way those little used keys can be used
to generate bigger hops than the Up and Down arrows
provide. One can scroll through text or web pages more
quickly this way (especially if x11vnc scroll detection
is active.)
.IP
Use Button44, Button12, etc. for multiple clicks.
.IP
To disable a keysym (i.e. make it so it will not be
injected), remap it to "NoSymbol" or "None".
.IP
...
...
x11vnc/x11vnc.c
View file @
128ee3ec
...
...
@@ -34,7 +34,7 @@
/*
* This program is based on some ideas from the following programs:
*
* the
origin
ial x11vnc.c in libvncserver (Johannes E. Schindelin)
* the
init
ial x11vnc.c in libvncserver (Johannes E. Schindelin)
* x0rfbserver, the original native X vnc server (Jens Wagner)
* krfb, the KDE desktopsharing project (Tim Jansen)
*
...
...
x11vnc/x11vnc_defs.c
View file @
128ee3ec
...
...
@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
int
xdamage_base_event_type
=
0
;
/* date +'lastmod: %Y-%m-%d' */
char
lastmod
[]
=
"0.9.7 lastmod: 2009-03-1
4
"
;
char
lastmod
[]
=
"0.9.7 lastmod: 2009-03-1
5
"
;
/* X display info */
...
...
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