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
f1e8149a
Commit
f1e8149a
authored
Feb 16, 2007
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: tightvnc filetransfer off by default. FINDCREATEDISPLAY geometry.
parent
241f3ed5
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
1721 additions
and
1469 deletions
+1721
-1469
ChangeLog
x11vnc/ChangeLog
+4
-0
README
x11vnc/README
+1469
-1403
avahi.c
x11vnc/avahi.c
+62
-7
connections.c
x11vnc/connections.c
+3
-3
help.c
x11vnc/help.c
+27
-10
options.c
x11vnc/options.c
+4
-3
options.h
x11vnc/options.h
+2
-1
remote.c
x11vnc/remote.c
+27
-12
screen.c
x11vnc/screen.c
+1
-0
ssltools.h
x11vnc/ssltools.h
+12
-0
tkx11vnc
x11vnc/tkx11vnc
+1
-0
tkx11vnc.h
x11vnc/tkx11vnc.h
+1
-0
unixpw.c
x11vnc/unixpw.c
+2
-2
user.c
x11vnc/user.c
+49
-3
x11vnc.1
x11vnc/x11vnc.1
+33
-12
x11vnc.c
x11vnc/x11vnc.c
+12
-11
x11vnc.h
x11vnc/x11vnc.h
+1
-1
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+1
-1
xevents.c
x11vnc/xevents.c
+10
-0
No files found.
x11vnc/ChangeLog
View file @
f1e8149a
2007-02-15 Karl Runge <runge@karlrunge.com>
* x11vnc: tightvnc filetransfer off by default. avahi
fixes. FINDCREATEDISPLAY geometry. -noultraext.
2007-02-12 Karl Runge <runge@karlrunge.com>
* x11vnc: add avahi (aka mDNS/Zeroconf/Bonjour...)
support thanks to Diego Petten. -avahi/-mdns.
...
...
x11vnc/README
View file @
f1e8149a
This diff is collapsed.
Click to expand it.
x11vnc/avahi.c
View file @
f1e8149a
...
...
@@ -34,12 +34,36 @@ static AvahiEntryGroup *_group = NULL;
static
int
db
=
0
;
typedef
struct
{
const
char
*
name
;
const
char
*
host
;
uint16_t
port
;
}
avahi_service_t
;
typedef
struct
{
char
*
name
;
char
*
host
;
uint16_t
port
;
}
avahi_reg_t
;
#define NREG 16
static
avahi_reg_t
registered
[
NREG
];
void
avahi_initialise
(
void
)
{
int
ret
;
static
int
first
=
1
;
if
(
getenv
(
"AVAHI_DEBUG"
))
{
db
=
1
;
}
if
(
first
)
{
int
i
;
for
(
i
=
0
;
i
<
NREG
;
i
++
)
{
registered
[
i
].
name
=
NULL
;
registered
[
i
].
host
=
NULL
;
}
first
=
0
;
}
if
(
db
)
fprintf
(
stderr
,
"in avahi_initialise
\n
"
);
if
(
_poll
)
{
...
...
@@ -74,12 +98,6 @@ if (db) fprintf(stderr, " avahi_initialise: poll not null\n");
if
(
db
)
fprintf
(
stderr
,
"out avahi_initialise
\n
"
);
}
typedef
struct
{
const
char
*
name
;
const
char
*
host
;
uint16_t
port
;
}
avahi_service_t
;
static
void
_avahi_create_services
(
const
char
*
name
,
const
char
*
host
,
const
uint16_t
port
);
...
...
@@ -159,7 +177,8 @@ if (db) fprintf(stderr, "out _avahi_create_services\n");
}
void
avahi_advertise
(
const
char
*
name
,
const
char
*
host
,
const
uint16_t
port
)
{
if
(
db
)
fprintf
(
stderr
,
"in avahi_advertise
\n
"
);
int
i
;
if
(
db
)
fprintf
(
stderr
,
"in avahi_advertise: %s %s %d
\n
"
,
name
,
host
,
port
);
if
(
!
_client
)
{
if
(
db
)
fprintf
(
stderr
,
" avahi_advertise client null
\n
"
);
return
;
...
...
@@ -168,6 +187,31 @@ if (db) fprintf(stderr, " avahi_advertise client null\n");
rfbLog
(
"Avahi poll not initialized.
\n
"
);
return
;
}
/* well, we just track it ourselves... */
for
(
i
=
0
;
i
<
NREG
;
i
++
)
{
if
(
!
registered
[
i
].
name
)
{
continue
;
}
if
(
strcmp
(
registered
[
i
].
name
,
name
))
{
continue
;
}
if
(
strcmp
(
registered
[
i
].
host
,
host
))
{
continue
;
}
if
(
registered
[
i
].
port
!=
port
)
{
continue
;
}
if
(
db
)
fprintf
(
stderr
,
" avahi_advertise already did this one
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
NREG
;
i
++
)
{
if
(
!
registered
[
i
].
name
)
{
registered
[
i
].
name
=
strdup
(
name
);
registered
[
i
].
host
=
strdup
(
host
);
registered
[
i
].
port
=
port
;
break
;
}
}
avahi_threaded_poll_lock
(
_poll
);
_avahi_create_services
(
name
,
host
,
port
>=
5900
?
port
:
5900
+
port
);
...
...
@@ -176,7 +220,18 @@ if (db) fprintf(stderr, "out avahi_advertise\n");
}
void
avahi_reset
(
void
)
{
int
i
;
if
(
db
)
fprintf
(
stderr
,
"in avahi_reset
\n
"
);
for
(
i
=
0
;
i
<
NREG
;
i
++
)
{
if
(
registered
[
i
].
name
)
{
free
(
registered
[
i
].
name
);
registered
[
i
].
name
=
NULL
;
}
if
(
registered
[
i
].
host
)
{
free
(
registered
[
i
].
host
);
registered
[
i
].
host
=
NULL
;
}
}
if
(
!
_client
||
!
_group
)
{
if
(
db
)
fprintf
(
stderr
,
" avahi_reset client/group null
\n
"
);
return
;
...
...
x11vnc/connections.c
View file @
f1e8149a
...
...
@@ -658,7 +658,7 @@ void client_gone(rfbClientPtr client) {
if
(
client
==
unixpw_client
)
{
unixpw_in_progress
=
0
;
screen
->
permitFileTransfer
=
unixpw_file_xfer_save
;
if
((
filexfer
=
unixpw_tightvnc_xfer_save
))
{
if
((
tight
filexfer
=
unixpw_tightvnc_xfer_save
))
{
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
rfbRegisterTightVNCFileTransferExtension
();
#endif
...
...
@@ -2164,8 +2164,8 @@ enum rfbNewClientAction new_client(rfbClientPtr client) {
unixpw_file_xfer_save
=
screen
->
permitFileTransfer
;
screen
->
permitFileTransfer
=
FALSE
;
unixpw_tightvnc_xfer_save
=
filexfer
;
filexfer
=
0
;
unixpw_tightvnc_xfer_save
=
tight
filexfer
;
tight
filexfer
=
0
;
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
rfbUnregisterTightVNCFileTransferExtension
();
#endif
...
...
x11vnc/help.c
View file @
f1e8149a
...
...
@@ -346,13 +346,13 @@ void print_help(int mode) {
" will cause it to abort. Specifying both -inetd and -q
\n
"
" and no -o will automatically close the stderr.
\n
"
"
\n
"
"-
nofilexfer Disable the TightVNC file transfer extension. (same as
\n
"
"
-disablefiletransfer). Note that when the -viewonly
\n
"
"
option is supplied all file transfers are disabled.
\n
"
"
Also clients that log in viewonly cannot transfer files.
\n
"
"
However, if the remote control mechanism is used to
\n
"
"
change the global or per-client viewonly state the
\n
"
"
filetransfer permissions
will NOT change.
\n
"
"-
tightfilexfer Enable the TightVNC file transfer extension. Note that
\n
"
"
that when the -viewonly option is supplied all file
\n
"
"
transfers are disabled. Also clients that log in
\n
"
"
viewonly cannot transfer files. However, if the remote
\n
"
"
control mechanism is used to change the global or
\n
"
"
per-client viewonly state the filetransfer permissions
\n
"
" will NOT change.
\n
"
"
\n
"
"-ultrafilexfer Note, to *enable* UltraVNC filetransfer (currently
\n
"
" disabled by default, this may change...) and to get it
\n
"
...
...
@@ -360,6 +360,11 @@ void print_help(int mode) {
" options:
\"
-rfbversion 3.6 -permitfiletransfer
\"\n
"
"
\"
-ultrafilexfer
\"
is an alias for this combination.
\n
"
"
\n
"
" Note that sadly you cannot do both -tightfilexfer and
\n
"
" -ultrafilexfer at the same time because the latter
\n
"
" requires setting the version to 3.6 and tightvnc will
\n
"
" not do filetransfer at that version number.
\n
"
"
\n
"
"-http Instead of using -httpdir (see below) to specify
\n
"
" where the Java vncviewer applet is, have x11vnc try
\n
"
" to *guess* where the directory is by looking relative
\n
"
...
...
@@ -798,6 +803,12 @@ void print_help(int mode) {
" your long
\"
login:
\"
line press the Up arrow once
\n
"
" (before typing anything else).
\n
"
"
\n
"
" Another option is
\"
geom=WxH
\"
or
\"
geom=WxHxD
\"\n
"
" (or ge=). This only has an effect in FINDCREATEDISPLAY
\n
"
" mode when a virtual X server such as Xvfb is going to
\n
"
" be created. It sets the width and height of the new
\n
"
" display, and optionally the color depth as well.
\n
"
"
\n
"
" To disable the option setting set the environment
\n
"
" variable X11VNC_NO_UNIXPW_OPTS=1 before starting x11vnc.
\n
"
" To set any other options, the user can use the gui
\n
"
...
...
@@ -871,7 +882,7 @@ void print_help(int mode) {
" definitely getting a desktop (either real or virtual)
\n
"
" on the machine. E.g. a desktop service:
\n
"
"
\n
"
" 59
15
stream tcp nowait root /usr/sbin/tcpd /.../x11vnc
\n
"
" 59
00
stream tcp nowait root /usr/sbin/tcpd /.../x11vnc
\n
"
" -inetd -q -http -ssl SAVE -unixpw -users unixpw=
\\\n
"
" -passwd secret -prog /.../x11vnc
\\\n
"
" -display WAIT:cmd=FINDCREATEDISPLAY
\n
"
...
...
@@ -2734,6 +2745,10 @@ void print_help(int mode) {
" monitor in dpms powered off state. Use this option to
\n
"
" skip powering off the monitor.
\n
"
"
\n
"
"-noultraext Disable the following UltraVNC extensions: SingleWindow
\n
"
" and ServerInput. The others managed by libvncserver
\n
"
" (textchat, 1/n scaling, rfbEncodingUltra) are not.
\n
"
"
\n
"
"-noxdamage Do not use the X DAMAGE extension to detect framebuffer
\n
"
" changes even if it is available. Use -xdamage if your
\n
"
" default is to have it off.
\n
"
...
...
@@ -3386,8 +3401,8 @@ void print_help(int mode) {
" timeout:n reset -timeout to n, if there are
\n
"
" currently no clients, exit unless one
\n
"
" connects in the next n secs.
\n
"
" filexfer enable filetransfer for new clients.
\n
"
" nofilexfer disable filetransfer for new clients.
\n
"
"
tight
filexfer enable filetransfer for new clients.
\n
"
" no
tight
filexfer disable filetransfer for new clients.
\n
"
/* access */
" http enable http client connections.
\n
"
" nohttp disable http client connections.
\n
"
...
...
@@ -3600,6 +3615,8 @@ void print_help(int mode) {
" noclientdpms disable -clientdpms mode.
\n
"
" noserverdpms enable -noserverdpms mode.
\n
"
" serverdpms disable -noserverdpms mode.
\n
"
" noultraext enable -noultraext mode.
\n
"
" ultraext disable -noultraext mode.
\n
"
" xdamage enable xdamage polling hints.
\n
"
" noxdamage disable xdamage polling hints.
\n
"
" xd_area:A set -xd_area max pixel area to
\"
A
\"\n
"
...
...
x11vnc/options.c
View file @
f1e8149a
...
...
@@ -100,10 +100,10 @@ char *viewonly_passwd = NULL; /* view only passwd. */
char
**
passwd_list
=
NULL
;
/* for -passwdfile */
int
begin_viewonly
=
-
1
;
int
inetd
=
0
;
/* spawned from inetd(8) */
#ifndef FILEXFER
#define
FILEXFER 1
#ifndef
TIGHT
FILEXFER
#define
TIGHTFILEXFER 0
#endif
int
filexfer
=
FILEXFER
;
int
tightfilexfer
=
TIGHT
FILEXFER
;
int
first_conn_timeout
=
0
;
/* -timeout */
int
flash_cmap
=
0
;
/* follow installed colormaps */
int
shift_cmap
=
0
;
/* ncells < 256 and needs shift of pixel values */
...
...
@@ -364,6 +364,7 @@ int watch_dpms = 0; /* -dpms */
int
force_dpms
=
0
;
int
client_dpms
=
0
;
int
no_ultra_dpms
=
0
;
int
no_ultra_ext
=
0
;
int
watch_selection
=
1
;
/* normal selection/cutbuffer maintenance */
int
watch_primary
=
1
;
/* more dicey, poll for changes in PRIMARY */
...
...
x11vnc/options.h
View file @
f1e8149a
...
...
@@ -78,7 +78,7 @@ extern char *viewonly_passwd;
extern
char
**
passwd_list
;
extern
int
begin_viewonly
;
extern
int
inetd
;
extern
int
filexfer
;
extern
int
tight
filexfer
;
extern
int
first_conn_timeout
;
extern
int
flash_cmap
;
extern
int
shift_cmap
;
...
...
@@ -266,6 +266,7 @@ extern int watch_dpms;
extern
int
force_dpms
;
extern
int
client_dpms
;
extern
int
no_ultra_dpms
;
extern
int
no_ultra_ext
;
extern
int
watch_selection
;
extern
int
watch_primary
;
...
...
x11vnc/remote.c
View file @
f1e8149a
...
...
@@ -1265,34 +1265,34 @@ char *process_remote_cmd(char *cmd, int stringonly) {
first_conn_timeout
=
to
;
rfbLog
(
"remote_cmd: set -timeout to %d
\n
"
,
-
to
);
}
else
if
(
!
strcmp
(
p
,
"filexfer"
))
{
}
else
if
(
!
strcmp
(
p
,
"
tight
filexfer"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
filexfer
);
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
tight
filexfer
);
goto
qry
;
}
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
if
(
!
filexfer
)
{
rfbLog
(
"remote_cmd: enabling -filexfer for new clients.
\n
"
);
filexfer
=
1
;
if
(
!
tight
filexfer
)
{
rfbLog
(
"remote_cmd: enabling -
tight
filexfer for new clients.
\n
"
);
tight
filexfer
=
1
;
rfbRegisterTightVNCFileTransferExtension
();
}
#else
rfbLog
(
"remote_cmd: -filexfer not supported in this binary.
\n
"
);
rfbLog
(
"remote_cmd: -
tight
filexfer not supported in this binary.
\n
"
);
#endif
}
else
if
(
!
strcmp
(
p
,
"nofilexfer"
))
{
}
else
if
(
!
strcmp
(
p
,
"no
tight
filexfer"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!
filexfer
);
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!
tight
filexfer
);
goto
qry
;
}
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
if
(
filexfer
)
{
rfbLog
(
"remote_cmd: disabling -filexfer for new clients.
\n
"
);
filexfer
=
0
;
if
(
tight
filexfer
)
{
rfbLog
(
"remote_cmd: disabling -
tight
filexfer for new clients.
\n
"
);
tight
filexfer
=
0
;
rfbUnregisterTightVNCFileTransferExtension
();
}
#else
rfbLog
(
"remote_cmd: -filexfer not supported in this binary.
\n
"
);
rfbLog
(
"remote_cmd: -
tight
filexfer not supported in this binary.
\n
"
);
#endif
}
else
if
(
!
strcmp
(
p
,
"deny"
)
||
!
strcmp
(
p
,
"lock"
))
{
...
...
@@ -3689,6 +3689,21 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog
(
"remote_cmd: turning off -noserverdpms mode.
\n
"
);
no_ultra_dpms
=
0
;
}
else
if
(
!
strcmp
(
p
,
"noultraext"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
no_ultra_ext
);
goto
qry
;
}
rfbLog
(
"remote_cmd: turning on -noultraext mode.
\n
"
);
no_ultra_ext
=
1
;
}
else
if
(
!
strcmp
(
p
,
"ultraext"
))
{
if
(
query
)
{
snprintf
(
buf
,
bufn
,
"ans=%s:%d"
,
p
,
!
no_ultra_ext
);
goto
qry
;
}
rfbLog
(
"remote_cmd: turning off -noultraext mode.
\n
"
);
no_ultra_ext
=
0
;
}
else
if
(
strstr
(
p
,
"fs"
)
==
p
)
{
COLON_CHECK
(
"fs:"
)
if
(
query
)
{
...
...
x11vnc/screen.c
View file @
f1e8149a
...
...
@@ -2477,6 +2477,7 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
rfbLog
(
"
\n
"
);
rfbLog
(
"removed: -hints, -nohints
\n
"
);
rfbLog
(
"removed: -cursorposall
\n
"
);
rfbLog
(
"removed: -nofilexfer, now the default.
\n
"
);
rfbLog
(
"
\n
"
);
rfbLog
(
"renamed: -old_copytile, use -onetile
\n
"
);
rfbLog
(
"renamed: -mouse, use -cursor
\n
"
);
...
...
x11vnc/ssltools.h
View file @
f1e8149a
...
...
@@ -1234,6 +1234,18 @@ char create_display[] =
"depth=${depth:-16}
\n
"
"geom=${geom:-1280x1024}
\n
"
"
\n
"
"if [
\"
X$FD_GEOM
\"
!=
\"
X
\"
-a
\"
X$FD_GEOM
\"
!=
\"
XNONE
\"
]; then
\n
"
" x1=`echo
\"
$FD_GEOM
\"
| awk -Fx '{print $1}'`
\n
"
" y1=`echo
\"
$FD_GEOM
\"
| awk -Fx '{print $2}'`
\n
"
" d1=`echo
\"
$FD_GEOM
\"
| awk -Fx '{print $3}'`
\n
"
" if [
\"
X$x1
\"
!=
\"
X
\"
-a
\"
X$y1
\"
!=
\"
X
\"
]; then
\n
"
" geom=
\"
${x1}x${y1}
\"\n
"
" fi
\n
"
" if [
\"
X$d1
\"
!=
\"
X
\"
]; then
\n
"
" depth=
\"
${d1}
\"\n
"
" fi
\n
"
"fi
\n
"
"
\n
"
"if [
\"
X$USER
\"
=
\"
X
\"
]; then
\n
"
" USER=$LOGNAME
\n
"
"fi
\n
"
...
...
x11vnc/tkx11vnc
View file @
f1e8149a
...
...
@@ -337,6 +337,7 @@ Permissions
forcedpms
clientdpms
noserverdpms
noultraext
=GAL LOFF
Tuning
...
...
x11vnc/tkx11vnc.h
View file @
f1e8149a
...
...
@@ -348,6 +348,7 @@ char gui_code[] = "";
" forcedpms
\n
"
" clientdpms
\n
"
" noserverdpms
\n
"
" noultraext
\n
"
" =GAL LOFF
\n
"
"
\n
"
"Tuning
\n
"
...
...
x11vnc/unixpw.c
View file @
f1e8149a
...
...
@@ -1553,7 +1553,7 @@ void unixpw_accept(char *user) {
}
unixpw_in_progress
=
0
;
screen
->
permitFileTransfer
=
unixpw_file_xfer_save
;
if
((
filexfer
=
unixpw_tightvnc_xfer_save
))
{
if
((
tight
filexfer
=
unixpw_tightvnc_xfer_save
))
{
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
rfbRegisterTightVNCFileTransferExtension
();
#endif
...
...
@@ -1599,7 +1599,7 @@ void unixpw_deny(void) {
unixpw_in_progress
=
0
;
screen
->
permitFileTransfer
=
unixpw_file_xfer_save
;
if
((
filexfer
=
unixpw_tightvnc_xfer_save
))
{
if
((
tight
filexfer
=
unixpw_tightvnc_xfer_save
))
{
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
rfbRegisterTightVNCFileTransferExtension
();
#endif
...
...
x11vnc/user.c
View file @
f1e8149a
...
...
@@ -1112,6 +1112,7 @@ void user_supplied_opts(char *opts) {
"clear_mods"
,
"cm"
,
"clear_keys"
,
"ck"
,
"repeat"
,
"speeds"
,
"sp"
,
"readtimeout"
,
"rd"
,
"rotate"
,
"ro"
,
"geometry"
,
"geom"
,
"ge"
,
NULL
};
...
...
@@ -1489,6 +1490,7 @@ if (0) db = 1;
if
(
strstr
(
cmd
,
"FINDCREATEDISPLAY"
)
==
cmd
)
{
char
*
opts
=
strchr
(
cmd
,
'-'
);
char
st
[]
=
""
;
char
geom
[
32
];
if
(
opts
)
{
opts
++
;
if
(
strstr
(
opts
,
"xdmcp"
))
{
...
...
@@ -1497,12 +1499,56 @@ if (0) db = 1;
}
else
{
opts
=
st
;
}
sprintf
(
geom
,
"NONE"
);
#if 0
if (!keep_unixpw_opts) {
fprintf(stderr, "no keep_unixpw_opts\n");
} else {
fprintf(stderr, "keep_unixpw_opts: %s\n", keep_unixpw_opts);
}
#endif
if
(
unixpw
&&
keep_unixpw_opts
&&
keep_unixpw_opts
[
0
]
!=
'\0'
)
{
char
*
q
,
*
p
,
*
t
=
strdup
(
keep_unixpw_opts
);
q
=
strstr
(
t
,
"ge="
);
if
(
!
q
)
q
=
strstr
(
t
,
"geom="
);
if
(
!
q
)
q
=
strstr
(
t
,
"geometry="
);
if
(
q
)
{
int
ok
=
1
;
q
=
strstr
(
q
,
"="
);
q
++
;
p
=
strstr
(
q
,
","
);
if
(
p
)
*
p
=
'\0'
;
p
=
q
;
while
(
*
p
)
{
if
(
*
p
==
'x'
)
{
;
}
else
if
(
isdigit
((
int
)
*
p
))
{
;
}
else
{
ok
=
0
;
break
;
}
p
++
;
}
if
(
ok
&&
strlen
(
q
)
<
32
)
{
sprintf
(
geom
,
q
);
if
(
!
quiet
)
{
rfbLog
(
"set create display geom: %s
\n
"
,
geom
);
}
}
}
free
(
t
);
}
set_env
(
"FD_GEOM"
,
geom
);
if
(
unixpw
&&
keep_unixpw_user
)
{
create_cmd
=
(
char
*
)
malloc
(
strlen
(
tmp
)
+
strlen
(
"env USER='' /bin/sh "
)
+
strlen
(
keep_unixpw_user
)
+
1
+
strlen
(
opts
)
+
1
);
sprintf
(
create_cmd
,
"env USER='%s' /bin/sh %s %s"
,
keep_unixpw_user
,
tmp
,
opts
);
+
strlen
(
"env FD_GEOM='' /bin/sh "
)
+
strlen
(
keep_unixpw_user
)
+
1
+
strlen
(
geom
)
+
1
+
strlen
(
opts
)
+
1
);
sprintf
(
create_cmd
,
"env USER='%s' FD_GEOM='%s' /bin/sh %s %s"
,
keep_unixpw_user
,
geom
,
tmp
,
opts
);
}
else
{
create_cmd
=
(
char
*
)
malloc
(
strlen
(
tmp
)
+
strlen
(
"/bin/sh "
)
+
1
+
strlen
(
opts
)
+
1
);
...
...
x11vnc/x11vnc.1
View file @
f1e8149a
...
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "February 2007" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.8.5, lastmod: 2007-02-1
2
version: 0.8.5, lastmod: 2007-02-1
5
.SH SYNOPSIS
.B x11vnc
[OPTION]...
...
...
@@ -405,15 +405,15 @@ option, otherwise the stderr goes to the viewer which
will cause it to abort. Specifying both \fB-inetd\fR and \fB-q\fR
and no \fB-o\fR will automatically close the stderr.
.PP
\fB-
no
filexfer\fR
\fB-
tight
filexfer\fR
.IP
Disable the TightVNC file transfer extension. (same as
\fB-disablefiletransfer).\fR Note that when the \fB-viewonly\fR
option is supplied all file transfers are disabled.
Also clients that log in viewonly cannot transfer files.
However, if the remote control mechanism is used to
change the global or per-client viewonly state the
filetransfer permissions
will NOT change.
Enable the TightVNC file transfer extension. Note that
that when the \fB-viewonly\fR option is supplied all file
transfers are disabled. Also clients that log in
viewonly cannot transfer files. However, if the remote
control mechanism is used to change the global or
per-client viewonly state the filetransfer permissions
will NOT change.
.PP
\fB-ultrafilexfer\fR
.IP
...
...
@@ -422,6 +422,11 @@ disabled by default, this may change...) and to get it
to work you probably need to supply these libvncserver
options: "\fB-rfbversion\fR \fI3.6 \fB-permitfiletransfer\fR"\fR
"\fB-ultrafilexfer\fR" is an alias for this combination.
.IP
Note that sadly you cannot do both \fB-tightfilexfer\fR and
\fB-ultrafilexfer\fR at the same time because the latter
requires setting the version to 3.6 and tightvnc will
not do filetransfer at that version number.
.PP
\fB-http\fR
.IP
...
...
@@ -945,6 +950,12 @@ type and enter your password incorrectly, to retrieve
your long "login:" line press the Up arrow once
(before typing anything else).
.IP
Another option is "geom=WxH" or "geom=WxHxD"
(or ge=). This only has an effect in FINDCREATEDISPLAY
mode when a virtual X server such as Xvfb is going to
be created. It sets the width and height of the new
display, and optionally the color depth as well.
.IP
To disable the option setting set the environment
variable X11VNC_NO_UNIXPW_OPTS=1 before starting x11vnc.
To set any other options, the user can use the gui
...
...
@@ -1022,7 +1033,7 @@ to provide a means of
definitely getting a desktop (either real or virtual)
on the machine. E.g. a desktop service:
.IP
59
15
stream tcp nowait root /usr/sbin/tcpd /.../x11vnc
59
00
stream tcp nowait root /usr/sbin/tcpd /.../x11vnc
\fB-inetd\fR \fB-q\fR \fB-http\fR \fB-ssl\fR SAVE \fB-unixpw\fR \fB-users\fR unixpw=\\
\fB-passwd\fR secret \fB-prog\fR /.../x11vnc \\
\fB-display\fR WAIT:cmd=FINDCREATEDISPLAY
...
...
@@ -3223,6 +3234,12 @@ and mouse input at the physical display and put the
monitor in dpms powered off state. Use this option to
skip powering off the monitor.
.PP
\fB-noultraext\fR
.IP
Disable the following UltraVNC extensions: SingleWindow
and ServerInput. The others managed by libvncserver
(textchat, 1/n scaling, rfbEncodingUltra) are not.
.PP
\fB-noxdamage\fR
.IP
Do not use the X DAMAGE extension to detect framebuffer
...
...
@@ -3992,9 +4009,9 @@ timeout:n reset \fB-timeout\fR to n, if there are
currently no clients, exit unless one
connects in the next n secs.
.IP
filexfer enable filetransfer for new clients.
tight
filexfer enable filetransfer for new clients.
.IP
nofilexfer disable filetransfer for new clients.
no
tight
filexfer disable filetransfer for new clients.
.IP
http enable http client connections.
.IP
...
...
@@ -4375,6 +4392,10 @@ noserverdpms enable \fB-noserverdpms\fR mode.
.IP
serverdpms disable \fB-noserverdpms\fR mode.
.IP
noultraext enable \fB-noultraext\fR mode.
.IP
ultraext disable \fB-noultraext\fR mode.
.IP
xdamage enable xdamage polling hints.
.IP
noxdamage disable xdamage polling hints.
...
...
x11vnc/x11vnc.c
View file @
f1e8149a
...
...
@@ -1126,7 +1126,7 @@ static void print_settings(int try_http, int bg, char *gui_str) {
fprintf
(
stderr
,
" conn_once: %d
\n
"
,
connect_once
);
fprintf
(
stderr
,
" timeout: %d
\n
"
,
first_conn_timeout
);
fprintf
(
stderr
,
" inetd: %d
\n
"
,
inetd
);
fprintf
(
stderr
,
"
filexfer: %d
\n
"
,
filexfer
);
fprintf
(
stderr
,
"
tightfilexfer: %d
\n
"
,
tight
filexfer
);
fprintf
(
stderr
,
" http: %d
\n
"
,
try_http
);
fprintf
(
stderr
,
" connect: %s
\n
"
,
client_connect
?
client_connect
:
"null"
);
...
...
@@ -1768,10 +1768,10 @@ int main(int argc, char* argv[]) {
users_list
=
strdup
(
argv
[
++
i
]);
}
else
if
(
!
strcmp
(
arg
,
"-inetd"
))
{
inetd
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-nofilexfer"
))
{
filexfer
=
0
;
}
else
if
(
!
strcmp
(
arg
,
"-filexfer"
))
{
filexfer
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-no
tight
filexfer"
))
{
tight
filexfer
=
0
;
}
else
if
(
!
strcmp
(
arg
,
"-
tight
filexfer"
))
{
tight
filexfer
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-http"
))
{
try_http
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-http_ssl"
))
{
...
...
@@ -2386,6 +2386,8 @@ int main(int argc, char* argv[]) {
client_dpms
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-noserverdpms"
))
{
no_ultra_dpms
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-noultraext"
))
{
no_ultra_ext
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-xdamage"
))
{
use_xdamage
++
;
}
else
if
(
!
strcmp
(
arg
,
"-noxdamage"
))
{
...
...
@@ -2586,8 +2588,7 @@ int main(int argc, char* argv[]) {
listen_str
=
strdup
(
argv
[
i
+
1
]);
}
/* otherwise copy it for libvncserver use below. */
if
(
!
strcmp
(
arg
,
"-ultrafilexfer"
)
||
!
strcmp
(
arg
,
"-ultravncfilexfer"
))
{
if
(
!
strcmp
(
arg
,
"-ultrafilexfer"
))
{
if
(
argc_vnc
+
2
<
argc_vnc_max
)
{
argv_vnc
[
argc_vnc
++
]
=
strdup
(
"-rfbversion"
);
argv_vnc
[
argc_vnc
++
]
=
strdup
(
"3.6"
);
...
...
@@ -2998,12 +2999,12 @@ int main(int argc, char* argv[]) {
overlay
=
0
;
}
if
(
filexfer
&&
view_only
)
{
if
(
tight
filexfer
&&
view_only
)
{
if
(
!
quiet
)
{
rfbLog
(
"setting -nofilexfer in -viewonly mode.
\n
"
);
rfbLog
(
"setting -no
tight
filexfer in -viewonly mode.
\n
"
);
}
/* how to undo via -R? */
filexfer
=
0
;
tight
filexfer
=
0
;
}
if
(
inetd
)
{
...
...
@@ -3134,7 +3135,7 @@ int main(int argc, char* argv[]) {
#endif
#ifdef LIBVNCSERVER_WITH_TIGHTVNC_FILETRANSFER
if
(
filexfer
)
{
if
(
tight
filexfer
)
{
rfbRegisterTightVNCFileTransferExtension
();
}
else
{
rfbUnregisterTightVNCFileTransferExtension
();
...
...
x11vnc/x11vnc.h
View file @
f1e8149a
...
...
@@ -71,7 +71,7 @@
* -DREMOTE_DEFAULT=0 to disable remote-control on by default (-yesremote).
* -DREMOTE_CONTROL=0 to disable remote-control mechanism completely.
* -DEXTERNAL_COMMANDS=0 to disable the running of all external commands.
* -D
FILEXFER=0 disable
filexfer.
* -D
TIGHTFILEXFER=0 disable tight
filexfer.
*
* -DHARDWIRE_PASSWD=... hardwired passwords, quoting necessary.
* -DHARDWIRE_VIEWPASSWD=...
...
...
x11vnc/x11vnc_defs.c
View file @
f1e8149a
...
...
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int
xdamage_base_event_type
=
0
;
/* date +'lastmod: %Y-%m-%d' */
char
lastmod
[]
=
"0.8.5 lastmod: 2007-02-1
2
"
;
char
lastmod
[]
=
"0.8.5 lastmod: 2007-02-1
5
"
;
/* X display info */
...
...
x11vnc/xevents.c
View file @
f1e8149a
...
...
@@ -1290,6 +1290,9 @@ void kbd_release_all_keys(rfbClientPtr cl) {
void
set_single_window
(
rfbClientPtr
cl
,
int
x
,
int
y
)
{
int
ok
=
0
;
if
(
no_ultra_ext
)
{
return
;
}
if
(
unixpw_in_progress
)
{
rfbLog
(
"set_single_window: unixpw_in_progress, skipping.
\n
"
);
return
;
...
...
@@ -1333,6 +1336,9 @@ void set_single_window(rfbClientPtr cl, int x, int y) {
}
void
set_server_input
(
rfbClientPtr
cl
,
int
grab
)
{
if
(
no_ultra_ext
)
{
return
;
}
if
(
unixpw_in_progress
)
{
rfbLog
(
"set_server_input: unixpw_in_progress, skipping.
\n
"
);
return
;
...
...
@@ -1368,6 +1374,10 @@ void set_server_input(rfbClientPtr cl, int grab) {
}
void
set_text_chat
(
rfbClientPtr
cl
,
int
len
,
char
*
txt
)
{
char
buf
[
100
];
if
(
no_ultra_ext
)
{
return
;
}
rfbLog
(
"set_text_chat: len=0x%x txt='"
,
len
);
if
(
0
<
len
&&
len
<
10000
)
write
(
2
,
txt
,
len
);
fprintf
(
stderr
,
"'
\n
"
);
...
...
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