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 @@
...
@@ -2,7 +2,7 @@
Copyright
(
C
)
2002
-
2009
Karl
J
.
Runge
<
runge
@
karlrunge
.
com
>
Copyright
(
C
)
2002
-
2009
Karl
J
.
Runge
<
runge
@
karlrunge
.
com
>
All
rights
reserved
.
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
:
The
following
information
is
taken
from
these
URLs
:
...
@@ -12500,7 +12500,7 @@ x11vnc: a VNC server for real X displays
...
@@ -12500,7 +12500,7 @@ x11vnc: a VNC server for real X displays
Here are all of x11vnc command line options:
Here are all of x11vnc command line options:
% x11vnc -opts (see below for -help long descriptions)
% 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:
x11vnc options:
-display disp -auth file -N
-display disp -auth file -N
...
@@ -12625,7 +12625,7 @@ libvncserver-tight-extension options:
...
@@ -12625,7 +12625,7 @@ libvncserver-tight-extension options:
% x11vnc -help
% 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.)
(type "
x11vnc
-
opts
" to just list the options.)
...
@@ -15251,10 +15251,26 @@ t
...
@@ -15251,10 +15251,26 @@ t
"
string
" exists, it is instead interpreted as this
"
string
" exists, it is instead interpreted as this
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
header file for a list of Keysym names, or use xev(1).
header file for a list of Keysym names, or use xev(1).
To map a key to a button click, use the fake Keysyms
To map a key to a button click, use the fake Keysyms
"
Button1
", ..., etc. E.g: "
-
remap
Super_R
-
Button2
"
"
Button1
", ..., etc. E.g: "
-
remap
Super_R
-
Button2
"
(useful for pasting on a laptop)
(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
To disable a keysym (i.e. make it so it will not be
injected), remap it to "
NoSymbol
" or "
None
".
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.
...
@@ -66,7 +66,7 @@ so, delete this exception statement from your version.
* without using SSH or SSL.
* 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.
* All rights reserved.
*
*
* This is free software; you can redistribute it and/or modify
* This is free software; you can redistribute it and/or modify
...
@@ -81,7 +81,17 @@ so, delete this exception statement from your version.
...
@@ -81,7 +81,17 @@ so, delete this exception statement from your version.
* You should have received a copy of the GNU General Public License
* You should have received a copy of the GNU General Public License
* along with this software; if not, write to the Free Software
* along with this software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* 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) {
...
@@ -2683,10 +2683,26 @@ void print_help(int mode) {
"
\"
string
\"
exists, it is instead interpreted as this
\n
"
"
\"
string
\"
exists, it is instead interpreted as this
\n
"
" form: key1-key2,key3-key4,... See <X11/keysymdef.h>
\n
"
" form: key1-key2,key3-key4,... See <X11/keysymdef.h>
\n
"
" header file for a list of Keysym names, or use xev(1).
\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
"
" To map a key to a button click, use the fake Keysyms
\n
"
"
\"
Button1
\"
, ..., etc. E.g:
\"
-remap Super_R-Button2
\"\n
"
"
\"
Button1
\"
, ..., etc. E.g:
\"
-remap Super_R-Button2
\"\n
"
" (useful for pasting on a laptop)
\n
"
" (useful for pasting on a laptop)
\n
"
"
\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
"
" To disable a keysym (i.e. make it so it will not be
\n
"
" injected), remap it to
\"
NoSymbol
\"
or
\"
None
\"
.
\n
"
" injected), remap it to
\"
NoSymbol
\"
or
\"
None
\"
.
\n
"
"
\n
"
"
\n
"
...
@@ -5432,7 +5448,7 @@ void print_license(void) {
...
@@ -5432,7 +5448,7 @@ void print_license(void) {
"
\n
"
"
\n
"
"x11vnc: a VNC server for X displays. %s
\n
"
"x11vnc: a VNC server for X displays. %s
\n
"
"
\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
"
"All rights reserved.
\n
"
"
\n
"
"
\n
"
;
;
...
...
x11vnc/keyboard.c
View file @
128ee3ec
...
@@ -2860,6 +2860,8 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
...
@@ -2860,6 +2860,8 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if
(
isbutton
)
{
if
(
isbutton
)
{
int
mask
,
button
=
(
int
)
keysym
;
int
mask
,
button
=
(
int
)
keysym
;
int
x
=
cursor_x
,
y
=
cursor_y
;
int
x
=
cursor_x
,
y
=
cursor_y
;
char
*
b
,
bstr
[
32
];
if
(
!
down
)
{
if
(
!
down
)
{
return
;
return
;
}
}
...
@@ -2874,10 +2876,23 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
...
@@ -2874,10 +2876,23 @@ static void pipe_keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
* remap the button click to keystroke sequences!
* remap the button click to keystroke sequences!
* Usually just will simulate the button click.
* Usually just will simulate the button click.
*/
*/
mask
=
1
<<
(
button
-
1
);
pointer
(
mask
,
x
,
y
,
client
);
/* loop over possible multiclicks: Button123 */
mask
=
0
;
sprintf
(
bstr
,
"%d"
,
button
);
pointer
(
mask
,
x
,
y
,
client
);
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
;
return
;
}
}
...
@@ -3302,6 +3317,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
...
@@ -3302,6 +3317,8 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
if
(
isbutton
)
{
if
(
isbutton
)
{
int
mask
,
button
=
(
int
)
keysym
;
int
mask
,
button
=
(
int
)
keysym
;
char
*
b
,
bstr
[
32
];
if
(
!
down
)
{
if
(
!
down
)
{
return
;
/* nothing to send */
return
;
/* nothing to send */
}
}
...
@@ -3317,10 +3334,23 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
...
@@ -3317,10 +3334,23 @@ void keyboard(rfbBool down, rfbKeySym keysym, rfbClientPtr client) {
* remap the button click to keystroke sequences!
* remap the button click to keystroke sequences!
* Usually just will simulate the button click.
* Usually just will simulate the button click.
*/
*/
mask
=
1
<<
(
button
-
1
);
do_button_mask_change
(
mask
,
button
);
/* down */
/* loop over possible multiclicks: Button123 */
mask
=
0
;
sprintf
(
bstr
,
"%d"
,
button
);
do_button_mask_change
(
mask
,
button
);
/* up */
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
);
XFlush_wr
(
dpy
);
X_UNLOCK
;
X_UNLOCK
;
return
;
return
;
...
...
x11vnc/util.c
View file @
128ee3ec
...
@@ -568,7 +568,18 @@ void rfbCFD(long usec) {
...
@@ -568,7 +568,18 @@ void rfbCFD(long usec) {
return
;
return
;
}
}
if
(
unixpw
&&
unixpw_in_progress
&&
!
unixpw_in_rfbPE
)
{
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
;
return
;
}
}
if
(
usec
>
USEC_MAX
)
{
if
(
usec
>
USEC_MAX
)
{
...
...
x11vnc/x11vnc.1
View file @
128ee3ec
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "March 2009" "x11vnc " "User Commands"
.TH X11VNC "1" "March 2009" "x11vnc " "User Commands"
.SH NAME
.SH NAME
x11vnc - allow VNC connections to real X11 displays
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
.SH SYNOPSIS
.B x11vnc
.B x11vnc
[OPTION]...
[OPTION]...
...
@@ -3048,10 +3048,26 @@ or hex value) separated by a space. If no file named
...
@@ -3048,10 +3048,26 @@ or hex value) separated by a space. If no file named
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
form: key1-key2,key3-key4,... See <X11/keysymdef.h>
header file for a list of Keysym names, or use
header file for a list of Keysym names, or use
.IR xev (1).
.IR xev (1).
.IP
To map a key to a button click, use the fake Keysyms
To map a key to a button click, use the fake Keysyms
"Button1", ..., etc. E.g: "\fB-remap\fR \fISuper_R-Button2\fR"
"Button1", ..., etc. E.g: "\fB-remap\fR \fISuper_R-Button2\fR"
(useful for pasting on a laptop)
(useful for pasting on a laptop)
.IP
.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
To disable a keysym (i.e. make it so it will not be
injected), remap it to "NoSymbol" or "None".
injected), remap it to "NoSymbol" or "None".
.IP
.IP
...
...
x11vnc/x11vnc.c
View file @
128ee3ec
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
/*
/*
* This program is based on some ideas from the following programs:
* 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)
* x0rfbserver, the original native X vnc server (Jens Wagner)
* krfb, the KDE desktopsharing project (Tim Jansen)
* krfb, the KDE desktopsharing project (Tim Jansen)
*
*
...
...
x11vnc/x11vnc_defs.c
View file @
128ee3ec
...
@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
...
@@ -47,7 +47,7 @@ int xtrap_base_event_type = 0;
int
xdamage_base_event_type
=
0
;
int
xdamage_base_event_type
=
0
;
/* date +'lastmod: %Y-%m-%d' */
/* 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 */
/* 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