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
1c7ca906
Commit
1c7ca906
authored
Apr 28, 2004
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: add -auth, more -cursorpos and -nofb work
parent
7c1c81ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
37 deletions
+165
-37
ChangeLog
ChangeLog
+3
-0
ChangeLog
contrib/ChangeLog
+6
-0
x11vnc.c
contrib/x11vnc.c
+156
-37
No files found.
ChangeLog
View file @
1c7ca906
2004-03-28 Karl Runge <runge@karlrunge.com>
* x11vnc: -auth, more -cursopor and -nofb work
2004-03-19 Karl Runge <runge@karlrunge.com>
2004-03-19 Karl Runge <runge@karlrunge.com>
* x11vnc: -cursorpos, -sigpipe
* x11vnc: -cursorpos, -sigpipe
...
...
contrib/ChangeLog
View file @
1c7ca906
2004-04-28 Karl Runge <runge@karlrunge.com>
* -auth cmdline option for xauthority.
* decrease default deferupdate under -nofb.
* update_client_pointer() from Edoardo Tirtarahardja.
* remove some assumptions about libvncserver defaults.
2004-04-19 Karl Runge <runge@karlrunge.com>
2004-04-19 Karl Runge <runge@karlrunge.com>
* support for cursor positions updates -cursorpos
* support for cursor positions updates -cursorpos
* option for SIGPIPE handling -sigpipe
* option for SIGPIPE handling -sigpipe
...
...
contrib/x11vnc.c
View file @
1c7ca906
...
@@ -238,6 +238,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
...
@@ -238,6 +238,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
*/
*/
int
waitms
=
30
;
int
waitms
=
30
;
int
defer_update
=
30
;
/* rfbDeferUpdateTime ms to wait before sends. */
int
defer_update
=
30
;
/* rfbDeferUpdateTime ms to wait before sends. */
int
defer_update_nofb
=
6
;
/* defer a shorter time under -nofb */
int
screen_blank
=
60
;
/* number of seconds of no activity to throttle */
int
screen_blank
=
60
;
/* number of seconds of no activity to throttle */
/* down the screen polls. zero to disable. */
/* down the screen polls. zero to disable. */
...
@@ -2055,6 +2056,50 @@ void blackout_nearby_tiles(x, y, dt) {
...
@@ -2055,6 +2056,50 @@ void blackout_nearby_tiles(x, y, dt) {
}
}
}
}
/*
* This is a special workaround to quickly send rfbCursorPosUpdates
* to client(s) when in -nofb mode, e.g. Win2VNC. It sends the updates
* immediately (by-passing libvncserver). Requires a customized Win2VNC
* to interpret the rfbCursorPosUpdates. Currently no big reason to
* do this for non-nofb mode (i.e. normal viewing) and so the normal
* libvncserver mechanism is used. Thanks to Edoardo Tirtarahardja.
*/
void
update_client_pointer
(
rfbClientPtr
cl
,
rfbBool
send
)
{
rfbFramebufferUpdateMsg
*
fu
;
if
(
!
nofb
)
{
/* normal libvncserver mechanism: */
cl
->
cursorWasMoved
=
send
;
return
;
}
if
(
!
send
)
{
return
;
}
if
(
cl
->
state
!=
RFB_NORMAL
)
{
/* bad idea to force this data to initializing clients */
return
;
}
fu
=
(
rfbFramebufferUpdateMsg
*
)
cl
->
updateBuf
;
cl
->
rfbFramebufferUpdateMessagesSent
++
;
fu
->
type
=
rfbFramebufferUpdate
;
fu
->
nRects
=
Swap16IfLE
(
1
);
memcpy
(
&
cl
->
updateBuf
[
cl
->
ublen
],
(
char
*
)
fu
,
sz_rfbFramebufferUpdateMsg
);
cl
->
ublen
=
sz_rfbFramebufferUpdateMsg
;
rfbSendCursorPos
(
cl
);
if
(
debug_pointer
)
{
rfbLog
(
"Sending rfbEncodingPointerPos message to host %s with "
"x=%d,y=%d
\n
"
,
cl
->
host
,
screen
->
cursorX
,
screen
->
cursorY
);
}
}
/*
* Send rfbCursorPosUpdates back to clients that understand them. This
* seems to be TightVNC specific.
*/
void
cursor_pos_updates
(
int
x
,
int
y
)
{
void
cursor_pos_updates
(
int
x
,
int
y
)
{
rfbClientIteratorPtr
iter
;
rfbClientIteratorPtr
iter
;
rfbClientPtr
cl
;
rfbClientPtr
cl
;
...
@@ -2063,6 +2108,7 @@ void cursor_pos_updates(int x, int y) {
...
@@ -2063,6 +2108,7 @@ void cursor_pos_updates(int x, int y) {
if
(
!
cursor_pos
)
{
if
(
!
cursor_pos
)
{
return
;
return
;
}
}
/* x and y are current positions of X11 pointer on the X11 display */
if
(
x
==
screen
->
cursorX
&&
y
==
screen
->
cursorY
)
{
if
(
x
==
screen
->
cursorX
&&
y
==
screen
->
cursorY
)
{
return
;
return
;
}
}
...
@@ -2083,25 +2129,24 @@ void cursor_pos_updates(int x, int y) {
...
@@ -2083,25 +2129,24 @@ void cursor_pos_updates(int x, int y) {
continue
;
continue
;
}
}
if
(
cl
==
last_pointer_client
)
{
if
(
cl
==
last_pointer_client
)
{
/*
* special case if this client was the last one to
* send a pointer position.
*/
if
(
x
==
cursor_x
&&
y
==
cursor_y
)
{
if
(
x
==
cursor_x
&&
y
==
cursor_y
)
{
if
(
cursor_pos
>
1
)
{
update_client_pointer
(
cl
,
FALSE
);
/* send to all */
cl
->
cursorWasMoved
=
TRUE
;
cnt
++
;
}
else
{
cl
->
cursorWasMoved
=
FALSE
;
}
}
else
{
}
else
{
/* an X11 app evidently warped the pointer */
if
(
debug_pointer
)
{
if
(
debug_pointer
)
{
rfbLog
(
"cursor_pos_updates: warp "
rfbLog
(
"cursor_pos_updates: warp "
"detected dx=%3d dy=%3d
\n
"
,
"detected dx=%3d dy=%3d
\n
"
,
cursor_x
-
x
,
cursor_y
-
y
);
cursor_x
-
x
,
cursor_y
-
y
);
}
}
cl
->
cursorWasMoved
=
TRUE
;
update_client_pointer
(
cl
,
TRUE
)
;
cnt
++
;
cnt
++
;
}
}
}
else
{
}
else
{
cl
->
cursorWasMoved
=
TRUE
;
update_client_pointer
(
cl
,
TRUE
)
;
cnt
++
;
cnt
++
;
}
}
}
}
...
@@ -2286,11 +2331,6 @@ void update_mouse(void) {
...
@@ -2286,11 +2331,6 @@ void update_mouse(void) {
int
root_x
,
root_y
,
win_x
,
win_y
,
which
=
0
;
int
root_x
,
root_y
,
win_x
,
win_y
,
which
=
0
;
unsigned
int
mask
;
unsigned
int
mask
;
if
(
!
show_mouse
&&
cursor_pos
==
1
&&
last_pointer_client
)
{
if
(
client_count
==
1
)
{
return
;
/* can save some effort for the 1 client case */
}
}
X_LOCK
;
X_LOCK
;
ret
=
XQueryPointer
(
dpy
,
rootwin
,
&
root_w
,
&
child_w
,
&
root_x
,
&
root_y
,
ret
=
XQueryPointer
(
dpy
,
rootwin
,
&
root_w
,
&
child_w
,
&
root_x
,
&
root_y
,
&
win_x
,
&
win_y
,
&
mask
);
&
win_x
,
&
win_y
,
&
mask
);
...
@@ -2498,9 +2538,10 @@ void set_visual(char *vstring) {
...
@@ -2498,9 +2538,10 @@ void set_visual(char *vstring) {
/*
/*
* Presumably under -nofb the clients will never request the framebuffer.
* Presumably under -nofb the clients will never request the framebuffer.
* But we have gotten such a request... so let's just give them the
* But we have gotten such a request... so let's just give them
* current view on the display. n.b. x2vnc and perhaps win2vnc requests
* the current view on the display. n.b. x2vnc and perhaps win2vnc
* a 1x1 pixel for some workaround so sadly this evidently always happens.
* requests a 1x1 pixel for some workaround so sadly this evidently
* nearly always happens.
*/
*/
void
nofb_hook
(
rfbClientPtr
cl
)
{
void
nofb_hook
(
rfbClientPtr
cl
)
{
static
int
loaded_fb
=
0
;
static
int
loaded_fb
=
0
;
...
@@ -2515,6 +2556,9 @@ void nofb_hook(rfbClientPtr cl) {
...
@@ -2515,6 +2556,9 @@ void nofb_hook(rfbClientPtr cl) {
screen
->
displayHook
=
NULL
;
screen
->
displayHook
=
NULL
;
}
}
int
got_rfbport
=
0
;
int
got_alwaysshared
=
0
;
int
got_nevershared
=
0
;
/*
/*
* initialize the rfb framebuffer/screen
* initialize the rfb framebuffer/screen
*/
*/
...
@@ -2629,16 +2673,12 @@ if (strcmp(LIBVNCSERVER_VERSION, "0.5") && strcmp(LIBVNCSERVER_VERSION, "0.6"))
...
@@ -2629,16 +2673,12 @@ if (strcmp(LIBVNCSERVER_VERSION, "0.5") && strcmp(LIBVNCSERVER_VERSION, "0.6"))
/* we keep stderr for logging */
/* we keep stderr for logging */
screen
->
inetdSock
=
fd
;
screen
->
inetdSock
=
fd
;
screen
->
rfbPort
=
0
;
screen
->
rfbPort
=
0
;
}
/* XXX the following 3 settings are based on libvncserver defaults. */
}
else
if
(
!
got_rfbport
)
{
if
(
screen
->
rfbPort
==
5900
)
{
screen
->
autoPort
=
TRUE
;
screen
->
autoPort
=
TRUE
;
}
}
if
(
screen
->
rfbDeferUpdateTime
==
5
)
{
screen
->
rfbDeferUpdateTime
=
defer_update
;
if
(
!
got_nevershared
&&
!
got_alwaysshared
)
{
}
if
(
!
screen
->
rfbNeverShared
&&
!
screen
->
rfbAlwaysShared
)
{
if
(
shared
)
{
if
(
shared
)
{
screen
->
rfbAlwaysShared
=
TRUE
;
screen
->
rfbAlwaysShared
=
TRUE
;
}
else
{
}
else
{
...
@@ -2646,6 +2686,11 @@ if (strcmp(LIBVNCSERVER_VERSION, "0.5") && strcmp(LIBVNCSERVER_VERSION, "0.6"))
...
@@ -2646,6 +2686,11 @@ if (strcmp(LIBVNCSERVER_VERSION, "0.5") && strcmp(LIBVNCSERVER_VERSION, "0.6"))
screen
->
rfbNeverShared
=
TRUE
;
screen
->
rfbNeverShared
=
TRUE
;
}
}
}
}
/* XXX the following is based on libvncserver defaults. */
if
(
screen
->
rfbDeferUpdateTime
==
5
)
{
/* XXX will be fixed someday */
screen
->
rfbDeferUpdateTime
=
defer_update
;
}
/* event callbacks: */
/* event callbacks: */
screen
->
newClientHook
=
new_client
;
screen
->
newClientHook
=
new_client
;
...
@@ -3242,8 +3287,15 @@ void initialize_shm() {
...
@@ -3242,8 +3287,15 @@ void initialize_shm() {
if
(
i
==
1
)
{
if
(
i
==
1
)
{
clean_up_exit
(
1
);
clean_up_exit
(
1
);
}
}
rfbLog
(
"error creating tile-row shm for len=%d
\n
"
,
i
);
rfbLog
(
"shm: Error creating shared memory tile-row for"
rfbLog
(
"reverting to single_copytile mode
\n
"
);
" len=%d,
\n
"
,
i
);
rfbLog
(
"shm: reverting to -onetile mode. If this"
" problem persists
\n
"
);
rfbLog
(
"shm: try using the -onetile or -noshm options"
" to limit
\n
"
);
rfbLog
(
"shm: shared memory usage, or run ipcrm(1)"
" to manually
\n
"
);
rfbLog
(
"shm: delete unattached shm segments.
\n
"
);
/* n.b.: "i" not "1", a kludge for cleanup */
/* n.b.: "i" not "1", a kludge for cleanup */
single_copytile
=
i
;
single_copytile
=
i
;
}
}
...
@@ -4607,7 +4659,7 @@ void watch_loop(void) {
...
@@ -4607,7 +4659,7 @@ void watch_loop(void) {
if
(
!
use_threads
)
{
if
(
!
use_threads
)
{
rfbProcessEvents
(
screen
,
-
1
);
rfbProcessEvents
(
screen
,
-
1
);
if
(
check_user_input
(
dt
,
&
cnt
))
{
if
(
!
nofb
&&
check_user_input
(
dt
,
&
cnt
))
{
/* true means loop back for more input */
/* true means loop back for more input */
continue
;
continue
;
}
}
...
@@ -4857,6 +4909,8 @@ void print_help() {
...
@@ -4857,6 +4909,8 @@ void print_help() {
" contains
\"
/
\"
it is a file to periodically check for new
\n
"
" contains
\"
/
\"
it is a file to periodically check for new
\n
"
" hosts. The first line is read and then file is truncated.
\n
"
" hosts. The first line is read and then file is truncated.
\n
"
"-vncconnect Monitor the VNC_CONNECT X property set by vncconnect(1).
\n
"
"-vncconnect Monitor the VNC_CONNECT X property set by vncconnect(1).
\n
"
"-auth file Set the X authority file to be
\"
file
\"
, equivalent to
\n
"
" setting the XAUTHORITY env. var to
\"
file
\"
before startup.
\n
"
"-allow addr1[,addr2..] Only allow client connections from IP addresses matching
\n
"
"-allow addr1[,addr2..] Only allow client connections from IP addresses matching
\n
"
" the comma separated list of numerical addresses. Can be
\n
"
" the comma separated list of numerical addresses. Can be
\n
"
" a prefix, e.g.
\"
192.168.100.
\"
to match a simple subnet,
\n
"
" a prefix, e.g.
\"
192.168.100.
\"
to match a simple subnet,
\n
"
...
@@ -4904,8 +4958,6 @@ void print_help() {
...
@@ -4904,8 +4958,6 @@ void print_help() {
" on touchscreens or other non-standard setups).
\n
"
" on touchscreens or other non-standard setups).
\n
"
"-cursorpos Send the X cursor position back to all vnc clients that
\n
"
"-cursorpos Send the X cursor position back to all vnc clients that
\n
"
" support the TightVNC CursorPosUpdates extension.
\n
"
" support the TightVNC CursorPosUpdates extension.
\n
"
"-cursorposall As -cursorpos, but send to all clients, even the one
\n
"
" that is currently moving the cursor around.
\n
"
"-buttonmap str String to remap mouse buttons. Format: IJK-LMN, this
\n
"
"-buttonmap str String to remap mouse buttons. Format: IJK-LMN, this
\n
"
" maps buttons I -> L, etc., e.g. -buttonmap 13-31
\n
"
" maps buttons I -> L, etc., e.g. -buttonmap 13-31
\n
"
"-nodragging Do not update the display during mouse dragging events
\n
"
"-nodragging Do not update the display during mouse dragging events
\n
"
...
@@ -5021,11 +5073,13 @@ int main(int argc, char** argv) {
...
@@ -5021,11 +5073,13 @@ int main(int argc, char** argv) {
XImage
*
fb
;
XImage
*
fb
;
int
i
,
op
,
ev
,
er
,
maj
,
min
;
int
i
,
op
,
ev
,
er
,
maj
,
min
;
char
*
use_dpy
=
NULL
;
char
*
use_dpy
=
NULL
;
char
*
auth_file
=
NULL
;
char
*
arg
,
*
visual_str
=
NULL
;
char
*
arg
,
*
visual_str
=
NULL
;
int
pw_loc
=
-
1
;
int
pw_loc
=
-
1
;
int
dt
=
0
;
int
dt
=
0
;
int
bg
=
0
;
int
bg
=
0
;
int
got_waitms
=
0
,
got_rfbwait
=
0
;
int
got_waitms
=
0
,
got_rfbwait
=
0
;
int
got_deferupdate
=
0
,
got_defer
=
0
;
/* used to pass args we do not know about to rfbGetScreen(): */
/* used to pass args we do not know about to rfbGetScreen(): */
int
argc2
=
1
;
char
*
argv2
[
100
];
int
argc2
=
1
;
char
*
argv2
[
100
];
...
@@ -5059,6 +5113,8 @@ int main(int argc, char** argv) {
...
@@ -5059,6 +5113,8 @@ int main(int argc, char** argv) {
view_only
=
1
;
view_only
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-shared"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-shared"
))
{
shared
=
1
;
shared
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-auth"
))
{
auth_file
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
arg
,
"-allow"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-allow"
))
{
allow_list
=
argv
[
++
i
];
allow_list
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
arg
,
"-localhost"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-localhost"
))
{
...
@@ -5114,8 +5170,6 @@ int main(int argc, char** argv) {
...
@@ -5114,8 +5170,6 @@ int main(int argc, char** argv) {
use_xwarppointer
=
1
;
use_xwarppointer
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-cursorpos"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-cursorpos"
))
{
cursor_pos
=
1
;
cursor_pos
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-cursorposall"
))
{
cursor_pos
=
2
;
}
else
if
(
!
strcmp
(
arg
,
"-buttonmap"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-buttonmap"
))
{
pointer_remap
=
argv
[
++
i
];
pointer_remap
=
argv
[
++
i
];
}
else
if
(
!
strcmp
(
arg
,
"-nodragging"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-nodragging"
))
{
...
@@ -5134,6 +5188,7 @@ int main(int argc, char** argv) {
...
@@ -5134,6 +5188,7 @@ int main(int argc, char** argv) {
debug_keyboard
++
;
debug_keyboard
++
;
}
else
if
(
!
strcmp
(
arg
,
"-defer"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-defer"
))
{
defer_update
=
atoi
(
argv
[
++
i
]);
defer_update
=
atoi
(
argv
[
++
i
]);
got_defer
=
1
;
}
else
if
(
!
strcmp
(
arg
,
"-wait"
))
{
}
else
if
(
!
strcmp
(
arg
,
"-wait"
))
{
waitms
=
atoi
(
argv
[
++
i
]);
waitms
=
atoi
(
argv
[
++
i
]);
got_waitms
=
1
;
got_waitms
=
1
;
...
@@ -5188,6 +5243,18 @@ int main(int argc, char** argv) {
...
@@ -5188,6 +5243,18 @@ int main(int argc, char** argv) {
if
(
!
strcmp
(
arg
,
"-rfbwait"
))
{
if
(
!
strcmp
(
arg
,
"-rfbwait"
))
{
got_rfbwait
=
1
;
got_rfbwait
=
1
;
}
}
if
(
!
strcmp
(
arg
,
"-deferupdate"
))
{
got_deferupdate
=
1
;
}
if
(
!
strcmp
(
arg
,
"-rfbport"
))
{
got_rfbport
=
1
;
}
if
(
!
strcmp
(
arg
,
"-alwaysshared "
))
{
got_alwaysshared
=
1
;
}
if
(
!
strcmp
(
arg
,
"-nevershared"
))
{
got_nevershared
=
1
;
}
/* otherwise copy it for use below. */
/* otherwise copy it for use below. */
if
(
!
quiet
&&
i
!=
pw_loc
&&
i
!=
pw_loc
+
1
)
{
if
(
!
quiet
&&
i
!=
pw_loc
&&
i
!=
pw_loc
+
1
)
{
fprintf
(
stderr
,
"passing arg to libvncserver: %s
\n
"
,
fprintf
(
stderr
,
"passing arg to libvncserver: %s
\n
"
,
...
@@ -5218,6 +5285,10 @@ int main(int argc, char** argv) {
...
@@ -5218,6 +5285,10 @@ int main(int argc, char** argv) {
/* fixup settings that do not make sense */
/* fixup settings that do not make sense */
if
(
use_threads
&&
nofb
&&
cursor_pos
)
{
fprintf
(
stderr
,
"disabling -threads under -nofb -cursorpos
\n
"
);
use_threads
=
0
;
}
if
(
tile_fuzz
<
1
)
{
if
(
tile_fuzz
<
1
)
{
tile_fuzz
=
1
;
tile_fuzz
=
1
;
}
}
...
@@ -5240,41 +5311,89 @@ int main(int argc, char** argv) {
...
@@ -5240,41 +5311,89 @@ int main(int argc, char** argv) {
argv2
[
argc2
++
]
=
"604800000"
;
/* one week... */
argv2
[
argc2
++
]
=
"604800000"
;
/* one week... */
}
}
if
(
nofb
&&
!
got_deferupdate
&&
!
got_defer
)
{
/* reduce defer time under -nofb */
defer_update
=
defer_update_nofb
;
}
if
(
!
got_deferupdate
)
{
char
tmp
[
40
];
/* XXX not working yet in libvncserver */
sprintf
(
tmp
,
"%d"
,
defer_update
);
argv2
[
argc2
++
]
=
"-deferupdate"
;
argv2
[
argc2
++
]
=
strdup
(
tmp
);
}
if
(
!
quiet
)
{
if
(
!
quiet
)
{
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"
\n
"
);
fprintf
(
stderr
,
"display: %s
\n
"
,
use_dpy
?
use_dpy
:
"null"
);
fprintf
(
stderr
,
"subwin: 0x%x
\n
"
,
subwin
);
fprintf
(
stderr
,
"visual: %s
\n
"
,
visual_str
?
visual_str
:
"null"
);
fprintf
(
stderr
,
"flashcmap: %d
\n
"
,
flash_cmap
);
fprintf
(
stderr
,
"force_idx: %d
\n
"
,
force_indexed_color
);
fprintf
(
stderr
,
"viewonly: %d
\n
"
,
view_only
);
fprintf
(
stderr
,
"viewonly: %d
\n
"
,
view_only
);
fprintf
(
stderr
,
"shared: %d
\n
"
,
shared
);
fprintf
(
stderr
,
"shared: %d
\n
"
,
shared
);
fprintf
(
stderr
,
"authfile: %s
\n
"
,
auth_file
?
auth_file
:
"null"
);
fprintf
(
stderr
,
"allow: %s
\n
"
,
allow_list
?
allow_list
fprintf
(
stderr
,
"allow: %s
\n
"
,
allow_list
?
allow_list
:
"null"
);
:
"null"
);
fprintf
(
stderr
,
"inetd: %d
\n
"
,
inetd
);
fprintf
(
stderr
,
"conn_once: %d
\n
"
,
connect_once
);
fprintf
(
stderr
,
"conn_once: %d
\n
"
,
connect_once
);
fprintf
(
stderr
,
"flashcmap: %d
\n
"
,
flash_cmap
);
fprintf
(
stderr
,
"connect: %s
\n
"
,
client_connect
fprintf
(
stderr
,
"force_idx: %d
\n
"
,
force_indexed_color
);
?
client_connect
:
"null"
);
fprintf
(
stderr
,
"connectfile %s
\n
"
,
client_connect_file
?
client_connect_file
:
"null"
);
fprintf
(
stderr
,
"vnc_conn: %d
\n
"
,
vnc_connect
);
fprintf
(
stderr
,
"inetd: %d
\n
"
,
inetd
);
fprintf
(
stderr
,
"using_shm: %d
\n
"
,
using_shm
);
fprintf
(
stderr
,
"using_shm: %d
\n
"
,
using_shm
);
fprintf
(
stderr
,
"flipbytes: %d
\n
"
,
flip_byte_order
);
fprintf
(
stderr
,
"flipbytes: %d
\n
"
,
flip_byte_order
);
fprintf
(
stderr
,
"nofb: %d
\n
"
,
nofb
);
fprintf
(
stderr
,
"watchbell: %d
\n
"
,
watch_bell
);
fprintf
(
stderr
,
"mod_tweak: %d
\n
"
,
use_modifier_tweak
);
fprintf
(
stderr
,
"mod_tweak: %d
\n
"
,
use_modifier_tweak
);
fprintf
(
stderr
,
"remap: %s
\n
"
,
remap_file
?
remap_file
:
"null"
);
fprintf
(
stderr
,
"blackout: %s
\n
"
,
blackout_string
?
blackout_string
:
"null"
);
fprintf
(
stderr
,
"xinerama: %d
\n
"
,
xinerama
);
fprintf
(
stderr
,
"watchbell: %d
\n
"
,
watch_bell
);
fprintf
(
stderr
,
"nofb: %d
\n
"
,
nofb
);
fprintf
(
stderr
,
"watchsel: %d
\n
"
,
watch_selection
);
fprintf
(
stderr
,
"watchprim: %d
\n
"
,
watch_primary
);
fprintf
(
stderr
,
"loc_curs: %d
\n
"
,
local_cursor
);
fprintf
(
stderr
,
"loc_curs: %d
\n
"
,
local_cursor
);
fprintf
(
stderr
,
"mouse: %d
\n
"
,
show_mouse
);
fprintf
(
stderr
,
"mouse: %d
\n
"
,
show_mouse
);
fprintf
(
stderr
,
"root_curs: %d
\n
"
,
show_root_cursor
);
fprintf
(
stderr
,
"xwarpptr: %d
\n
"
,
use_xwarppointer
);
fprintf
(
stderr
,
"cursorpos: %d
\n
"
,
cursor_pos
);
fprintf
(
stderr
,
"buttonmap: %s
\n
"
,
pointer_remap
?
pointer_remap
:
"null"
);
fprintf
(
stderr
,
"dragging: %d
\n
"
,
show_dragging
);
fprintf
(
stderr
,
"dragging: %d
\n
"
,
show_dragging
);
fprintf
(
stderr
,
"inputskip: %d
\n
"
,
ui_skip
);
fprintf
(
stderr
,
"inputskip: %d
\n
"
,
ui_skip
);
fprintf
(
stderr
,
"root_curs: %d
\n
"
,
show_root_cursor
);
fprintf
(
stderr
,
"old_ptr: %d
\n
"
,
old_pointer
);
fprintf
(
stderr
,
"onetile: %d
\n
"
,
single_copytile
);
fprintf
(
stderr
,
"debug_ptr: %d
\n
"
,
debug_pointer
);
fprintf
(
stderr
,
"debug_key: %d
\n
"
,
debug_keyboard
);
fprintf
(
stderr
,
"defer: %d
\n
"
,
defer_update
);
fprintf
(
stderr
,
"defer: %d
\n
"
,
defer_update
);
fprintf
(
stderr
,
"waitms: %d
\n
"
,
waitms
);
fprintf
(
stderr
,
"waitms: %d
\n
"
,
waitms
);
fprintf
(
stderr
,
"take_naps: %d
\n
"
,
take_naps
);
fprintf
(
stderr
,
"take_naps: %d
\n
"
,
take_naps
);
fprintf
(
stderr
,
"sigpipe: %d
\n
"
,
sigpipe
);
fprintf
(
stderr
,
"threads: %d
\n
"
,
use_threads
);
fprintf
(
stderr
,
"threads: %d
\n
"
,
use_threads
);
fprintf
(
stderr
,
"fs_frac: %.2f
\n
"
,
fs_frac
);
fprintf
(
stderr
,
"fs_frac: %.2f
\n
"
,
fs_frac
);
fprintf
(
stderr
,
"gaps_fill: %d
\n
"
,
gaps_fill
);
fprintf
(
stderr
,
"gaps_fill: %d
\n
"
,
gaps_fill
);
fprintf
(
stderr
,
"grow_fill: %d
\n
"
,
grow_fill
);
fprintf
(
stderr
,
"grow_fill: %d
\n
"
,
grow_fill
);
fprintf
(
stderr
,
"tile_fuzz: %d
\n
"
,
tile_fuzz
);
fprintf
(
stderr
,
"tile_fuzz: %d
\n
"
,
tile_fuzz
);
fprintf
(
stderr
,
"use_hints: %d
\n
"
,
use_hints
);
fprintf
(
stderr
,
"use_hints: %d
\n
"
,
use_hints
);
fprintf
(
stderr
,
"bg: %d
\n
"
,
bg
);
}
else
{
}
else
{
rfbLogEnable
(
0
);
rfbLogEnable
(
0
);
}
}
/* open the X display: */
/* open the X display: */
X_INIT
;
X_INIT
;
if
(
auth_file
)
{
char
*
tmp
;
int
len
=
strlen
(
"XAUTHORITY="
)
+
strlen
(
auth_file
)
+
1
;
tmp
=
(
char
*
)
malloc
((
size_t
)
len
);
sprintf
(
tmp
,
"XAUTHORITY=%s"
,
auth_file
);
putenv
(
tmp
);
}
if
(
use_dpy
)
{
if
(
use_dpy
)
{
dpy
=
XOpenDisplay
(
use_dpy
);
dpy
=
XOpenDisplay
(
use_dpy
);
}
else
if
(
(
use_dpy
=
getenv
(
"DISPLAY"
))
)
{
}
else
if
(
(
use_dpy
=
getenv
(
"DISPLAY"
))
)
{
...
...
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