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
30c00d0b
Commit
30c00d0b
authored
Oct 23, 2005
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: -filexfer, -slow_fb, -blackout noptr,...
parent
94d7fc84
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
1483 additions
and
952 deletions
+1483
-952
ChangeLog
ChangeLog
+3
-0
ChangeLog
x11vnc/ChangeLog
+7
-0
README
x11vnc/README
+900
-871
tkx11vnc
x11vnc/tkx11vnc
+147
-13
tkx11vnc.h
x11vnc/tkx11vnc.h
+147
-13
x11vnc.1
x11vnc/x11vnc.1
+26
-11
x11vnc.c
x11vnc/x11vnc.c
+253
-44
No files found.
ChangeLog
View file @
30c00d0b
2005-10-22 Karl Runge <runge@karlrunge.com>
* x11vnc: -filexfer file transfer, -slow_fb, -blackout noptr...
2005-10-06 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
2005-10-06 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* many a files: kill BackChannel and CustomClientMessage
* many a files: kill BackChannel and CustomClientMessage
support. The new extension mechanism is much more versatile.
support. The new extension mechanism is much more versatile.
...
...
x11vnc/ChangeLog
View file @
30c00d0b
2005-10-22 Karl Runge <runge@karlrunge.com>
* add tightVNC FileTransfer (-filexfer) and -DFILEXFER=1
* -slow_fb for special purpose infrequent polling.
* make -blackout work with copyrect clipping.
* -blackout noptr,WxH+X+Y,... to prevent pointer from going
into a blacked out region.
2005-07-17 Karl Runge <runge@karlrunge.com>
2005-07-17 Karl Runge <runge@karlrunge.com>
* more improvements to gui UE. gui requests via client_sock
* more improvements to gui UE. gui requests via client_sock
PASSWD_REQUIRED and PASSWD_UNLESS_NOPW build options.
PASSWD_REQUIRED and PASSWD_UNLESS_NOPW build options.
...
...
x11vnc/README
View file @
30c00d0b
This source diff could not be displayed because it is too large. You can
view the blob
instead.
x11vnc/tkx11vnc
View file @
30c00d0b
...
@@ -55,6 +55,7 @@ catch {rename send {}}
...
@@ -55,6 +55,7 @@ catch {rename send {}}
# 0 means to skip the item.
# 0 means to skip the item.
# -- means add a separator
# -- means add a separator
#
#
proc set_template
{}
{
proc set_template
{}
{
global template
global template
set
template
"
set
template
"
...
@@ -186,6 +187,8 @@ Misc
...
@@ -186,6 +187,8 @@ Misc
--
--
=F rc:
=F rc:
norc
norc
filexfer
--
nofb
nofb
=D nobell
=D nobell
nolookup
nolookup
...
@@ -572,6 +575,22 @@ of actions:
...
@@ -572,6 +575,22 @@ of actions:
Stop x11vnc - Directs the x11vnc server to disconnect all vncviewers
Stop x11vnc - Directs the x11vnc server to disconnect all vncviewers
and then exit. The tray/icon GUI then exits as well.
and then exit. The tray/icon GUI then exits as well.
Custom - If you have a
\$
HOME/.x11vnc.gui file each uncommented
line in it becomes an additional menu item for this
menu. The remote control command is run directly
via
\"
x11vnc -R <command>
\"
, or if prefixed with
\"
action:
\"
runs a gui internal action, or if
\"
sep
\"
adds a separator. Set X11VNC_CUSTOM_GUI to use
a different filename. Example file contents:
scale:3/4
scale:1
scale_cursor:1
sep
action:all-settings
#debug_keyboard
sep
action:Quit
Termination:
Termination:
...
@@ -1315,7 +1334,9 @@ proc help_win {item} {
...
@@ -1315,7 +1334,9 @@ proc help_win {item} {
set
ok 0
set
ok 0
set
text
"Help on
$item
:
\n\n
"
set
text
"Help on
$item
:
\n\n
"
if
{[
is_gui_internal
$item
]}
{
if
{
$item
==
"NewClient"
}
{
;
}
elseif
{[
is_gui_internal
$item
]}
{
if
{
$item
!=
"gui"
&&
$item
!=
"all"
&&
$item
!=
"Misc-Tuning:"
\
if
{
$item
!=
"gui"
&&
$item
!=
"all"
&&
$item
!=
"Misc-Tuning:"
\
&&
$item
!=
"Properties"
&&
$item
!=
"Tray"
}
{
&&
$item
!=
"Properties"
&&
$item
!=
"Tray"
}
{
append text
" + Is a gui internal Action (cannot be set).
\n
"
;
append text
" + Is a gui internal Action (cannot be set).
\n
"
;
...
@@ -1327,7 +1348,9 @@ proc help_win {item} {
...
@@ -1327,7 +1348,9 @@ proc help_win {item} {
}
else
{
}
else
{
append text
" - Cannot be changed in a running x11vnc.
\n
"
;
append text
" - Cannot be changed in a running x11vnc.
\n
"
;
}
}
if
{[
is_gui_internal
$item
]}
{
if
{
$item
==
"NewClient"
}
{
;
}
elseif
{[
is_gui_internal
$item
]}
{
;
;
}
elseif
{[
active_when_starting
$item
]}
{
}
elseif
{[
active_when_starting
$item
]}
{
append text
" + Can be set at x11vnc startup.
\n
"
;
append text
" + Can be set at x11vnc startup.
\n
"
;
...
@@ -2860,6 +2883,9 @@ proc do_action {item} {
...
@@ -2860,6 +2883,9 @@ proc do_action {item} {
}
elseif
{
$item
==
"WindowView"
}
{
}
elseif
{
$item
==
"WindowView"
}
{
change_view_state
change_view_state
return
return
}
elseif
{
$item
==
"quit"
||
$item
==
"Quit"
}
{
destroy
.
exit
0
}
elseif
{
$item
==
"stop+quit"
}
{
}
elseif
{
$item
==
"stop+quit"
}
{
do_stop_quit
do_stop_quit
}
}
...
@@ -3844,6 +3870,7 @@ proc props_advanced {} {
...
@@ -3844,6 +3870,7 @@ proc props_advanced {} {
}
else
{
}
else
{
set
first 0
set
first 0
}
}
update
wm deiconify
$full_win
wm deiconify
$full_win
update
update
...
@@ -4119,6 +4146,8 @@ proc pmenu {m x y} {
...
@@ -4119,6 +4146,8 @@ proc pmenu {m x y} {
set
x
[
expr
$x
-10
]
set
x
[
expr
$x
-10
]
set
y
[
expr
$y
-10
]
set
y
[
expr
$y
-10
]
$m
post
$x
$y
$m
post
$x
$y
# XXX more care needed
grab
set
-global
$m
}
}
proc set_client_balloon
{
str
}
{
proc set_client_balloon
{
str
}
{
...
@@ -4158,7 +4187,9 @@ proc set_client_balloon {str} {
...
@@ -4158,7 +4187,9 @@ proc set_client_balloon {str} {
}
}
}
else
{
}
else
{
set
i
[
expr
$count
+1]
set
i
[
expr
$count
+1]
set
client_balloon
"
${
client_balloon
}
\n
unknown-host
$i
"
if
{
$i
==
1
}
{
set
client_balloon
"
${
client_balloon
}
\n
unknown-host
$i
"
}
}
}
incr count
incr count
}
}
...
@@ -4458,18 +4489,27 @@ proc get_icon_label {{set 0}} {
...
@@ -4458,18 +4489,27 @@ proc get_icon_label {{set 0}} {
return
$lab
return
$lab
}
}
# currently unused
proc lmenu
{
menu
}
{
proc lmenu
{
menu
}
{
global popup_cascade_posted
global popup_cascade_posted
global left_iconwin_menu
set
left_iconwin_menu 1
after 100
after 100
if
{!
$popup_cascade_posted
}
{
update
after 100
if
{!
$popup_cascade_posted
&&
$left_iconwin_menu
}
{
if
{!
$popup_cascade_posted
}
{
for
{
set
i 0
}
{
$i
< 3
}
{
incr i
}
{
after 100
update
}
if
{!
$popup_cascade_posted
&&
$left_iconwin_menu
}
{
$menu
unpost
$menu
unpost
return
return
}
}
}
}
# kludge for WindowView
# kludge for WindowView
focus
$menu
if
{
$popup_cascade_posted
}
{
focus
$menu
}
}
}
proc old_balloon
{}
{
proc old_balloon
{}
{
...
@@ -4490,6 +4530,78 @@ proc old_balloon {} {
...
@@ -4490,6 +4530,78 @@ proc old_balloon {} {
}
}
}
}
proc get_custom_menu_items
{}
{
global
env
custom_last_read
if
{![
info exists custom_last_read]
}
{
set
custom_last_read 0
}
if
{[
info exists
env
(
X11VNC_CUSTOM_GUI
)]}
{
set
custom
"
$env
(X11VNC_CUSTOM_GUI)"
}
elseif
{![
info exists
env
(
HOME
)]}
{
return
[
list
"none"
]
}
else
{
set
custom
"
$env
(HOME)/.x11vnc.gui"
}
if
{![
file exists
$custom
]}
{
return
[
list
"none"
]
}
# if {[file mtime $custom] <= $custom_last_read} {
# return [list "nochange"]
# }
set
in
""
catch
{
set
in
[
open
$custom
"r"
]}
if
{
$in
==
""
}
{
return
[
list
"none"
]
}
set
custom_last_read
[
clock seconds]
set
count 0
while
{[
gets
$in
line]
>
-1
}
{
if
{[
regexp
{
^[
\t
]
*
#} $line]} {
continue
}
set
line
[
string trim
$line
]
if
{
$line
!=
""
}
{
lappend items
$line
incr count
}
}
close
$in
if
{
$count
>
0
}
{
return
$items
}
else
{
return
[
list
"none"
]
}
}
proc make_custom_menu
{
menu font
}
{
set
items
[
get_custom_menu_items]
set
i0
[
lindex
$items
0]
catch
{
$menu
delete 0 end
}
if
{
$i0
!=
"none"
}
{
$menu
add
command
-font
$font
-label
"Custom items:"
$menu
add separator
foreach item
$items
{
if
{
$item
==
"sep"
||
$item
==
"separator"
}
{
$menu
add separator
continue
}
if
{[
regexp
{
^action:
(
.
*
)
$}
$item
m action]
}
{
$menu
add
command
-font
$font
-label
"
$action
"
\
-command
"do_var
$action
"
continue
}
$menu
add
command
-font
$font
-label
"
$item
"
\
-command
"run_remote_cmd
\[
list
\"
-R
\"
\"
$item
\"\]
"
}
}
}
proc make_icon
{}
{
proc make_icon
{}
{
global icon_mode icon_embed_id icon_win props_win full_win
global icon_mode icon_embed_id icon_win props_win full_win
global tray_embed tray_running
env
global tray_embed tray_running
env
...
@@ -4572,13 +4684,25 @@ proc make_icon {} {
...
@@ -4572,13 +4684,25 @@ proc make_icon {} {
$menu
add
command
-font
$mfont
-label
"Stop x11vnc"
-command
clean_icon_exit
$menu
add
command
-font
$mfont
-label
"Stop x11vnc"
-command
clean_icon_exit
bind
$icon_win
<ButtonPress-1>
"pmenu
$menu
%X %Y"
set
items
[
get_custom_menu_items]
bind
$icon_win
<ButtonPress-3>
"pmenu
$menu
%X %Y"
set
i0
[
lindex
$items
0]
if
{
$i0
!=
"none"
&&
$i0
!=
"nochange"
}
{
$menu
add separator
set
cm
"
$menu
.custom"
catch
{
destroy
$cm
}
menu
$cm
-tearoff
0
-font
$ffont
\
-postcommand
"set popup_cascade_posted 1; make_custom_menu
$cm
$ffont
"
$menu
add cascade
-font
$mfont
-label
"Custom:"
-menu
$cm
}
bind
$icon_win
<ButtonRelease-1>
"pmenu
$menu
%X %Y"
bind
$icon_win
<ButtonRelease-3>
"pmenu
$menu
%X %Y"
bind
$icon_win
<Enter>
{
set
client_balloon_id
[
after 500 show_client_balloon]
}
bind
$icon_win
<Enter>
{
set
client_balloon_id
[
after 500 show_client_balloon]
}
bind
$icon_win
<Button>
{
kill_client_balloon
}
bind
$icon_win
<Button>
{
kill_client_balloon
}
bind
$icon_win
<Leave>
{
kill_client_balloon
}
bind
$icon_win
<Leave>
{
kill_client_balloon
}
bind
$icon_win
<ButtonPress-2>
{
kill_client_balloon
;
show_client_balloon
}
bind
$icon_win
<ButtonPress-2>
{
kill_client_balloon
;
show_client_balloon
}
bind
$menu
<Leave>
"lmenu
$menu
"
# bind $menu <Leave> "lmenu $menu"
# bind $menu <Enter> "set left_iconwin_menu 0"
## bind $menu <KeyPress-Escape> "$menu unpost"
## bind $menu <KeyPress-Escape> "$menu unpost"
bind
.
<Control-KeyPress-c>
{
destroy .
;
exit
0
}
bind
.
<Control-KeyPress-c>
{
destroy .
;
exit
0
}
...
@@ -4599,7 +4723,9 @@ proc make_icon {} {
...
@@ -4599,7 +4723,9 @@ proc make_icon {} {
}
}
wm iconname
.
"tkx11vnc"
wm iconname
.
"tkx11vnc"
wm title
.
"tkx11vnc"
wm title
.
"tkx11vnc"
update
wm deiconify
.
wm deiconify
.
update
old_balloon
old_balloon
}
}
...
@@ -4739,6 +4865,7 @@ proc make_gui {mode} {
...
@@ -4739,6 +4865,7 @@ proc make_gui {mode} {
set
gui_current_state
$mode
set
gui_current_state
$mode
update
wm deiconify
.
wm deiconify
.
update idletasks
update idletasks
wm minsize
$w
[
winfo width
$w
]
[
winfo height
$w
]
wm minsize
$w
[
winfo width
$w
]
[
winfo height
$w
]
...
@@ -5195,9 +5322,10 @@ proc get_settings_rcfile {} {
...
@@ -5195,9 +5322,10 @@ proc get_settings_rcfile {} {
proc double_check_start_x11vnc {} {
proc double_check_start_x11vnc {} {
global hostname
global hostname
set msg [get_start_x11vnc_txt]
set msg [get_start_x11vnc_txt]
bell
append msg "\n"
append msg "\n"
append msg "*** To run the above command on machine \"
$hostname
\"
to
\n"
append msg "*** To run the above command on machine \"
$hostname
\"
(thereby
\n"
append msg "*** start
x11vnc press \"OK\"
otherwise press \"Cancel\".\n"
append msg "*** start
ing x11vnc) press \"OK\",
otherwise press \"Cancel\".\n"
return [warning_dialog
$msg
"start"]
return [warning_dialog
$msg
"start"]
}
}
...
@@ -5402,8 +5530,12 @@ proc run_remote_cmd_via_sock {opts} {
...
@@ -5402,8 +5530,12 @@ proc run_remote_cmd_via_sock {opts} {
global client_sock
global client_sock
set db 0
set db 0
if {[file channels
$client_sock
] == ""} {
set client_sock ""
return "fail"
}
if {[eof
$client_sock
]} {
if {[eof
$client_sock
]} {
c
lose
$client_sock
c
atch {close
$client_sock
}
set client_sock ""
set client_sock ""
return "fail"
return "fail"
}
}
...
@@ -5750,6 +5882,8 @@ proc undo_tray_embed {} {
...
@@ -5750,6 +5882,8 @@ proc undo_tray_embed {} {
############################################################################
############################################################################
# main:
# main:
wm withdraw .
global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;
global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;
global x11vnc_xdisplay0
global x11vnc_xdisplay0
global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url
global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url
...
...
x11vnc/tkx11vnc.h
View file @
30c00d0b
...
@@ -61,6 +61,7 @@
...
@@ -61,6 +61,7 @@
"# 0 means to skip the item.
\n
"
"# 0 means to skip the item.
\n
"
"# -- means add a separator
\n
"
"# -- means add a separator
\n
"
"#
\n
"
"#
\n
"
"
\n
"
"proc set_template {} {
\n
"
"proc set_template {} {
\n
"
" global template
\n
"
" global template
\n
"
" set template
\"\n
"
" set template
\"\n
"
...
@@ -192,6 +193,8 @@
...
@@ -192,6 +193,8 @@
" --
\n
"
" --
\n
"
" =F rc:
\n
"
" =F rc:
\n
"
" norc
\n
"
" norc
\n
"
" filexfer
\n
"
" --
\n
"
" nofb
\n
"
" nofb
\n
"
" =D nobell
\n
"
" =D nobell
\n
"
" nolookup
\n
"
" nolookup
\n
"
...
@@ -578,6 +581,22 @@
...
@@ -578,6 +581,22 @@
" Stop x11vnc - Directs the x11vnc server to disconnect all vncviewers
\n
"
" Stop x11vnc - Directs the x11vnc server to disconnect all vncviewers
\n
"
" and then exit. The tray/icon GUI then exits as well.
\n
"
" and then exit. The tray/icon GUI then exits as well.
\n
"
"
\n
"
"
\n
"
" Custom - If you have a
\\
$HOME/.x11vnc.gui file each uncommented
\n
"
" line in it becomes an additional menu item for this
\n
"
" menu. The remote control command is run directly
\n
"
" via
\\\"
x11vnc -R <command>
\\\"
, or if prefixed with
\n
"
"
\\\"
action:
\\\"
runs a gui internal action, or if
\\\"
sep
\\\"\n
"
" adds a separator. Set X11VNC_CUSTOM_GUI to use
\n
"
" a different filename. Example file contents:
\n
"
"
\n
"
" scale:3/4
\n
"
" scale:1
\n
"
" scale_cursor:1
\n
"
" sep
\n
"
" action:all-settings
\n
"
" #debug_keyboard
\n
"
" sep
\n
"
" action:Quit
\n
"
"
\n
"
"
\n
"
"Termination:
\n
"
"Termination:
\n
"
"
\n
"
"
\n
"
...
@@ -1321,7 +1340,9 @@
...
@@ -1321,7 +1340,9 @@
" set ok 0
\n
"
" set ok 0
\n
"
" set text
\"
Help on $item:
\\
n
\\
n
\"\n
"
" set text
\"
Help on $item:
\\
n
\\
n
\"\n
"
"
\n
"
"
\n
"
" if {[is_gui_internal $item]} {
\n
"
" if {$item ==
\"
NewClient
\"
} {
\n
"
" ;
\n
"
" } elseif {[is_gui_internal $item]} {
\n
"
" if {$item !=
\"
gui
\"
&& $item !=
\"
all
\"
&& $item !=
\"
Misc-Tuning:
\"
\\\n
"
" if {$item !=
\"
gui
\"
&& $item !=
\"
all
\"
&& $item !=
\"
Misc-Tuning:
\"
\\\n
"
" && $item !=
\"
Properties
\"
&& $item !=
\"
Tray
\"
} {
\n
"
" && $item !=
\"
Properties
\"
&& $item !=
\"
Tray
\"
} {
\n
"
" append text
\"
+ Is a gui internal Action (cannot be set).
\\
n
\"
;
\n
"
" append text
\"
+ Is a gui internal Action (cannot be set).
\\
n
\"
;
\n
"
...
@@ -1333,7 +1354,9 @@
...
@@ -1333,7 +1354,9 @@
" } else {
\n
"
" } else {
\n
"
" append text
\"
- Cannot be changed in a running x11vnc.
\\
n
\"
;
\n
"
" append text
\"
- Cannot be changed in a running x11vnc.
\\
n
\"
;
\n
"
" }
\n
"
" }
\n
"
" if {[is_gui_internal $item]} {
\n
"
" if {$item ==
\"
NewClient
\"
} {
\n
"
" ;
\n
"
" } elseif {[is_gui_internal $item]} {
\n
"
" ;
\n
"
" ;
\n
"
" } elseif {[active_when_starting $item]} {
\n
"
" } elseif {[active_when_starting $item]} {
\n
"
" append text
\"
+ Can be set at x11vnc startup.
\\
n
\"
;
\n
"
" append text
\"
+ Can be set at x11vnc startup.
\\
n
\"
;
\n
"
...
@@ -2866,6 +2889,9 @@
...
@@ -2866,6 +2889,9 @@
" } elseif {$item ==
\"
WindowView
\"
} {
\n
"
" } elseif {$item ==
\"
WindowView
\"
} {
\n
"
" change_view_state
\n
"
" change_view_state
\n
"
" return
\n
"
" return
\n
"
" } elseif {$item ==
\"
quit
\"
|| $item ==
\"
Quit
\"
} {
\n
"
" destroy .
\n
"
" exit 0
\n
"
" } elseif {$item ==
\"
stop+quit
\"
} {
\n
"
" } elseif {$item ==
\"
stop+quit
\"
} {
\n
"
" do_stop_quit
\n
"
" do_stop_quit
\n
"
" }
\n
"
" }
\n
"
...
@@ -3850,6 +3876,7 @@
...
@@ -3850,6 +3876,7 @@
" } else {
\n
"
" } else {
\n
"
" set first 0
\n
"
" set first 0
\n
"
" }
\n
"
" }
\n
"
" update
\n
"
" wm deiconify $full_win
\n
"
" wm deiconify $full_win
\n
"
" update
\n
"
" update
\n
"
"
\n
"
"
\n
"
...
@@ -4125,6 +4152,8 @@
...
@@ -4125,6 +4152,8 @@
" set x [expr $x-10]
\n
"
" set x [expr $x-10]
\n
"
" set y [expr $y-10]
\n
"
" set y [expr $y-10]
\n
"
" $m post $x $y
\n
"
" $m post $x $y
\n
"
" # XXX more care needed
\n
"
" grab set -global $m
\n
"
"}
\n
"
"}
\n
"
"
\n
"
"
\n
"
"proc set_client_balloon {str} {
\n
"
"proc set_client_balloon {str} {
\n
"
...
@@ -4164,7 +4193,9 @@
...
@@ -4164,7 +4193,9 @@
" }
\n
"
" }
\n
"
" } else {
\n
"
" } else {
\n
"
" set i [expr $count+1]
\n
"
" set i [expr $count+1]
\n
"
" set client_balloon
\"
${client_balloon}
\\
nunknown-host$i
\"\n
"
" if {$i == 1} {
\n
"
" set client_balloon
\"
${client_balloon}
\\
nunknown-host$i
\"\n
"
" }
\n
"
" }
\n
"
" }
\n
"
" incr count
\n
"
" incr count
\n
"
" }
\n
"
" }
\n
"
...
@@ -4464,18 +4495,27 @@
...
@@ -4464,18 +4495,27 @@
" return $lab
\n
"
" return $lab
\n
"
"}
\n
"
"}
\n
"
"
\n
"
"
\n
"
"# currently unused
\n
"
"proc lmenu {menu} {
\n
"
"proc lmenu {menu} {
\n
"
" global popup_cascade_posted
\n
"
" global popup_cascade_posted
\n
"
" global left_iconwin_menu
\n
"
" set left_iconwin_menu 1
\n
"
" after 100
\n
"
" after 100
\n
"
" if {!$popup_cascade_posted} {
\n
"
" update
\n
"
" after 100
\n
"
" if {!$popup_cascade_posted && $left_iconwin_menu} {
\n
"
" if {!$popup_cascade_posted} {
\n
"
" for {set i 0} {$i < 3} {incr i} {
\n
"
" after 100
\n
"
" update
\n
"
" }
\n
"
" if {!$popup_cascade_posted && $left_iconwin_menu} {
\n
"
" $menu unpost
\n
"
" $menu unpost
\n
"
" return
\n
"
" return
\n
"
" }
\n
"
" }
\n
"
" }
\n
"
" }
\n
"
" # kludge for WindowView
\n
"
" # kludge for WindowView
\n
"
" focus $menu
\n
"
" if {$popup_cascade_posted} {
\n
"
" focus $menu
\n
"
" }
\n
"
"}
\n
"
"}
\n
"
"
\n
"
"
\n
"
"proc old_balloon {} {
\n
"
"proc old_balloon {} {
\n
"
...
@@ -4496,6 +4536,78 @@
...
@@ -4496,6 +4536,78 @@
" }
\n
"
" }
\n
"
"}
\n
"
"}
\n
"
"
\n
"
"
\n
"
"proc get_custom_menu_items {} {
\n
"
" global env custom_last_read
\n
"
"
\n
"
" if {![info exists custom_last_read]} {
\n
"
" set custom_last_read 0
\n
"
" }
\n
"
" if {[info exists env(X11VNC_CUSTOM_GUI)]} {
\n
"
" set custom
\"
$env(X11VNC_CUSTOM_GUI)
\"\n
"
" } elseif {![info exists env(HOME)]} {
\n
"
" return [list
\"
none
\"
]
\n
"
" } else {
\n
"
" set custom
\"
$env(HOME)/.x11vnc.gui
\"\n
"
" }
\n
"
" if {![file exists $custom]} {
\n
"
" return [list
\"
none
\"
]
\n
"
" }
\n
"
"
\n
"
"# if {[file mtime $custom] <= $custom_last_read} {
\n
"
"# return [list
\"
nochange
\"
]
\n
"
"# }
\n
"
"
\n
"
" set in
\"\"\n
"
" catch {set in [open $custom
\"
r
\"
]}
\n
"
" if {$in ==
\"\"
} {
\n
"
" return [list
\"
none
\"
]
\n
"
" }
\n
"
"
\n
"
" set custom_last_read [clock seconds]
\n
"
"
\n
"
" set count 0
\n
"
" while {[gets $in line] > -1} {
\n
"
" if {[regexp {^[
\\
t]*#} $line]} {
\n
"
" continue
\n
"
" }
\n
"
" set line [string trim $line]
\n
"
" if {$line !=
\"\"
} {
\n
"
" lappend items $line
\n
"
" incr count
\n
"
" }
\n
"
" }
\n
"
" close $in
\n
"
"
\n
"
" if {$count > 0} {
\n
"
" return $items
\n
"
" } else {
\n
"
" return [list
\"
none
\"
]
\n
"
" }
\n
"
"}
\n
"
"
\n
"
"proc make_custom_menu {menu font} {
\n
"
" set items [get_custom_menu_items]
\n
"
" set i0 [lindex $items 0]
\n
"
" catch {$menu delete 0 end}
\n
"
" if {$i0 !=
\"
none
\"
} {
\n
"
" $menu add command -font $font -label
\"
Custom items:
\"\n
"
" $menu add separator
\n
"
" foreach item $items {
\n
"
" if {$item ==
\"
sep
\"
|| $item ==
\"
separator
\"
} {
\n
"
" $menu add separator
\n
"
" continue
\n
"
" }
\n
"
" if {[regexp {^action:(.*)$} $item m action]} {
\n
"
" $menu add command -font $font -label
\"
$action
\"
\\\n
"
" -command
\"
do_var $action
\"\n
"
" continue
\n
"
" }
\n
"
" $menu add command -font $font -label
\"
$item
\"
\\\n
"
" -command
\"
run_remote_cmd
\\
[list
\\\"
-R
\\\"
\\\"
$item
\\\"\\
]
\"\n
"
" }
\n
"
" }
\n
"
"}
\n
"
"
\n
"
"proc make_icon {} {
\n
"
"proc make_icon {} {
\n
"
" global icon_mode icon_embed_id icon_win props_win full_win
\n
"
" global icon_mode icon_embed_id icon_win props_win full_win
\n
"
" global tray_embed tray_running env
\n
"
" global tray_embed tray_running env
\n
"
...
@@ -4578,13 +4690,25 @@
...
@@ -4578,13 +4690,25 @@
"
\n
"
"
\n
"
" $menu add command -font $mfont -label
\"
Stop x11vnc
\"
-command clean_icon_exit
\n
"
" $menu add command -font $mfont -label
\"
Stop x11vnc
\"
-command clean_icon_exit
\n
"
"
\n
"
"
\n
"
" bind $icon_win <ButtonPress-1>
\"
pmenu $menu %X %Y
\"\n
"
" set items [get_custom_menu_items]
\n
"
" bind $icon_win <ButtonPress-3>
\"
pmenu $menu %X %Y
\"\n
"
" set i0 [lindex $items 0]
\n
"
" if {$i0 !=
\"
none
\"
&& $i0 !=
\"
nochange
\"
} {
\n
"
" $menu add separator
\n
"
" set cm
\"
$menu.custom
\"\n
"
" catch {destroy $cm}
\n
"
" menu $cm -tearoff 0 -font $ffont
\\\n
"
" -postcommand
\"
set popup_cascade_posted 1; make_custom_menu $cm $ffont
\"\n
"
" $menu add cascade -font $mfont -label
\"
Custom:
\"
-menu $cm
\n
"
" }
\n
"
"
\n
"
" bind $icon_win <ButtonRelease-1>
\"
pmenu $menu %X %Y
\"\n
"
" bind $icon_win <ButtonRelease-3>
\"
pmenu $menu %X %Y
\"\n
"
" bind $icon_win <Enter> {set client_balloon_id [after 500 show_client_balloon]}
\n
"
" bind $icon_win <Enter> {set client_balloon_id [after 500 show_client_balloon]}
\n
"
" bind $icon_win <Button> {kill_client_balloon}
\n
"
" bind $icon_win <Button> {kill_client_balloon}
\n
"
" bind $icon_win <Leave> {kill_client_balloon}
\n
"
" bind $icon_win <Leave> {kill_client_balloon}
\n
"
" bind $icon_win <ButtonPress-2> {kill_client_balloon; show_client_balloon}
\n
"
" bind $icon_win <ButtonPress-2> {kill_client_balloon; show_client_balloon}
\n
"
" bind $menu <Leave>
\"
lmenu $menu
\"\n
"
"# bind $menu <Leave>
\"
lmenu $menu
\"\n
"
"# bind $menu <Enter>
\"
set left_iconwin_menu 0
\"\n
"
"## bind $menu <KeyPress-Escape>
\"
$menu unpost
\"\n
"
"## bind $menu <KeyPress-Escape>
\"
$menu unpost
\"\n
"
"
\n
"
"
\n
"
" bind . <Control-KeyPress-c> {destroy .; exit 0}
\n
"
" bind . <Control-KeyPress-c> {destroy .; exit 0}
\n
"
...
@@ -4605,7 +4729,9 @@
...
@@ -4605,7 +4729,9 @@
" }
\n
"
" }
\n
"
" wm iconname .
\"
tkx11vnc
\"\n
"
" wm iconname .
\"
tkx11vnc
\"\n
"
" wm title .
\"
tkx11vnc
\"\n
"
" wm title .
\"
tkx11vnc
\"\n
"
" update
\n
"
" wm deiconify .
\n
"
" wm deiconify .
\n
"
" update
\n
"
"
\n
"
"
\n
"
" old_balloon
\n
"
" old_balloon
\n
"
"}
\n
"
"}
\n
"
...
@@ -4745,6 +4871,7 @@
...
@@ -4745,6 +4871,7 @@
" set gui_current_state $mode
\n
"
" set gui_current_state $mode
\n
"
"
\n
"
"
\n
"
"
\n
"
"
\n
"
" update
\n
"
" wm deiconify .
\n
"
" wm deiconify .
\n
"
" update idletasks
\n
"
" update idletasks
\n
"
" wm minsize $w [winfo width $w] [winfo height $w]
\n
"
" wm minsize $w [winfo width $w] [winfo height $w]
\n
"
...
@@ -5201,9 +5328,10 @@
...
@@ -5201,9 +5328,10 @@
"proc double_check_start_x11vnc {} {
\n
"
"proc double_check_start_x11vnc {} {
\n
"
" global hostname
\n
"
" global hostname
\n
"
" set msg [get_start_x11vnc_txt]
\n
"
" set msg [get_start_x11vnc_txt]
\n
"
" bell
\n
"
" append msg
\"\\
n
\"\n
"
" append msg
\"\\
n
\"\n
"
" append msg
\"
*** To run the above command on machine
\\\"
$hostname
\\\"
to
\\
n
\"\n
"
" append msg
\"
*** To run the above command on machine
\\\"
$hostname
\\\"
(thereby
\\
n
\"\n
"
" append msg
\"
*** start
x11vnc press
\\\"
OK
\\\"
otherwise press
\\\"
Cancel
\\\"
.
\\
n
\"\n
"
" append msg
\"
*** start
ing x11vnc) press
\\\"
OK
\\\"
,
otherwise press
\\\"
Cancel
\\\"
.
\\
n
\"\n
"
" return [warning_dialog $msg
\"
start
\"
]
\n
"
" return [warning_dialog $msg
\"
start
\"
]
\n
"
"}
\n
"
"}
\n
"
"
\n
"
"
\n
"
...
@@ -5408,8 +5536,12 @@
...
@@ -5408,8 +5536,12 @@
" global client_sock
\n
"
" global client_sock
\n
"
"
\n
"
"
\n
"
" set db 0
\n
"
" set db 0
\n
"
" if {[file channels $client_sock] ==
\"\"
} {
\n
"
" set client_sock
\"\"\n
"
" return
\"
fail
\"\n
"
" }
\n
"
" if {[eof $client_sock]} {
\n
"
" if {[eof $client_sock]} {
\n
"
" c
lose $client_sock
\n
"
" c
atch {close $client_sock}
\n
"
" set client_sock
\"\"\n
"
" set client_sock
\"\"\n
"
" return
\"
fail
\"\n
"
" return
\"
fail
\"\n
"
" }
\n
"
" }
\n
"
...
@@ -5756,6 +5888,8 @@
...
@@ -5756,6 +5888,8 @@
"############################################################################
\n
"
"############################################################################
\n
"
"# main:
\n
"
"# main:
\n
"
"
\n
"
"
\n
"
"wm withdraw .
\n
"
"
\n
"
"global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;
\n
"
"global env x11vnc_prog x11vnc_cmdline x11vnc_xdisplay x11vnc_connect;
\n
"
"global x11vnc_xdisplay0
\n
"
"global x11vnc_xdisplay0
\n
"
"global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url
\n
"
"global x11vnc_client_file x11vnc_gui_geom x11vnc_started vnc_url
\n
"
...
...
x11vnc/x11vnc.1
View file @
30c00d0b
.\" This file was automatically generated from x11vnc -help output.
.\" This file was automatically generated from x11vnc -help output.
.TH X11VNC "1" "
July
2005" "x11vnc " "User Commands"
.TH X11VNC "1" "
October
2005" "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.7.3, lastmod: 2005-
07-17
version: 0.7.3, lastmod: 2005-
10-22
.SH SYNOPSIS
.SH SYNOPSIS
.B x11vnc
.B x11vnc
[OPTION]...
[OPTION]...
...
@@ -253,6 +253,10 @@ option, otherwise the stderr goes to the viewer which
...
@@ -253,6 +253,10 @@ option, otherwise the stderr goes to the viewer which
will cause it to abort. Specifying both \fB-inetd\fR and \fB-q\fR
will cause it to abort. Specifying both \fB-inetd\fR and \fB-q\fR
and no \fB-o\fR will automatically close the stderr.
and no \fB-o\fR will automatically close the stderr.
.PP
.PP
\fB-filexfer\fR
.IP
Enable the TightVNC file transfer extension.
.PP
\fB-http\fR
\fB-http\fR
.IP
.IP
Instead of using \fB-httpdir\fR (see below) to specify
Instead of using \fB-httpdir\fR (see below) to specify
...
@@ -577,7 +581,9 @@ color with "gnome:", "kde:", "cde:" or "root:".
...
@@ -577,7 +581,9 @@ color with "gnome:", "kde:", "cde:" or "root:".
.IP
.IP
Black out rectangles on the screen. \fIstring\fR is a
Black out rectangles on the screen. \fIstring\fR is a
comma separated list of WxH+X+Y type geometries for
comma separated list of WxH+X+Y type geometries for
each rectangle.
each rectangle. If one of the items on the list is the
string "noptr" the mouse pointer will not be allowed
to go into a blacked out region.
.PP
.PP
\fB-xinerama\fR
\fB-xinerama\fR
.IP
.IP
...
@@ -1545,6 +1551,13 @@ text output. By default x11vnc will try to detect this
...
@@ -1545,6 +1551,13 @@ text output. By default x11vnc will try to detect this
no user input), and sleep up to 1.5 secs to let things
no user input), and sleep up to 1.5 secs to let things
"catch up". Use this option to disable that detection.
"catch up". Use this option to disable that detection.
.PP
.PP
\fB-slow_fb\fR \fItime\fR
.IP
Floating point time in seconds delay all screen polling.
For special purpose usage where a low frame rate is
acceptable and desirable, but you want the user input
processed at the normal rate so you cannot use \fB-wait.\fR
.PP
\fB-readtimeout\fR \fIn\fR
\fB-readtimeout\fR \fIn\fR
.IP
.IP
Set libvncserver rfbMaxClientWait to n seconds. On
Set libvncserver rfbMaxClientWait to n seconds. On
...
@@ -2190,6 +2203,8 @@ wait_bog disable \fB-nowait_bog\fR mode.
...
@@ -2190,6 +2203,8 @@ wait_bog disable \fB-nowait_bog\fR mode.
.IP
.IP
nowait_bog enable \fB-nowait_bog\fR mode.
nowait_bog enable \fB-nowait_bog\fR mode.
.IP
.IP
slow_fb:f set \fB-slow_fb\fR to f seconds.
.IP
readtimeout:n set read timeout to n seconds.
readtimeout:n set read timeout to n seconds.
.IP
.IP
nap enable \fB-nap\fR mode.
nap enable \fB-nap\fR mode.
...
@@ -2362,14 +2377,14 @@ xwarp noxwarppointer noxwarp buttonmap dragging
...
@@ -2362,14 +2377,14 @@ xwarp noxwarppointer noxwarp buttonmap dragging
nodragging wireframe_mode wireframe wf nowireframe
nodragging wireframe_mode wireframe wf nowireframe
nowf wirecopyrect wcr nowirecopyrect nowcr scr_area
nowf wirecopyrect wcr nowirecopyrect nowcr scr_area
scr_skip scr_inc scr_keys scr_term scr_keyrepeat
scr_skip scr_inc scr_keys scr_term scr_keyrepeat
scr_parms scrollcopyrect scr noscrollcopyrect
scr_parms scrollcopyrect scr noscrollcopyrect
noscr
noscr fixscreen noxrecord xrecord reset_record
fixscreen noxrecord xrecord reset_record pointer_mode
p
ointer_mode pm input_skip input client_inpu
t
p
m input_skip input client_input speeds wmd
t
speeds wmdt debug_pointer dp nodebug_pointer nodp
debug_pointer dp nodebug_pointer nodp debug_keyboard
d
ebug_keyboard dk nodebug_keyboard nodk deferupdate
d
k nodebug_keyboard nodk deferupdate defer wait_ui
defer wait_ui wait_bog nowait_bog wait readtimeout
wait_bog nowait_bog slow_fb wait readtimeout nap nonap
nap nonap sb screen_blank fs gaps grow fuzz
snapfb
sb screen_blank fs gaps grow fuzz snapfb no
snapfb
nosnapfb
rawfb progressive rfbport http nohttp httpport
rawfb progressive rfbport http nohttp httpport
httpdir enablehttpproxy noenablehttpproxy alwaysshared
httpdir enablehttpproxy noenablehttpproxy alwaysshared
noalwaysshared nevershared noalwaysshared dontdisconnect
noalwaysshared nevershared noalwaysshared dontdisconnect
nodontdisconnect desktop debug_xevents nodebug_xevents
nodontdisconnect desktop debug_xevents nodebug_xevents
...
...
x11vnc/x11vnc.c
View file @
30c00d0b
...
@@ -35,8 +35,8 @@
...
@@ -35,8 +35,8 @@
* respectively. To increase portability it is written in plain C.
* respectively. To increase portability it is written in plain C.
*
*
* Another goal is to improve performance and interactive response.
* Another goal is to improve performance and interactive response.
* The algorithm of x0rfbserver was used as a base.
Additional heuristics
* The algorithm of x0rfbserver was used as a base.
Many additional
* are also applied.
*
heuristics
are also applied.
*
*
* Another goal is to add many features that enable and incourage creative
* Another goal is to add many features that enable and incourage creative
* usage and application of the tool. Apologies for the large number
* usage and application of the tool. Apologies for the large number
...
@@ -163,6 +163,7 @@
...
@@ -163,6 +163,7 @@
* -DREMOTE_DEFAULT=0 to disable remote-control on by default (-yesremote).
* -DREMOTE_DEFAULT=0 to disable remote-control on by default (-yesremote).
* -DREMOTE_CONTROL=0 to disable remote-control mechanism completely.
* -DREMOTE_CONTROL=0 to disable remote-control mechanism completely.
* -DEXTERNAL_COMMANDS=0 to disable the running of all external commands.
* -DEXTERNAL_COMMANDS=0 to disable the running of all external commands.
* -DFILEXFER=1 enable -filexfer as the default.
*
*
* -DHARDWIRE_PASSWD=... hardwired passwords, quoting necessary.
* -DHARDWIRE_PASSWD=... hardwired passwords, quoting necessary.
* -DHARDWIRE_VIEWPASSWD=...
* -DHARDWIRE_VIEWPASSWD=...
...
@@ -397,7 +398,7 @@ double xdamage_scheduled_mark = 0.0;
...
@@ -397,7 +398,7 @@ double xdamage_scheduled_mark = 0.0;
sraRegionPtr xdamage_scheduled_mark_region = NULL;
sraRegionPtr xdamage_scheduled_mark_region = NULL;
/* date +'lastmod: %Y-%m-%d' */
/* date +'lastmod: %Y-%m-%d' */
char lastmod[] = "0.7.3 lastmod: 2005-
07-17
";
char lastmod[] = "0.7.3 lastmod: 2005-
10-22
";
int hack_val = 0;
int hack_val = 0;
/* X display info */
/* X display info */
...
@@ -669,7 +670,7 @@ void mark_hint(hint_t);
...
@@ -669,7 +670,7 @@ void mark_hint(hint_t);
void mark_rect_as_modified(int x1, int y1, int x2, int y2, int force);
void mark_rect_as_modified(int x1, int y1, int x2, int y2, int force);
enum rfbNewClientAction new_client(rfbClientPtr client);
enum rfbNewClientAction new_client(rfbClientPtr client);
void set_nofb_params(
void
);
void set_nofb_params(
int
);
void set_raw_fb_params(int);
void set_raw_fb_params(int);
void nofb_hook(rfbClientPtr client);
void nofb_hook(rfbClientPtr client);
void pointer(int mask, int x, int y, rfbClientPtr client);
void pointer(int mask, int x, int y, rfbClientPtr client);
...
@@ -786,6 +787,7 @@ int logfile_append = 0;
...
@@ -786,6 +787,7 @@ int logfile_append = 0;
char *flagfile = NULL; /* -flag */
char *flagfile = NULL; /* -flag */
char *passwdfile = NULL; /* -passwdfile */
char *passwdfile = NULL; /* -passwdfile */
char *blackout_str = NULL; /* -blackout */
char *blackout_str = NULL; /* -blackout */
int blackout_ptr = 0;
char *clip_str = NULL; /* -clip */
char *clip_str = NULL; /* -clip */
int use_solid_bg = 0; /* -solid */
int use_solid_bg = 0; /* -solid */
char *solid_str = NULL;
char *solid_str = NULL;
...
@@ -863,6 +865,10 @@ char *allowed_input_normal = NULL;
...
@@ -863,6 +865,10 @@ char *allowed_input_normal = NULL;
char *allowed_input_str = NULL;
char *allowed_input_str = NULL;
char *viewonly_passwd = NULL; /* view only passwd. */
char *viewonly_passwd = NULL; /* view only passwd. */
int inetd = 0; /* spawned from inetd(1) */
int inetd = 0; /* spawned from inetd(1) */
#ifndef FILEXFER
#define FILEXFER 0
#endif
int filexfer = FILEXFER;
int first_conn_timeout = 0; /* -timeout */
int first_conn_timeout = 0; /* -timeout */
int flash_cmap = 0; /* follow installed colormaps */
int flash_cmap = 0; /* follow installed colormaps */
int shift_cmap = 0; /* ncells < 256 and needs shift of pixel values */
int shift_cmap = 0; /* ncells < 256 and needs shift of pixel values */
...
@@ -980,9 +986,11 @@ typedef struct winattr {
...
@@ -980,9 +986,11 @@ typedef struct winattr {
winattr_t *stack_list = NULL;
winattr_t *stack_list = NULL;
int stack_list_len = 0;
int stack_list_len = 0;
int stack_list_num = 0;
int stack_list_num = 0;
#if 0
winattr_t *stack_clip = NULL;
winattr_t *stack_clip = NULL;
int stack_clip_len = 0;
int stack_clip_len = 0;
int stack_clip_num = 0;
int stack_clip_num = 0;
#endif
/* T+B+L+R,tkey+presist_key,tmouse+persist_mouse */
/* T+B+L+R,tkey+presist_key,tmouse+persist_mouse */
#ifndef SCROLL_COPYRECT_PARMS
#ifndef SCROLL_COPYRECT_PARMS
...
@@ -1104,6 +1112,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
...
@@ -1104,6 +1112,7 @@ int flip_byte_order = 0; /* sometimes needed when using_shm = 0 */
*/
*/
int waitms = 30;
int waitms = 30;
double wait_ui = 2.0;
double wait_ui = 2.0;
double slow_fb = 0.0;
int wait_bog = 1;
int wait_bog = 1;
int defer_update = 30; /* deferUpdateTime ms to wait before sends. */
int defer_update = 30; /* deferUpdateTime ms to wait before sends. */
int got_defer = 0;
int got_defer = 0;
...
@@ -6771,6 +6780,9 @@ void read_vnc_connect_prop(void) {
...
@@ -6771,6 +6780,9 @@ void read_vnc_connect_prop(void) {
;
;
} else if (strstr(vnc_connect_str, "ack=") == vnc_connect_str) {
} else if (strstr(vnc_connect_str, "ack=") == vnc_connect_str) {
;
;
} else if (quiet && strstr(vnc_connect_str, "qry=ping") ==
vnc_connect_str) {
;
} else if (strstr(vnc_connect_str, "cmd=") &&
} else if (strstr(vnc_connect_str, "cmd=") &&
strstr(vnc_connect_str, "passwd")) {
strstr(vnc_connect_str, "passwd")) {
rfbLog("read VNC_CONNECT: *\n");
rfbLog("read VNC_CONNECT: *\n");
...
@@ -10206,6 +10218,12 @@ void initialize_pointer_map(char *pointer_remap) {
...
@@ -10206,6 +10218,12 @@ void initialize_pointer_map(char *pointer_remap) {
}
}
}
}
typedef struct bout {
int x1, y1, x2, y2;
} blackout_t;
int blackouts;
blackout_t blackr[];
/*
/*
* For use in the -wireframe stuff, save the stacking order of the direct
* For use in the -wireframe stuff, save the stacking order of the direct
* children of the root window. Ideally done before we send ButtonPress
* children of the root window. Ideally done before we send ButtonPress
...
@@ -10214,7 +10232,7 @@ void initialize_pointer_map(char *pointer_remap) {
...
@@ -10214,7 +10232,7 @@ void initialize_pointer_map(char *pointer_remap) {
void snapshot_stack_list(int free_only, double allowed_age) {
void snapshot_stack_list(int free_only, double allowed_age) {
static double last_snap = 0.0, last_free = 0.0;
static double last_snap = 0.0, last_free = 0.0;
double now;
double now;
int num, rc, i;
int num, rc, i
, j
;
unsigned int ui;
unsigned int ui;
Window r, w;
Window r, w;
Window *list;
Window *list;
...
@@ -10253,19 +10271,40 @@ void snapshot_stack_list(int free_only, double allowed_age) {
...
@@ -10253,19 +10271,40 @@ void snapshot_stack_list(int free_only, double allowed_age) {
}
}
last_snap = now;
last_snap = now;
if (num > stack_list_len) {
if (num > stack_list_len
+ blackouts
) {
int n = 2*num;
int n = 2*num;
free(stack_list);
free(stack_list);
stack_list = (winattr_t *) malloc(n*sizeof(winattr_t));
stack_list = (winattr_t *) malloc(n*sizeof(winattr_t));
stack_list_len = n;
stack_list_len = n;
}
}
j = 0;
for (i=0; i<num; i++) {
for (i=0; i<num; i++) {
stack_list[i].win = list[i];
stack_list[j].win = list[i];
stack_list[i].fetched = 0;
stack_list[j].fetched = 0;
stack_list[i].valid = 0;
stack_list[j].valid = 0;
stack_list[i].time = now;
stack_list[j].time = now;
}
j++;
stack_list_num = num;
}
for (i=0; i<blackouts; i++) {
stack_list[j].win = 0x1;
stack_list[j].fetched = 1;
stack_list[j].valid = 1;
stack_list[j].x = blackr[i].x1;
stack_list[j].y = blackr[i].y1;
stack_list[j].width = blackr[i].x2 - blackr[i].x1;
stack_list[j].height = blackr[i].y2 - blackr[i].y1;
stack_list[j].time = now;
stack_list[j].map_state = IsViewable;
stack_list[j].rx = -1;
stack_list[j].ry = -1;
j++;
if (0) fprintf(stderr, "blackr: %d %dx%d+%d+%d\n", i,
stack_list[j-1].width, stack_list[j-1].height,
stack_list[j-1].x, stack_list[j-1].y);
}
stack_list_num = num + blackouts;
if (debug_wireframe > 1) {
if (debug_wireframe > 1) {
fprintf(stderr, "snapshot_stack_list: num=%d len=%d\n",
fprintf(stderr, "snapshot_stack_list: num=%d len=%d\n",
stack_list_num, stack_list_len);
stack_list_num, stack_list_len);
...
@@ -10291,7 +10330,9 @@ void update_stack_list(void) {
...
@@ -10291,7 +10330,9 @@ void update_stack_list(void) {
for (k=0; k < stack_list_num; k++) {
for (k=0; k < stack_list_num; k++) {
Window win = stack_list[k].win;
Window win = stack_list[k].win;
if (!valid_window(win, &attr, 1)) {
if (win != None && win < 10) {
; /* special, blackout */
} else if (!valid_window(win, &attr, 1)) {
stack_list[k].valid = 0;
stack_list[k].valid = 0;
} else {
} else {
stack_list[k].valid = 1;
stack_list[k].valid = 1;
...
@@ -10685,6 +10726,31 @@ void pointer(int mask, int x, int y, rfbClientPtr client) {
...
@@ -10685,6 +10726,31 @@ void pointer(int mask, int x, int y, rfbClientPtr client) {
last_pointer_client = client;
last_pointer_client = client;
last_pointer_time = now;
last_pointer_time = now;
if (blackout_ptr && blackouts) {
int b, ok = 1;
/* see if it goes into the blacked out region */
for (b=0; b < blackouts; b++) {
if (x < blackr[b].x1 || x > blackr[b].x2) {
continue;
}
if (y < blackr[b].y1 || y > blackr[b].y2) {
continue;
}
/* x1 <= x <= x2 and y1 <= y <= y2 */
ok = 0;
break;
}
if (! ok) {
if (debug_pointer) {
rfbLog("pointer(): blackout_ptr skipping "
"x=%d y=%d in rectangle %d,%d %d,%d\n", x, y,
blackr[b].x1, blackr[b].y1,
blackr[b].x2, blackr[b].y2);
}
return;
}
}
}
}
/*
/*
...
@@ -13694,6 +13760,18 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -13694,6 +13760,18 @@ char *process_remote_cmd(char *cmd, int stringonly) {
first_conn_timeout = to;
first_conn_timeout = to;
rfbLog("remote_cmd: set -timeout to %d\n", -to);
rfbLog("remote_cmd: set -timeout to %d\n", -to);
#if 0
} else if (!strcmp(p, "filexfer")) {
/* does this work after rfbInitServer? */
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, filexfer);
goto qry;
}
rfbLog("remote_cmd: enabling -filexfer.\n");
filexfer = 1;
rfbRegisterTightVNCFileTransferExtension();
#endif
} else if (!strcmp(p, "deny") || !strcmp(p, "lock")) {
} else if (!strcmp(p, "deny") || !strcmp(p, "lock")) {
if (query) {
if (query) {
snprintf(buf, bufn, "ans=%s:%d", p, deny_all);
snprintf(buf, bufn, "ans=%s:%d", p, deny_all);
...
@@ -14559,6 +14637,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -14559,6 +14637,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
rfbLog(" overlay, shm, noonetile, nap, cursor\n");
rfbLog(" overlay, shm, noonetile, nap, cursor\n");
rfbLog(" cursorpos, cursorshape, bell.\n");
rfbLog(" cursorpos, cursorshape, bell.\n");
nofb = 0;
nofb = 0;
set_nofb_params(1);
do_new_fb(1);
do_new_fb(1);
}
}
} else if (!strcmp(p, "nofb")) {
} else if (!strcmp(p, "nofb")) {
...
@@ -14574,7 +14653,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -14574,7 +14653,7 @@ char *process_remote_cmd(char *cmd, int stringonly) {
nofb = 1;
nofb = 1;
sound_bell = 0;
sound_bell = 0;
initialize_watch_bell();
initialize_watch_bell();
set_nofb_params();
set_nofb_params(
0
);
do_new_fb(1);
do_new_fb(1);
}
}
...
@@ -15491,6 +15570,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
...
@@ -15491,6 +15570,20 @@ char *process_remote_cmd(char *cmd, int stringonly) {
wait_bog = 0;
wait_bog = 0;
rfbLog("remote_cmd: setting wait_bog to %d\n", wait_bog);
rfbLog("remote_cmd: setting wait_bog to %d\n", wait_bog);
} else if (strstr(p, "slow_fb") == p) {
double w;
COLON_CHECK("slow_fb:")
if (query) {
snprintf(buf, bufn, "ans=%s%s%.2f", p, co, slow_fb);
goto qry;
}
p += strlen("slow_fb:");
w = atof(p);
if (w <= 0) w = 0.0;
rfbLog("remote_cmd: setting slow_fb factor %.2f -> %.2f\n",
slow_fb, w);
slow_fb = w;
} else if (strstr(p, "wait") == p) {
} else if (strstr(p, "wait") == p) {
int w;
int w;
COLON_CHECK("wait:")
COLON_CHECK("wait:")
...
@@ -18829,7 +18922,55 @@ void set_visual(char *str) {
...
@@ -18829,7 +18922,55 @@ void set_visual(char *str) {
visual_id = vinfo.visualid;
visual_id = vinfo.visualid;
}
}
void set_nofb_params(void) {
void set_nofb_params(int restore) {
static int first = 1;
static int save[100];
int i = 0;
if (first) {
first = 0;
save[i++] = use_xfixes;
save[i++] = use_xdamage;
save[i++] = use_xrecord;
save[i++] = wireframe;
save[i++] = use_solid_bg;
save[i++] = overlay;
save[i++] = overlay_cursor;
save[i++] = using_shm;
save[i++] = single_copytile;
save[i++] = take_naps;
save[i++] = measure_speeds;
save[i++] = grab_buster;
save[i++] = show_cursor;
save[i++] = cursor_shape_updates;
save[i++] = cursor_pos_updates;
}
if (restore) {
i = 0;
use_xfixes = save[i++];
use_xdamage = save[i++];
use_xrecord = save[i++];
wireframe = save[i++];
use_solid_bg = save[i++];
overlay = save[i++];
overlay_cursor = save[i++];
using_shm = save[i++];
single_copytile = save[i++];
take_naps = save[i++];
measure_speeds = save[i++];
grab_buster = save[i++];
show_cursor = save[i++];
cursor_shape_updates = save[i++];
cursor_pos_updates = save[i++];
if (cursor_shape_updates) {
restore_cursor_shape_updates(screen);
}
initialize_cursors_mode();
return;
}
use_xfixes = 0;
use_xfixes = 0;
use_xdamage = 0;
use_xdamage = 0;
use_xrecord = 0;
use_xrecord = 0;
...
@@ -20289,6 +20430,9 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
...
@@ -20289,6 +20430,9 @@ void initialize_screen(int *argc, char **argv, XImage *fb) {
screen->ptrAddEvent = pointer;
screen->ptrAddEvent = pointer;
screen->setXCutText = xcut_receive;
screen->setXCutText = xcut_receive;
if (filexfer) {
rfbRegisterTightVNCFileTransferExtension();
}
rfbInitServer(screen);
rfbInitServer(screen);
if (viewonly_passwd) {
if (viewonly_passwd) {
...
@@ -21013,10 +21157,7 @@ void solid_bg(int restore) {
...
@@ -21013,10 +21157,7 @@ void solid_bg(int restore) {
*/
*/
/* blacked-out region (-blackout, -xinerama) */
/* blacked-out region (-blackout, -xinerama) */
typedef struct bout {
#define BO_MAX 32
int x1, y1, x2, y2;
} blackout_t;
#define BO_MAX 16
typedef struct tbout {
typedef struct tbout {
blackout_t bo[BO_MAX]; /* hardwired max rectangles. */
blackout_t bo[BO_MAX]; /* hardwired max rectangles. */
int cover;
int cover;
...
@@ -21036,10 +21177,15 @@ void initialize_blackouts(char *list) {
...
@@ -21036,10 +21177,15 @@ void initialize_blackouts(char *list) {
char *p, *blist = strdup(list);
char *p, *blist = strdup(list);
int x, y, X, Y, h, w, t;
int x, y, X, Y, h, w, t;
blackouts = 0;
p = strtok(blist, ", \t");
p = strtok(blist, ", \t");
while (p) {
while (p) {
if (!strcmp("noptr", p)) {
blackout_ptr = 1;
rfbLog("pointer will be blocked from blackout "
"regions\n");
p = strtok(NULL, ", \t");
continue;
}
if (! parse_geom(p, &w, &h, &x, &y, dpy_x, dpy_y)) {
if (! parse_geom(p, &w, &h, &x, &y, dpy_x, dpy_y)) {
if (*p != '\0') {
if (*p != '\0') {
rfbLog("skipping invalid geometry: %s\n", p);
rfbLog("skipping invalid geometry: %s\n", p);
...
@@ -21325,6 +21471,10 @@ void initialize_xinerama (void) {
...
@@ -21325,6 +21471,10 @@ void initialize_xinerama (void) {
}
}
void initialize_blackouts_and_xinerama(void) {
void initialize_blackouts_and_xinerama(void) {
blackouts = 0;
blackout_ptr = 0;
if (blackout_str != NULL) {
if (blackout_str != NULL) {
initialize_blackouts(blackout_str);
initialize_blackouts(blackout_str);
}
}
...
@@ -23693,6 +23843,16 @@ int scan_for_updates(int count_only) {
...
@@ -23693,6 +23843,16 @@ int scan_for_updates(int count_only) {
double frac1 = 0.1; /* tweak parameter to try a 2nd scan_display() */
double frac1 = 0.1; /* tweak parameter to try a 2nd scan_display() */
double frac2 = 0.35; /* or 3rd */
double frac2 = 0.35; /* or 3rd */
double frac3 = 0.02; /* do scan_display() again after copy_tiles() */
double frac3 = 0.02; /* do scan_display() again after copy_tiles() */
static double last_poll = 0.0;
if (slow_fb > 0.0) {
double now = dnow();
if (now < last_poll + slow_fb) {
return 0;
}
last_poll = now;
}
for (i=0; i < ntiles; i++) {
for (i=0; i < ntiles; i++) {
tile_has_diff[i] = 0;
tile_has_diff[i] = 0;
tile_has_xdamage_diff[i] = 0;
tile_has_xdamage_diff[i] = 0;
...
@@ -24130,12 +24290,16 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int start_x11vnc,
...
@@ -24130,12 +24290,16 @@ void run_gui(char *gui_xdisplay, int connect_to_x11vnc, int start_x11vnc,
}
}
usleep(2200*1000);
usleep(2200*1000);
fprintf(stderr, "\n");
fprintf(stderr, "\n");
rfbLog("gui: trying to contact a x11vnc server at X display "
if (!quiet) {
"%s ...\n", NONUL(x11vnc_xdisplay));
rfbLog("gui: trying to contact a x11vnc server at X"
" display %s ...\n", NONUL(x11vnc_xdisplay));
}
for (i=0; i<try_max; i++) {
for (i=0; i<try_max; i++) {
usleep(sleep*1000);
usleep(sleep*1000);
rfbLog("gui: pinging %s try=%d ...\n",
if (!quiet) {
NONUL(x11vnc_xdisplay), i+1);
rfbLog("gui: pinging %s try=%d ...\n",
NONUL(x11vnc_xdisplay), i+1);
}
rc = send_remote_cmd("qry=ping", 1, 1);
rc = send_remote_cmd("qry=ping", 1, 1);
if (rc == 0) {
if (rc == 0) {
break;
break;
...
@@ -24424,7 +24588,10 @@ void do_gui(char *opts, int sleep) {
...
@@ -24424,7 +24588,10 @@ void do_gui(char *opts, int sleep) {
" to display on.\n");
" to display on.\n");
exit(1);
exit(1);
}
}
fprintf(stderr, "starting gui, trying display: %s\n", gui_xdisplay);
if (!quiet) {
fprintf(stderr, "starting gui, trying display: %s\n",
gui_xdisplay);
}
test_dpy = XOpenDisplay(gui_xdisplay);
test_dpy = XOpenDisplay(gui_xdisplay);
if (! test_dpy && auth_file) {
if (! test_dpy && auth_file) {
if (getenv("XAUTHORITY") != NULL) {
if (getenv("XAUTHORITY") != NULL) {
...
@@ -27389,6 +27556,17 @@ int try_copyrect(Window frame, int x, int y, int w, int h, int dx, int dy,
...
@@ -27389,6 +27556,17 @@ int try_copyrect(Window frame, int x, int y, int w, int h, int dx, int dy,
y2 = crfix(nfix(y+h, dpy_y+1), dy, dpy_y+1);
y2 = crfix(nfix(y+h, dpy_y+1), dy, dpy_y+1);
rect = sraRgnCreateRect(x1, y1, x2, y2);
rect = sraRgnCreateRect(x1, y1, x2, y2);
if (blackouts) {
int i;
sraRegionPtr bo_rect;
for (i=0; i<blackouts; i++) {
bo_rect = sraRgnCreateRect(blackr[i].x1,
blackr[i].y1, blackr[i].x2, blackr[i].y2);
sraRgnSubtract(rect, bo_rect);
sraRgnDestroy(bo_rect);
}
}
do_copyregion(rect, dx, dy);
do_copyregion(rect, dx, dy);
sraRgnDestroy(rect);
sraRgnDestroy(rect);
...
@@ -27440,12 +27618,17 @@ saw_me = 1; fprintf(stderr, " ----------\n");
...
@@ -27440,12 +27618,17 @@ saw_me = 1; fprintf(stderr, " ----------\n");
break;
break;
}
}
}
}
#if 0
fprintf(stderr, "bo: %d/%lx\n", k, swin);
#endif
/* skip some unwanted cases: */
/* skip some unwanted cases: */
if (swin == None) {
if (swin == None) {
continue;
continue;
}
}
if (! stack_list[k].fetched ||
if (swin < 10) {
; /* blackouts */
} else if (! stack_list[k].fetched ||
stack_list[k].time > tm + 2.0) {
stack_list[k].time > tm + 2.0) {
if (!valid_window(swin, &attr, 1)) {
if (!valid_window(swin, &attr, 1)) {
stack_list[k].valid = 0;
stack_list[k].valid = 0;
...
@@ -29214,6 +29397,8 @@ void measure_send_rates(int init) {
...
@@ -29214,6 +29397,8 @@ void measure_send_rates(int init) {
rfbClientPtr cl;
rfbClientPtr cl;
int db = 0, msg = 0;
int db = 0, msg = 0;
db = 0;
if (! measure_speeds) {
if (! measure_speeds) {
return;
return;
}
}
...
@@ -30090,6 +30275,7 @@ static void print_help(int mode) {
...
@@ -30090,6 +30275,7 @@ static void print_help(int mode) {
" option, otherwise the stderr goes to the viewer which\n"
" option, otherwise the stderr goes to the viewer which\n"
" will cause it to abort. Specifying both -inetd and -q\n"
" will cause it to abort. Specifying both -inetd and -q\n"
" and no -o will automatically close the stderr.\n"
" and no -o will automatically close the stderr.\n"
"-filexfer Enable the TightVNC file transfer extension.\n"
"-http Instead of using -httpdir (see below) to specify\n"
"-http Instead of using -httpdir (see below) to specify\n"
" where the Java vncviewer applet is, have x11vnc try\n"
" where the Java vncviewer applet is, have x11vnc try\n"
" to *guess* where the directory is by looking relative\n"
" to *guess* where the directory is by looking relative\n"
...
@@ -30336,7 +30522,9 @@ static void print_help(int mode) {
...
@@ -30336,7 +30522,9 @@ static void print_help(int mode) {
" color with \"gnome:\", \"kde:\", \"cde:\" or \"root:\".\n"
" color with \"gnome:\", \"kde:\", \"cde:\" or \"root:\".\n"
"-blackout string Black out rectangles on the screen. \"string\" is a\n"
"-blackout string Black out rectangles on the screen. \"string\" is a\n"
" comma separated list of WxH+X+Y type geometries for\n"
" comma separated list of WxH+X+Y type geometries for\n"
" each rectangle.\n"
" each rectangle. If one of the items on the list is the\n"
" string \"noptr\" the mouse pointer will not be allowed\n"
" to go into a blacked out region.\n"
"-xinerama If your screen is composed of multiple monitors\n"
"-xinerama If your screen is composed of multiple monitors\n"
" glued together via XINERAMA, and that screen is\n"
" glued together via XINERAMA, and that screen is\n"
" not a rectangle this option will try to guess the\n"
" not a rectangle this option will try to guess the\n"
...
@@ -31133,6 +31321,10 @@ static void print_help(int mode) {
...
@@ -31133,6 +31321,10 @@ static void print_help(int mode) {
" (3 screen polls in a row each longer than 0.25 sec with\n"
" (3 screen polls in a row each longer than 0.25 sec with\n"
" no user input), and sleep up to 1.5 secs to let things\n"
" no user input), and sleep up to 1.5 secs to let things\n"
" \"catch up\". Use this option to disable that detection.\n"
" \"catch up\". Use this option to disable that detection.\n"
"-slow_fb time Floating point time in seconds delay all screen polling.\n"
" For special purpose usage where a low frame rate is\n"
" acceptable and desirable, but you want the user input\n"
" processed at the normal rate so you cannot use -wait.\n"
"-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On\n"
"-readtimeout n Set libvncserver rfbMaxClientWait to n seconds. On\n"
" slow links that take a long time to paint the first\n"
" slow links that take a long time to paint the first\n"
" screen libvncserver may hit the timeout and drop the\n"
" screen libvncserver may hit the timeout and drop the\n"
...
@@ -31583,6 +31775,7 @@ static void print_help(int mode) {
...
@@ -31583,6 +31775,7 @@ static void print_help(int mode) {
" wait_ui:f set -wait_ui factor to f.\n"
" wait_ui:f set -wait_ui factor to f.\n"
" wait_bog disable -nowait_bog mode.\n"
" wait_bog disable -nowait_bog mode.\n"
" nowait_bog enable -nowait_bog mode.\n"
" nowait_bog enable -nowait_bog mode.\n"
" slow_fb:f set -slow_fb to f seconds.\n"
" readtimeout:n set read timeout to n seconds.\n"
" readtimeout:n set read timeout to n seconds.\n"
" nap enable -nap mode.\n"
" nap enable -nap mode.\n"
" nonap disable -nap mode.\n"
" nonap disable -nap mode.\n"
...
@@ -31696,14 +31889,14 @@ static void print_help(int mode) {
...
@@ -31696,14 +31889,14 @@ static void print_help(int mode) {
" nodragging wireframe_mode wireframe wf nowireframe\n"
" nodragging wireframe_mode wireframe wf nowireframe\n"
" nowf wirecopyrect wcr nowirecopyrect nowcr scr_area\n"
" nowf wirecopyrect wcr nowirecopyrect nowcr scr_area\n"
" scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n"
" scr_skip scr_inc scr_keys scr_term scr_keyrepeat\n"
" scr_parms scrollcopyrect scr noscrollcopyrect\n"
" scr_parms scrollcopyrect scr noscrollcopyrect
noscr
\n"
"
noscr fixscreen noxrecord xrecord reset_record
\n"
"
fixscreen noxrecord xrecord reset_record pointer_mode
\n"
" p
ointer_mode pm input_skip input client_inpu
t\n"
" p
m input_skip input client_input speeds wmd
t\n"
"
speeds wmdt debug_pointer dp nodebug_pointer nodp
\n"
"
debug_pointer dp nodebug_pointer nodp debug_keyboard
\n"
" d
ebug_keyboard dk nodebug_keyboard nodk deferupdate
\n"
" d
k nodebug_keyboard nodk deferupdate defer wait_ui
\n"
"
defer wait_ui wait_bog nowait_bog wait readtimeout
\n"
"
wait_bog nowait_bog slow_fb wait readtimeout nap nonap
\n"
"
nap nonap sb screen_blank fs gaps grow fuzz
snapfb\n"
"
sb screen_blank fs gaps grow fuzz snapfb no
snapfb\n"
"
nosnapfb
rawfb progressive rfbport http nohttp httpport\n"
" rawfb progressive rfbport http nohttp httpport\n"
" httpdir enablehttpproxy noenablehttpproxy alwaysshared\n"
" httpdir enablehttpproxy noenablehttpproxy alwaysshared\n"
" noalwaysshared nevershared noalwaysshared dontdisconnect\n"
" noalwaysshared nevershared noalwaysshared dontdisconnect\n"
" nodontdisconnect desktop debug_xevents nodebug_xevents\n"
" nodontdisconnect desktop debug_xevents nodebug_xevents\n"
...
@@ -32385,6 +32578,7 @@ void print_settings(int try_http, int bg, char *gui_str) {
...
@@ -32385,6 +32578,7 @@ void print_settings(int try_http, int bg, char *gui_str) {
fprintf(stderr, " conn_once: %d\n", connect_once);
fprintf(stderr, " conn_once: %d\n", connect_once);
fprintf(stderr, " timeout: %d\n", first_conn_timeout);
fprintf(stderr, " timeout: %d\n", first_conn_timeout);
fprintf(stderr, " inetd: %d\n", inetd);
fprintf(stderr, " inetd: %d\n", inetd);
fprintf(stderr, " filexfer: %d\n", filexfer);
fprintf(stderr, " http: %d\n", try_http);
fprintf(stderr, " http: %d\n", try_http);
fprintf(stderr, " connect: %s\n", client_connect
fprintf(stderr, " connect: %s\n", client_connect
? client_connect : "null");
? client_connect : "null");
...
@@ -32498,6 +32692,7 @@ void print_settings(int try_http, int bg, char *gui_str) {
...
@@ -32498,6 +32692,7 @@ void print_settings(int try_http, int bg, char *gui_str) {
fprintf(stderr, " waitms: %d\n", waitms);
fprintf(stderr, " waitms: %d\n", waitms);
fprintf(stderr, " wait_ui: %.2f\n", wait_ui);
fprintf(stderr, " wait_ui: %.2f\n", wait_ui);
fprintf(stderr, " nowait_bog: %d\n", !wait_bog);
fprintf(stderr, " nowait_bog: %d\n", !wait_bog);
fprintf(stderr, " slow_fb: %.2f\n", slow_fb);
fprintf(stderr, " readtimeout: %d\n", rfbMaxClientWait/1000);
fprintf(stderr, " readtimeout: %d\n", rfbMaxClientWait/1000);
fprintf(stderr, " take_naps: %d\n", take_naps);
fprintf(stderr, " take_naps: %d\n", take_naps);
fprintf(stderr, " sb: %d\n", screen_blank);
fprintf(stderr, " sb: %d\n", screen_blank);
...
@@ -32590,20 +32785,27 @@ void nopassword_warning_msg(int gotloc) {
...
@@ -32590,20 +32785,27 @@ void nopassword_warning_msg(int gotloc) {
"#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#\n"
"#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#\n"
"###############################################################\n"
"###############################################################\n"
;
;
if (quiet) {
char str5[] =
"###############################################################\n\n"
;
if (inetd) {
return;
return;
}
}
fprintf(stderr, "%s", str1);
fprintf(stderr, "%s", str1);
fflush(stderr);
fflush(stderr);
#if !PASSWD_REQUIRED
#if !PASSWD_REQUIRED
usleep(2
0
00 * 1000);
usleep(2
5
00 * 1000);
#endif
#endif
fprintf(stderr, "%s", str2);
if (!quiet) {
if (gotloc) {
fprintf(stderr, "%s", str2);
fprintf(stderr, "%s", str3);
if (gotloc) {
fprintf(stderr, "%s", str3);
}
fprintf(stderr, "%s", str4);
} else {
fprintf(stderr, "%s", str5);
}
}
fprintf(stderr, "%s", str4);
fflush(stderr);
fflush(stderr);
#if !PASSWD_REQUIRED
#if !PASSWD_REQUIRED
usleep(500 * 1000);
usleep(500 * 1000);
...
@@ -32763,6 +32965,8 @@ int main(int argc, char* argv[]) {
...
@@ -32763,6 +32965,8 @@ int main(int argc, char* argv[]) {
users_list = strdup(argv[++i]);
users_list = strdup(argv[++i]);
} else if (!strcmp(arg, "-inetd")) {
} else if (!strcmp(arg, "-inetd")) {
inetd = 1;
inetd = 1;
} else if (!strcmp(arg, "-filexfer")) {
filexfer = 1;
} else if (!strcmp(arg, "-http")) {
} else if (!strcmp(arg, "-http")) {
try_http = 1;
try_http = 1;
} else if (!strcmp(arg, "-connect")) {
} else if (!strcmp(arg, "-connect")) {
...
@@ -33103,6 +33307,9 @@ int main(int argc, char* argv[]) {
...
@@ -33103,6 +33307,9 @@ int main(int argc, char* argv[]) {
wait_ui = atof(argv[++i]);
wait_ui = atof(argv[++i]);
} else if (!strcmp(arg, "-nowait_bog")) {
} else if (!strcmp(arg, "-nowait_bog")) {
wait_bog = 0;
wait_bog = 0;
} else if (!strcmp(arg, "-slow_fb")) {
CHECK_ARGC
slow_fb = atof(argv[++i]);
} else if (!strcmp(arg, "-readtimeout")) {
} else if (!strcmp(arg, "-readtimeout")) {
CHECK_ARGC
CHECK_ARGC
rfbMaxClientWait = atoi(argv[++i]) * 1000;
rfbMaxClientWait = atoi(argv[++i]) * 1000;
...
@@ -33283,6 +33490,7 @@ int main(int argc, char* argv[]) {
...
@@ -33283,6 +33490,7 @@ int main(int argc, char* argv[]) {
}
}
}
}
}
}
if (launch_gui && (query_cmd || remote_cmd)) {
if (launch_gui && (query_cmd || remote_cmd)) {
launch_gui = 0;
launch_gui = 0;
gui_str = NULL;
gui_str = NULL;
...
@@ -33472,7 +33680,8 @@ int main(int argc, char* argv[]) {
...
@@ -33472,7 +33680,8 @@ int main(int argc, char* argv[]) {
exit(1);
exit(1);
}
}
if (!got_passwd && !got_rfbauth && !got_passwdfile) {
if (!got_passwd && !got_rfbauth && !got_passwdfile &&
!query_cmd && !remote_cmd) {
char message[] =
char message[] =
"-rfbauth, -passwdfile, or -passwd password required.";
"-rfbauth, -passwdfile, or -passwd password required.";
if (! nopw) {
if (! nopw) {
...
@@ -33569,7 +33778,7 @@ int main(int argc, char* argv[]) {
...
@@ -33569,7 +33778,7 @@ int main(int argc, char* argv[]) {
if (nofb) {
if (nofb) {
/* disable things that do not make sense with no fb */
/* disable things that do not make sense with no fb */
set_nofb_params();
set_nofb_params(
0
);
if (! got_deferupdate && ! got_defer) {
if (! got_deferupdate && ! got_defer) {
/* reduce defer time under -nofb */
/* reduce defer time under -nofb */
...
...
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