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
7e7ef1b4
Commit
7e7ef1b4
authored
Feb 01, 2008
by
runge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x11vnc: during speeds estimate, guard against client disconnecting.
parent
c17aef31
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1680 additions
and
1734 deletions
+1680
-1734
ChangeLog
x11vnc/ChangeLog
+4
-0
README
x11vnc/README
+1138
-1059
connections.c
x11vnc/connections.c
+1
-0
help.c
x11vnc/help.c
+4
-3
README
x11vnc/misc/enhanced_tightvnc_viewer/README
+9
-1
ss_vncviewer
x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
+3
-1
ssvnc.tcl
x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl
+6
-0
tight-vncviewer-full.patch
...ed_tightvnc_viewer/src/patches/tight-vncviewer-full.patch
+448
-655
rates.c
x11vnc/rates.c
+55
-10
ssltools.h
x11vnc/ssltools.h
+5
-1
x11vnc.1
x11vnc/x11vnc.1
+4
-3
x11vnc.h
x11vnc/x11vnc.h
+1
-0
x11vnc_defs.c
x11vnc/x11vnc_defs.c
+2
-1
No files found.
x11vnc/ChangeLog
View file @
7e7ef1b4
2008-01-31 Karl Runge <runge@karlrunge.com>
* x11vnc: during speeds estimate, guard against client
disconnecting. ssvnc sync.
2008-01-14 Karl Runge <runge@karlrunge.com>
* x11vnc: -ping option, fix memory corruption in copy_tiles
after xrandr resize.
...
...
x11vnc/README
View file @
7e7ef1b4
This source diff could not be displayed because it is too large. You can
view the blob
instead.
x11vnc/connections.c
View file @
7e7ef1b4
...
...
@@ -672,6 +672,7 @@ void client_gone(rfbClientPtr client) {
speeds_net_latency_measured
=
0
;
rfbLog
(
"client_count: %d
\n
"
,
client_count
);
last_client_gone
=
dnow
();
if
(
unixpw_in_progress
&&
unixpw_client
)
{
if
(
client
==
unixpw_client
)
{
...
...
x11vnc/help.c
View file @
7e7ef1b4
...
...
@@ -342,7 +342,7 @@ void print_help(int mode) {
" background, for example, usage of -display WAIT:..,
\n
"
" -svc, and -connect can make use of this
\"
poor man's
\"\n
"
" inetd mode. The default wait time is 500ms in this
\n
"
" mode. This usage could use useful: -svc -loopbg
\n
"
" mode. This usage could use useful: -svc -
bg -
loopbg
\n
"
"
\n
"
"-timeout n Exit unless a client connects within the first n seconds
\n
"
" after startup.
\n
"
...
...
@@ -3189,7 +3189,8 @@ void print_help(int mode) {
" If there is trouble with mmap, use
\"
file:/...
\"\n
"
" for slower lseek(2) based reading. Use
\"
snap:...
\"\n
"
" to imply -snapfb mode and the
\"
file:
\"
access (this
\n
"
" is for devices that only provide the fb all at once).
\n
"
" is for unseekable devices that only provide the fb all
\n
"
" at once, e.g. a video camera provides the whole frame).
\n
"
"
\n
"
" For shared memory segments string is of the form:
\n
"
"
\"
shm:N@WxHxB
\"
which specifies a shmid N and with
\n
"
...
...
@@ -4854,7 +4855,7 @@ void print_license(void) {
"
\n
"
"x11vnc: a VNC server for X displays. %s
\n
"
"
\n
"
"Copyright (c) 2002-200
6
Karl J. Runge <runge@karlrunge.com>
\n
"
"Copyright (c) 2002-200
8
Karl J. Runge <runge@karlrunge.com>
\n
"
"All rights reserved.
\n
"
"
\n
"
;
...
...
x11vnc/misc/enhanced_tightvnc_viewer/README
View file @
7e7ef1b4
Enhanced TightVNC Viewer (SSVNC: SSL/SSH VNC viewer)
Copyright (c) 2006-200
7
Karl J. Runge <runge@karlrunge.com>
Copyright (c) 2006-200
8
Karl J. Runge <runge@karlrunge.com>
All rights reserved.
These bundles provide 1) An enhanced TightVNC Viewer on Unix, 2) Binaries
...
...
@@ -338,6 +338,14 @@ on a USB flash drive that you carry around for mobile use and you want
the profiles you create to stay with the drive (otherwise you'd have to
browse to the drive directory each time you load or save).
One user on Windows created a BAT file to launch SSVNC and needed to
do this to get the Home directory correct:
cd \ssvnc\Windows
start \ssvnc\Windows\ssvnc.exe
(an optional profile name can be supplied to the ssvnc.exe line)
WARNING: if you use ssvnc from an "Internet Cafe", i.e. an untrusted
computer, an intruder may be capturing keystrokes etc.
...
...
x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ss_vncviewer
View file @
7e7ef1b4
...
...
@@ -354,7 +354,9 @@ disp=`echo "$orig" | awk -F: '{print $2}'`
if [ "X$host" = "X" ]; then
host=localhost
fi
if [ $disp -lt 0 ]; then
if [ "X$disp" = "X" ]; then
port="" # probably -listen mode.
elif [ $disp -lt 0 ]; then
# negative means use |n| without question:
port=`expr 0 - $disp`
elif [ $disp -lt 200 ]; then
...
...
x11vnc/misc/enhanced_tightvnc_viewer/bin/util/ssvnc.tcl
View file @
7e7ef1b4
...
...
@@ -734,6 +734,12 @@ proc help {} {
directory you want. It can be set after starting ssvnc by putting
HOME=/path/to/dir in the Host:Display box and clicking
"Connect"
.
For a Windows BAT file to get the
"Home"
directory correct
something like this might be needed:
cd
\s
svnc
\W
indows
start
\s
svnc
\W
indows
\s
svnc.exe
11) Dynamic VNC Server Port determination and redirection: If you
are running SSVNC on Unix and are using SSH to start the remote
VNC server and the VNC server prints out the line
"PORT=NNNN"
...
...
x11vnc/misc/enhanced_tightvnc_viewer/src/patches/tight-vncviewer-full.patch
View file @
7e7ef1b4
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncviewer/Vncviewer
--- vnc_unixsrc.orig/vncviewer/Vncviewer 2003-02-07 05:30:57.000000000 -0500
+++ vnc_unixsrc/vncviewer/Vncviewer 200
7-04-05 23:13:59.000000000 -04
00
+++ vnc_unixsrc/vncviewer/Vncviewer 200
8-01-03 17:10:12.000000000 -05
00
@@ -5,9 +5,9 @@
!
...
...
@@ -21,7 +21,27 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview
<ButtonPress>: SendRFBEvent()\n\
<ButtonRelease>: SendRFBEvent()\n\
<Motion>: SendRFBEvent()\n\
@@ -77,9 +78,9 @@
@@ -72,17 +73,39 @@
*passwordDialog.dialog.value.translations: #override\n\
<Key>Return: PasswordDialogDone()
+*ycropDialog.dialog.label: Y Crop (max-height in pixels):
+*ycropDialog.dialog.value:
+*ycropDialog.dialog.value.translations: #override\\n\
+ <Key>Return: YCropDialogDone()
+
+*scbarDialog.dialog.label: Scroll Bars width:
+*scbarDialog.dialog.value:
+*scbarDialog.dialog.value.translations: #override\\n\
+ <Key>Return: ScbarDialogDone()
+
+*scaleDialog.dialog.label: Integer n for 1/n server scaling:
+*scaleDialog.dialog.value:
+*scaleDialog.dialog.value.translations: #override\\n\
+ <Key>Return: ScaleDialogDone()
+
!
! Popup window appearance
!
...
...
@@ -33,12 +53,22 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview
*popup.buttonForm.Command.borderWidth: 0
*popup.buttonForm.Toggle.borderWidth: 0
@@ -96,43 +97,160 @@
+*scaleN.title: 1/n scale
+*scaleN*background: grey
+*scaleN*font_old: -*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*
+*scaleN*font: -*-helvetica-medium-r-*-*-12-*-*-*-*-*-*-*
+*scaleN.buttonForm.Command.borderWidth: 0
+*scaleN.buttonForm.Toggle.borderWidth: 0
+
!
! Translations on popup window - send key presses through
!
@@ -96,43 +119,172 @@
! Popup buttons
!
-*popupButtonCount: 8
+*popupButtonCount:
28
+*popupButtonCount:
31
*popup*button1.label: Dismiss popup
-*popup*button1.translations: #override\n\
...
...
@@ -148,79 +178,91 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/Vncviewer vnc_unixsrc/vncview
+ <Visible>: SetNOJPEGState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleJPEG() HidePopup()
+
+*popup*button17.label:
Prefer raw for localhost
+*popup*button17.label:
Full Color
+*popup*button17.type: toggle
+*popup*button17.translations: #override\\n\
+ <Visible>: SetRawLocalState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleRawLocal() HidePopup()
+
+*popup*button18.label: Full Color
+*popup*button18.type: toggle
+*popup*button18.translations: #override\\n\
+ <Visible>: SetFullColorState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleFullColor() HidePopup()
+
+*popup*button1
9
.label: Grey Scale (16 & 8-bpp)
+*popup*button1
9
.type: toggle
+*popup*button1
9
.translations: #override\\n\
+*popup*button1
8
.label: Grey Scale (16 & 8-bpp)
+*popup*button1
8
.type: toggle
+*popup*button1
8
.translations: #override\\n\
+ <Visible>: SetGreyScaleState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleGreyScale() HidePopup()
+
+*popup*button
20
.label: 16 bit color (BGR565)
+*popup*button
20
.type: toggle
+*popup*button
20
.translations: #override\\n\
+*popup*button
19
.label: 16 bit color (BGR565)
+*popup*button
19
.type: toggle
+*popup*button
19
.translations: #override\\n\
+ <Visible>: Set16bppState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle16bpp() HidePopup()
+
+*popup*button2
1
.label: 8 bit color (BGR233)
+*popup*button2
1
.type: toggle
+*popup*button2
1
.translations: #override\\n\
+*popup*button2
0
.label: 8 bit color (BGR233)
+*popup*button2
0
.type: toggle
+*popup*button2
0
.translations: #override\\n\
+ <Visible>: Set8bppState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle8bpp() HidePopup()
+
+*popup*button2
2
.label: - 256 colors
+*popup*button2
2
.type: toggle
+*popup*button2
2
.translations: #override\\n\
+*popup*button2
1
.label: - 256 colors
+*popup*button2
1
.type: toggle
+*popup*button2
1
.translations: #override\\n\
+ <Visible>: Set256ColorsState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle256Colors() HidePopup()
+
+*popup*button2
3
.label: - 64 colors
+*popup*button2
3
.type: toggle
+*popup*button2
3
.translations: #override\\n\
+*popup*button2
2
.label: - 64 colors
+*popup*button2
2
.type: toggle
+*popup*button2
2
.translations: #override\\n\
+ <Visible>: Set64ColorsState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle64Colors() HidePopup()
+
+*popup*button2
4
.label: - 8 colors
+*popup*button2
4
.type: toggle
+*popup*button2
4
.translations: #override\\n\
+*popup*button2
3
.label: - 8 colors
+*popup*button2
3
.type: toggle
+*popup*button2
3
.translations: #override\\n\
+ <Visible>: Set8ColorsState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle8Colors() HidePopup()
+
+*popup*button25.label: Disable Remote Input
+*popup*button25.type: toggle
+*popup*button24.label: Set Y Crop (y-max)
+*popup*button24.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>: HidePopup() SetYCrop()
+
+*popup*button25.label: Set Scrollbar Width
+*popup*button25.translations: #override\\n\
+ <Visible>: SetServerInputState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleServerInput() HidePopup()
+ <Btn1Down>,<Btn1Up>: HidePopup() SetScbar()
+
+*popup*button26.label: Single Window
+*popup*button26.type: toggle
+*popup*button26.label: UltraVNC Extensions:
+*popup*button26.translations: #override\\n\
+ <Visible>: SetSingleWindowState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleSingleWindow() HidePopup()
+ <Btn1Down>,<Btn1Up>: HidePopup()
+
+*popup*button27.label: Set 1/n Server Scale
+*popup*button27.label:
-
Set 1/n Server Scale
+*popup*button27.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>:
DoServerScale() HidePopup
()
+ <Btn1Down>,<Btn1Up>:
HidePopup() ShowScaleN
()
+
+*popup*button28.label: Text Chat
+*popup*button28.label:
-
Text Chat
+*popup*button28.type: toggle
+*popup*button28.translations: #override\\n\
+ <Visible>: SetTextChatState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleTextChat() HidePopup()
+
+*popup*button29.label: - File Transfer
+*popup*button29.type: toggle
+*popup*button29.translations: #override\\n\
+ <Visible>: SetFileXferState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleFileXfer() HidePopup()
+
+*popup*button30.label: - Single Window
+*popup*button30.type: toggle
+*popup*button30.translations: #override\\n\
+ <Visible>: SetSingleWindowState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleSingleWindow() HidePopup()
+
+*popup*button31.label: - Disable Remote Input
+*popup*button31.type: toggle
+*popup*button31.translations: #override\\n\
+ <Visible>: SetServerInputState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleServerInput() HidePopup()
+
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/vncviewer/argsresources.c
--- vnc_unixsrc.orig/vncviewer/argsresources.c 2007-02-04 17:10:31.000000000 -0500
+++ vnc_unixsrc/vncviewer/argsresources.c 200
7-05-30 23:52:19.000000000 -04
00
+++ vnc_unixsrc/vncviewer/argsresources.c 200
8-01-03 18:41:17.000000000 -05
00
@@ -31,7 +31,7 @@
char *fallback_resources[] = {
...
...
@@ -246,7 +288,28 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
<ButtonPress>: SendRFBEvent()\\n\
<ButtonRelease>: SendRFBEvent()\\n\
<Motion>: SendRFBEvent()\\n\
@@ -64,17 +70,25 @@
@@ -58,23 +64,46 @@
"*serverDialog.dialog.value.translations: #override\\n\
<Key>Return: ServerDialogDone()",
+ "*ycropDialog.dialog.label: Y Crop (max-height in pixels):",
+ "*ycropDialog.dialog.value:",
+ "*ycropDialog.dialog.value.translations: #override\\n\
+ <Key>Return: YCropDialogDone()",
+
+ "*scbarDialog.dialog.label: Scroll Bars width:",
+ "*scbarDialog.dialog.value:",
+ "*scbarDialog.dialog.value.translations: #override\\n\
+ <Key>Return: ScbarDialogDone()",
+
+ "*scaleDialog.dialog.label: Integer n for 1/n server scaling:",
+ "*scaleDialog.dialog.value:",
+ "*scaleDialog.dialog.value.translations: #override\\n\
+ <Key>Return: ScaleDialogDone()",
+
"*passwordDialog.dialog.label: Password:",
"*passwordDialog.dialog.value:",
"*passwordDialog.dialog.value.AsciiSink.echo: False",
"*passwordDialog.dialog.value.translations: #override\\n\
<Key>Return: PasswordDialogDone()",
...
...
@@ -271,11 +334,11 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
<KeyPress>: SendRFBEvent() HidePopup()",
- "*popupButtonCount: 8",
+ "*popupButtonCount:
29
",
+ "*popupButtonCount:
31
",
"*popup*button1.label: Dismiss popup",
"*popup*button1.translations: #override\\n\
@@ -84,7 +
98
,7 @@
@@ -84,7 +
113
,7 @@
"*popup*button2.translations: #override\\n\
<Btn1Down>,<Btn1Up>: Quit()",
...
...
@@ -284,7 +347,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
"*popup*button3.type: toggle",
"*popup*button3.translations: #override\\n\
<Visible>: SetFullScreenState()\\n\
@@ -115,9 +1
29,172
@@
@@ -115,9 +1
44,180
@@
"*popup*button8.translations: #override\\n\
<Btn1Down>,<Btn1Up>: SendRFBEvent(key,F8) HidePopup()",
...
...
@@ -376,35 +439,43 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ <Visible>: Set8ColorsState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() Toggle8Colors() HidePopup()",
+
+ "*popup*button24.label:
UltraVNC Extensions:
",
+ "*popup*button24.label:
Set Y Crop (y-max)
",
+ "*popup*button24.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>: HidePopup()",
+ <Btn1Down>,<Btn1Up>: HidePopup()
SetYCrop()
",
+
+ "*popup*button25.label:
- Set 1/n Server Scale
",
+ "*popup*button25.label:
Set Scrollbar Width
",
+ "*popup*button25.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>:
ShowScaleN() HidePopup
()",
+ <Btn1Down>,<Btn1Up>:
HidePopup() SetScbar
()",
+
+ "*popup*button26.label: - Text Chat",
+ "*popup*button26.type: toggle",
+ "*popup*button26.label: UltraVNC Extensions:",
+ "*popup*button26.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>: HidePopup()",
+
+ "*popup*button27.label: - Set 1/n Server Scale",
+ "*popup*button27.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>: HidePopup() ShowScaleN()",
+
+ "*popup*button28.label: - Text Chat",
+ "*popup*button28.type: toggle",
+ "*popup*button28.translations: #override\\n\
+ <Visible>: SetTextChatState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleTextChat() HidePopup()",
+
+ "*popup*button2
7
.label: - File Transfer",
+ "*popup*button2
7
.type: toggle",
+ "*popup*button2
7
.translations: #override\\n\
+ "*popup*button2
9
.label: - File Transfer",
+ "*popup*button2
9
.type: toggle",
+ "*popup*button2
9
.translations: #override\\n\
+ <Visible>: SetFileXferState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleFileXfer() HidePopup()",
+
+ "*popup*button
28
.label: - Single Window",
+ "*popup*button
28
.type: toggle",
+ "*popup*button
28
.translations: #override\\n\
+ "*popup*button
30
.label: - Single Window",
+ "*popup*button
30
.type: toggle",
+ "*popup*button
30
.translations: #override\\n\
+ <Visible>: SetSingleWindowState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleSingleWindow() HidePopup()",
+
+ "*popup*button
29
.label: - Disable Remote Input",
+ "*popup*button
29
.type: toggle",
+ "*popup*button
29
.translations: #override\\n\
+ "*popup*button
31
.label: - Disable Remote Input",
+ "*popup*button
31
.type: toggle",
+ "*popup*button
31
.translations: #override\\n\
+ <Visible>: SetServerInputState()\\n\
+ <Btn1Down>,<Btn1Up>: toggle() ToggleServerInput() HidePopup()",
+
...
...
@@ -434,7 +505,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+
+ "*scaleN*button6.label: Other",
+ "*scaleN*button6.translations: #override\\n\
+ <Btn1Down>,<Btn1Up>:
DoServerScale() HideScaleN
()",
+ <Btn1Down>,<Btn1Up>:
HideScaleN() DoServerScale
()",
+
NULL
};
...
...
@@ -457,7 +528,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/*
* vncServerHost and vncServerPort are set either from the command line or
@@ -135,6 +3
12
,7 @@
@@ -135,6 +3
35
,7 @@
*/
AppData appData;
...
...
@@ -465,7 +536,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
static XtResource appDataResourceList[] = {
{"shareDesktop", "ShareDesktop", XtRBool, sizeof(Bool),
@@ -155,14 +3
33
,29 @@
@@ -155,14 +3
56
,29 @@
{"userLogin", "UserLogin", XtRString, sizeof(String),
XtOffsetOf(AppData, userLogin), XtRImmediate, (XtPointer) 0},
...
...
@@ -497,7 +568,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"nColours", "NColours", XtRInt, sizeof(int),
XtOffsetOf(AppData, nColours), XtRImmediate, (XtPointer) 256},
@@ -179,9 +3
72
,12 @@
@@ -179,9 +3
95
,12 @@
{"requestedDepth", "RequestedDepth", XtRInt, sizeof(int),
XtOffsetOf(AppData, requestedDepth), XtRImmediate, (XtPointer) 0},
...
...
@@ -511,7 +582,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"wmDecorationWidth", "WmDecorationWidth", XtRInt, sizeof(int),
XtOffsetOf(AppData, wmDecorationWidth), XtRImmediate, (XtPointer) 4},
@@ -206,8 +4
02
,13 @@
@@ -206,8 +4
25
,13 @@
{"bumpScrollPixels", "BumpScrollPixels", XtRInt, sizeof(int),
XtOffsetOf(AppData, bumpScrollPixels), XtRImmediate, (XtPointer) 20},
...
...
@@ -525,7 +596,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"qualityLevel", "QualityLevel", XtRInt, sizeof(int),
XtOffsetOf(AppData, qualityLevel), XtRImmediate, (XtPointer) 6},
@@ -218,14 +4
19
,55 @@
@@ -218,14 +4
42
,55 @@
{"useRemoteCursor", "UseRemoteCursor", XtRBool, sizeof(Bool),
XtOffsetOf(AppData, useRemoteCursor), XtRImmediate, (XtPointer) True},
...
...
@@ -583,7 +654,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
};
@@ -242,8 +
484
,22 @@
@@ -242,8 +
507
,22 @@
{"-noraiseonbeep", "*raiseOnBeep", XrmoptionNoArg, "False"},
{"-passwd", "*passwordFile", XrmoptionSepArg, 0},
{"-user", "*userLogin", XrmoptionSepArg, 0},
...
...
@@ -607,7 +678,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"-owncmap", "*forceOwnCmap", XrmoptionNoArg, "True"},
{"-truecolor", "*forceTrueColour", XrmoptionNoArg, "True"},
{"-truecolour", "*forceTrueColour", XrmoptionNoArg, "True"},
@@ -253,7 +5
09
,19 @@
@@ -253,7 +5
32
,19 @@
{"-nojpeg", "*enableJPEG", XrmoptionNoArg, "False"},
{"-nocursorshape", "*useRemoteCursor", XrmoptionNoArg, "False"},
{"-x11cursor", "*useX11Cursor", XrmoptionNoArg, "True"},
...
...
@@ -628,7 +699,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
};
@@ -268,
6 +536,7
@@
@@ -268,
15 +559,62
@@
{"SendRFBEvent", SendRFBEvent},
{"ShowPopup", ShowPopup},
{"HidePopup", HidePopup},
...
...
@@ -636,7 +707,12 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
{"ToggleFullScreen", ToggleFullScreen},
{"SetFullScreenState", SetFullScreenState},
{"SelectionFromVNC", SelectionFromVNC},
@@ -277,6 +546,47 @@
{"SelectionToVNC", SelectionToVNC},
{"ServerDialogDone", ServerDialogDone},
+ {"YCropDialogDone", YCropDialogDone},
+ {"ScbarDialogDone", ScbarDialogDone},
+ {"ScaleDialogDone", ScaleDialogDone},
{"PasswordDialogDone", PasswordDialogDone},
{"Pause", Pause},
{"RunCommand", RunCommand},
{"Quit", Quit},
...
...
@@ -660,6 +736,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ {"ToggleTextChat", ToggleTextChat},
+ {"ToggleFileXfer", ToggleFileXfer},
+ {"DoServerScale", DoServerScale},
+ {"SetYCrop", SetYCrop},
+ {"SetScbar", SetScbar},
+ {"ShowScaleN", ShowScaleN},
+ {"SetScaleN", SetScaleN},
+ {"Set8bppState", Set8bppState},
...
...
@@ -684,7 +762,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
};
@@ -302,8 +6
12
,8 @@
@@ -302,8 +6
40
,8 @@
void
usage(void)
{
...
...
@@ -695,7 +773,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
"\n"
"Usage: %s [<OPTIONS>] [<HOST>][:<DISPLAY#>]\n"
" %s [<OPTIONS>] [<HOST>][::<PORT#>]\n"
@@ -332,10 +6
42,142
@@
@@ -332,10 +6
70,145
@@
" -autopass\n"
"\n"
"Option names may be abbreviated, e.g. -bgr instead of -bgr233.\n"
...
...
@@ -817,15 +895,18 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
+ " 256 colors ~ -bgr233 default # of colors.\n"
+ " 64 colors ~ -bgr222 / -use64\n"
+ " 8 colors ~ -bgr111 / -use8\n"
+ " Set Y Crop (y-max) ~ -ycrop\n"
+ " Set Scrollbar Width ~ -sbwidth\n"
+ "\n"
+ " UltraVNC Extensions:\n"
+ " Disable Remote Input Ultravnc ext. Try to prevent input and\n"
+ "\n"
+ " Set 1/n Server Scale Ultravnc ext. Scale desktop by 1/n.\n"
+ " Text Chat Ultravnc ext. Do Text Chat.\n"
+ " File Transfer Ultravnc ext. File xfer via Java helper.\n"
+ " Single Window Ultravnc ext. Grab and view a single window.\n"
+ " (select then click on the window you want).\n"
+ " Disable Remote Input Ultravnc ext. Try to prevent input and\n"
+ " viewing of monitor at physical display.\n"
+ " Single Window Ultravnc ext. Grab and view a single window.\n"
+ " (click on the window you want).\n"
+ " Set 1/n Server Scale Ultravnc ext. Scale desktop by 1/n.\n"
+ " prompt is from the terminal.\n"
+ " Text Chat Ultravnc ext. Do Text Chat.\n"
+ "\n"
+ " Note: the Ultravnc extensions only apply to servers that support\n"
+ " them. x11vnc/libvncserver supports some of them.\n"
...
...
@@ -839,7 +920,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/*
@@ -350,6 +
792
,7 @@
@@ -350,6 +
823
,7 @@
int i;
char *vncServerName, *colonPos;
int len, portOffset;
...
...
@@ -847,7 +928,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/* Turn app resource specs into our appData structure for the rest of the
program to use */
@@ -357,6 +8
00
,23 @@
@@ -357,6 +8
31
,23 @@
XtGetApplicationResources(toplevel, &appData, appDataResourceList,
XtNumber(appDataResourceList), 0, 0);
...
...
@@ -871,7 +952,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
/* Add our actions to the actions table so they can be used in widget
resource specs */
@@ -376,6 +8
36
,10 @@
@@ -376,6 +8
67
,10 @@
return;
}
...
...
@@ -882,7 +963,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/argsresources.c vnc_unixsrc/v
if (argc == 1) {
vncServerName = DoServerDialog();
appData.passwordDialog = True;
@@ -414,6 +
878
,13 @@
@@ -414,6 +
909
,13 @@
if (!len || strspn(colonPos + 1, "0123456789") != len) {
usage();
}
...
...
@@ -1661,7 +1742,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/cursor.c vnc_unixsrc/vncviewe
-
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncviewer/desktop.c
--- vnc_unixsrc.orig/vncviewer/desktop.c 2004-05-28 13:29:29.000000000 -0400
+++ vnc_unixsrc/vncviewer/desktop.c 200
7-05-27 11:58:01.000000000 -04
00
+++ vnc_unixsrc/vncviewer/desktop.c 200
8-01-03 10:21:20.000000000 -05
00
@@ -28,21 +28,29 @@
#include <X11/extensions/XShm.h>
#endif
...
...
@@ -2250,7 +2331,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ return;
+ }
+ }
+
- if (appData.viewOnly) return;
+ if (selectingSingleWindow && ev->type == ButtonPress) {
+ selectingSingleWindow = False;
+ SendSingleWindow(ev->xbutton.x, ev->xbutton.y);
...
...
@@ -2261,8 +2343,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ }
+ return;
+ }
- if (appData.viewOnly) return;
+
+ if (appData.viewOnly) {
+ int W = si.framebufferWidth;
+ int H = si.framebufferHeight;
...
...
@@ -2440,10 +2521,10 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+ *(uip+h) = (unsigned int) fill;
+ }
+ }
+
+ scr = image->data + y * Bpl + x * Bpp;
- return cursor;
+ scr = image->data + y * Bpl + x * Bpp;
+
+ for (h = 0; h < height; h++) {
+ memcpy(scr, buf, widthInBytes);
+ scr += Bpl;
...
...
@@ -2545,7 +2626,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
}
@@ -401,62 +902,22
6
@@
@@ -401,62 +902,22
8
@@
static void
CopyBGR233ToScreen(CARD8 *buf, int x, int y, int width, int height)
{
...
...
@@ -2744,6 +2825,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+void ReDoDesktop(void) {
+ int w, h, x, y, dw, dh;
+
+fprintf(stderr, "ReDoDesktop: ycrop: %d\n", appData.yCrop);
+
+ check_tall();
+ if (appData.yCrop) {
+ if (appData.yCrop < 0 || old_width <= 0) {
...
...
@@ -2822,6 +2905,160 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/desktop.c vnc_unixsrc/vncview
+
+ reset_image();
}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/dialogs.c vnc_unixsrc/vncviewer/dialogs.c
--- vnc_unixsrc.orig/vncviewer/dialogs.c 2000-10-26 15:19:19.000000000 -0400
+++ vnc_unixsrc/vncviewer/dialogs.c 2008-01-03 12:19:13.000000000 -0500
@@ -26,6 +26,128 @@
static Bool serverDialogDone = False;
static Bool passwordDialogDone = False;
+static Bool ycropDialogDone = False;
+static Bool scbarDialogDone = False;
+static Bool scaleDialogDone = False;
+
+extern void popupFixer(Widget wid);
+
+void
+YCropDialogDone(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+ ycropDialogDone = True;
+}
+
+char *
+DoYCropDialog()
+{
+ Widget pshell, dialog;
+ char *ycropValue;
+ char *valueString;
+
+ pshell = XtVaCreatePopupShell("ycropDialog", transientShellWidgetClass,
+ toplevel, NULL);
+ dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, pshell, NULL);
+
+ XtMoveWidget(pshell, WidthOfScreen(XtScreen(pshell))*2/5,
+ HeightOfScreen(XtScreen(pshell))*2/5);
+ XtPopup(pshell, XtGrabNonexclusive);
+ XtRealizeWidget(pshell);
+
+ if (appData.popupFix) {
+ popupFixer(pshell);
+ }
+
+ ycropDialogDone = False;
+
+ while (!ycropDialogDone) {
+ XtAppProcessEvent(appContext, XtIMAll);
+ }
+
+ valueString = XawDialogGetValueString(dialog);
+ ycropValue = XtNewString(valueString);
+
+ XtPopdown(pshell);
+ return ycropValue;
+}
+
+void
+ScbarDialogDone(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+ scbarDialogDone = True;
+}
+
+char *
+DoScbarDialog()
+{
+ Widget pshell, dialog;
+ char *scbarValue;
+ char *valueString;
+
+ pshell = XtVaCreatePopupShell("scbarDialog", transientShellWidgetClass,
+ toplevel, NULL);
+ dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, pshell, NULL);
+
+ XtMoveWidget(pshell, WidthOfScreen(XtScreen(pshell))*2/5,
+ HeightOfScreen(XtScreen(pshell))*2/5);
+ XtPopup(pshell, XtGrabNonexclusive);
+ XtRealizeWidget(pshell);
+
+ if (appData.popupFix) {
+ popupFixer(pshell);
+ }
+
+ scbarDialogDone = False;
+
+ while (!scbarDialogDone) {
+ XtAppProcessEvent(appContext, XtIMAll);
+ }
+
+ valueString = XawDialogGetValueString(dialog);
+ scbarValue = XtNewString(valueString);
+
+ XtPopdown(pshell);
+ return scbarValue;
+}
+
+void
+ScaleDialogDone(Widget w, XEvent *event, String *params, Cardinal *num_params)
+{
+ scaleDialogDone = True;
+}
+
+char *
+DoScaleDialog()
+{
+ Widget pshell, dialog;
+ char *scaleValue;
+ char *valueString;
+
+ pshell = XtVaCreatePopupShell("scaleDialog", transientShellWidgetClass,
+ toplevel, NULL);
+ dialog = XtVaCreateManagedWidget("dialog", dialogWidgetClass, pshell, NULL);
+
+ XtMoveWidget(pshell, WidthOfScreen(XtScreen(pshell))*2/5,
+ HeightOfScreen(XtScreen(pshell))*2/5);
+ XtPopup(pshell, XtGrabNonexclusive);
+ XtRealizeWidget(pshell);
+
+ if (appData.popupFix) {
+ popupFixer(pshell);
+ }
+
+ scaleDialogDone = False;
+
+ while (!scaleDialogDone) {
+ XtAppProcessEvent(appContext, XtIMAll);
+ }
+
+ valueString = XawDialogGetValueString(dialog);
+ scaleValue = XtNewString(valueString);
+
+ XtPopdown(pshell);
+ return scaleValue;
+}
void
ServerDialogDone(Widget w, XEvent *event, String *params, Cardinal *num_params)
@@ -49,6 +171,10 @@
XtPopup(pshell, XtGrabNonexclusive);
XtRealizeWidget(pshell);
+ if (appData.popupFix) {
+ popupFixer(pshell);
+ }
+
serverDialogDone = False;
while (!serverDialogDone) {
@@ -85,6 +211,10 @@
XtPopup(pshell, XtGrabNonexclusive);
XtRealizeWidget(pshell);
+ if (appData.popupFix) {
+ popupFixer(pshell);
+ }
+
passwordDialogDone = False;
while (!passwordDialogDone) {
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/fullscreen.c vnc_unixsrc/vncviewer/fullscreen.c
--- vnc_unixsrc.orig/vncviewer/fullscreen.c 2003-10-09 05:23:49.000000000 -0400
+++ vnc_unixsrc/vncviewer/fullscreen.c 2007-02-17 16:32:23.000000000 -0500
...
...
@@ -3195,7 +3432,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/misc.c vnc_unixsrc/vncviewer/
static int
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer/popup.c
--- vnc_unixsrc.orig/vncviewer/popup.c 2000-06-11 08:00:53.000000000 -0400
+++ vnc_unixsrc/vncviewer/popup.c 200
7-05-31 16:42:36.000000000 -04
00
+++ vnc_unixsrc/vncviewer/popup.c 200
8-01-03 12:17:32.000000000 -05
00
@@ -25,15 +25,44 @@
#include <X11/Xaw/Form.h>
...
...
@@ -3205,7 +3442,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer
Widget popup, fullScreenToggle;
+
static
void popupFixer(Widget wid) {
+void popupFixer(Widget wid) {
+ Window rr, cr;
+ unsigned int m;
+ int x0 = 500, y0 = 500;
...
...
@@ -3538,8 +3775,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup.c vnc_unixsrc/vncviewer
+}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewer/popup_ad
--- vnc_unixsrc.orig/vncviewer/popup_ad 1969-12-31 19:00:00.000000000 -0500
+++ vnc_unixsrc/vncviewer/popup_ad 200
7-02-18 19:52:31
.000000000 -0500
@@ -0,0 +1,
19
@@
+++ vnc_unixsrc/vncviewer/popup_ad 200
8-01-03 11:27:04
.000000000 -0500
@@ -0,0 +1,
20
@@
+#!/usr/bin/perl
+
+$ok = 0;
...
...
@@ -3554,6 +3791,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe
+ }
+ next unless $on;
+ chomp;
+ last if /scaleN/;
+ $_ =~ s/^\s*"//;
+ $_ =~ s/",//;
+ $_ .= "\n" unless $_ =~ /\n/;
...
...
@@ -3561,7 +3799,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/popup_ad vnc_unixsrc/vncviewe
+}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncviewer/rfbproto.c
--- vnc_unixsrc.orig/vncviewer/rfbproto.c 2004-03-11 13:14:39.000000000 -0500
+++ vnc_unixsrc/vncviewer/rfbproto.c 200
7-06-02 20:37:25.000000000 -04
00
+++ vnc_unixsrc/vncviewer/rfbproto.c 200
8-01-03 10:26:37.000000000 -05
00
@@ -57,6 +57,25 @@
static Bool HandleTight16(int rx, int ry, int rw, int rh);
static Bool HandleTight32(int rx, int ry, int rw, int rh);
...
...
@@ -4823,7 +5061,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
- int bytesPerLine;
- int i;
- int usecs;
+extern void raiseme(
void
);
+extern void raiseme(
int force
);
- if (!ReadFromRFBServer(((char *)&msg.fu) + 1,
- sz_rfbFramebufferUpdateMsg - 1))
...
...
@@ -4831,7 +5069,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/rfbproto.c vnc_unixsrc/vncvie
+Bool
+SendTextChatOpen(void)
+{
+ raiseme();
+ raiseme(
0
);
+ rfbTextChatMsg chat;
+ chat.type = rfbTextChat;
+ chat.pad1 = 0;
...
...
@@ -6484,542 +6722,9 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/tunnel.c vnc_unixsrc/vncviewe
}
sprintf(lastArgv, "localhost::%d", localPort);
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer._man vnc_unixsrc/vncviewer/vncviewer._man
--- vnc_unixsrc.orig/vncviewer/vncviewer._man 1969-12-31 19:00:00.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer._man 2007-05-25 23:22:17.000000000 -0400
@@ -0,0 +1,529 @@
+'\" t
+.\" ** The above line should force tbl to be a preprocessor **
+.\" Man page for X vncviewer
+.\"
+.\" Copyright (C) 1998 Marcus.Brinkmann@ruhr-uni-bochum.de
+.\" Copyright (C) 2000,2001 Red Hat, Inc.
+.\" Copyright (C) 2001-2003 Constantin Kaplinsky <const@ce.cctpu.edu.ru>
+.\"
+.\" You may distribute under the terms of the GNU General Public
+.\" License as specified in the file LICENCE.TXT that comes with the
+.\" TightVNC distribution.
+.\"
+.TH vncviewer 1 "January 2003" "" "TightVNC"
+.SH NAME
+vncviewer \- an X viewer client for VNC
+.SH SYNOPSIS
+.B vncviewer
+.RI [\| options \|]
+.RI [\| host \|][\| :display \|]
+.br
+.B vncviewer
+.RI [\| options \|]
+.RI [\| host \|][\| ::port \|]
+.br
+.B vncviewer
+.RI [\| options \|]
+.IR \-listen
+.RI [\| display \|]
+.br
+.B vncviewer
+.IR \-help
+.br
+.SH DESCRIPTION
+.B vncviewer
+is an Xt\-based client application for the VNC (Virtual Network
+Computing) system. It can connect to any VNC\-compatible server such
+as \fBXvnc\fR or WinVNC, allowing you to control desktop environment
+of a different machine.
+
+You can use F8 to display a pop\-up utility menu. Press F8 twice to
+pass single F8 to the remote side.
+.SH OPTIONS
+.TP
+\fB\-help\fR
+Prints a short usage notice to stderr.
+.TP
+\fB\-listen\fR
+Make the viewer listen on port 5500+\fIdisplay\fR for reverse
+connections from a server. WinVNC supports reverse connections using
+the "Add New Client" menu option, or the \-connect command line
+option. \fBXvnc\fR requires the use of the helper program
+\fBvncconnect\fR.
+.TP
+\fB\-via\fR \fIgateway\fR
+Automatically create encrypted TCP tunnel to the \fIgateway\fR machine
+before connection, connect to the \fIhost\fR through that tunnel
+(TightVNC\-specific). By default, this option invokes SSH local port
+forwarding, assuming that SSH client binary can be accessed as
+/usr/bin/ssh. Note that when using the \fB\-via\fR option, the host
+machine name should be specified as known to the gateway machine, e.g.
+"localhost" denotes the \fIgateway\fR, not the machine where vncviewer
+was launched. See the ENVIRONMENT section below for the information on
+configuring the \fB\-via\fR option.
+.TP
+\fB\-shared\fR
+When connecting, specify that a shared connection is requested. In
+TightVNC, this is the default mode, allowing you to share the desktop
+with other clients already using it.
+.TP
+\fB\-noshared\fR
+When connecting, specify that the session may not be shared. This
+would either disconnect other connected clients or refuse your
+connection, depending on the server configuration.
+.TP
+\fB\-viewonly\fR
+Disable transfer of mouse and keyboard events from the client to the
+server.
+.TP
+\fB\-fullscreen\fR
+Start in full\-screen mode. Please be aware that operating in
+full\-screen mode may confuse X window managers. Typically, such
+conflicts cause incorrect handling of input focus or make the viewer
+window disappear mysteriously. See the grabKeyboard setting in the
+RESOURCES section below for a method to solve input focus problem.
+.TP
+\fB\-noraiseonbeep\fR
+By default, the viewer shows and raises its window on remote beep
+(bell) event. This option disables such behaviour
+(TightVNC\-specific).
+.TP
+\fB\-user\fR \fIusername\fR
+User name for Unix login authentication. Default is to use current
+Unix user name. If this option was given, the viewer will prefer Unix
+login authentication over the standard VNC authentication.
+.TP
+\fB\-passwd\fR \fIpasswd\-file\fR
+File from which to get the password (as generated by the
+\fBvncpasswd\fR(1) program). This option affects only the standard VNC
+authentication.
+.TP
+\fB\-encodings\fR \fIencoding\-list\fR
+TightVNC supports several different compression methods to encode
+screen updates; this option specifies a set of them to use in order of
+preference. Encodings are specified separated with spaces, and must
+thus be enclosed in quotes if more than one is specified. Available
+encodings, in default order for a remote connection, are "copyrect
+tight hextile zlib corre rre raw". For a local connection (to the same
+machine), the default order to try is "raw copyrect tight hextile zlib
+corre rre". Raw encoding is always assumed as a last option if no
+other encoding can be used for some reason. For more information on
+encodings, see the section ENCODINGS below.
+.TP
+\fB\-bgr233\fR
+Always use the BGR233 format to encode pixel data. This reduces
+network traffic, but colors may be represented inaccurately. The
+bgr233 format is an 8\-bit "true color" format, with 2 bits blue, 3
+bits green, and 3 bits red.
+.TP
+\fB\-owncmap\fR
+Try to use a PseudoColor visual and a private colormap. This allows
+the VNC server to control the colormap.
+.TP
+\fB\-truecolour\fR, \fB\-truecolor\fR
+Try to use a TrueColor visual.
+.TP
+\fB\-depth\fR \fIdepth\fR
+On an X server which supports multiple TrueColor visuals of different
+depths, attempt to use the specified one (in bits per pixel); if
+successful, this depth will be requested from the VNC server.
+.TP
+\fB\-compresslevel \fIlevel\fR
+Use specified compression \fIlevel\fR (0..9) for "tight" and "zlib"
+encodings (TightVNC\-specific). Level 1 uses minimum of CPU time and
+achieves weak compression ratios, while level 9 offers best
+compression but is slow in terms of CPU time consumption on the server
+side. Use high levels with very slow network connections, and low
+levels when working over high\-speed LANs. It's not recommended to use
+compression level 0, reasonable choices start from the level 1.
+.TP
+\fB\-quality \fIlevel\fR
+Use the specified JPEG quality \fIlevel\fR (0..9) for the "tight"
+encoding (TightVNC\-specific). Quality level 0 denotes bad image
+quality but very impressive compression ratios, while level 9 offers
+very good image quality at lower compression ratios. Note that the
+"tight" encoder uses JPEG to encode only those screen areas that look
+suitable for lossy compression, so quality level 0 does not always
+mean unacceptable image quality.
+.TP
+\fB\-nojpeg\fR
+Disable lossy JPEG compression in Tight encoding (TightVNC\-specific).
+Disabling JPEG compression is not a good idea in typical cases, as
+that makes the Tight encoder less efficient. You might want to use
+this option if it's absolutely necessary to achieve perfect image
+quality (see also the \fB\-quality\fR option).
+.TP
+\fB\-nocursorshape\fR
+Disable cursor shape updates, protocol extensions used to handle
+remote cursor movements locally on the client side
+(TightVNC\-specific). Using cursor shape updates decreases delays with
+remote cursor movements, and can improve bandwidth usage dramatically.
+.TP
+\fB\-x11cursor\fR
+Use a real X11 cursor with X-style cursor shape updates, instead of
+drawing the remote cursor on the framebuffer. This option also
+disables the dot cursor, and disables cursor position updates in
+non-fullscreen mode.
+.TP
+\fB\-autopass\fR
+Read a plain-text password from stdin. This option affects only the
+standard VNC authentication.
+
+.SH Enhanced TightVNC Viewer (SSVNC) OPTIONS
+.TP
+Enhanced TightVNC Viewer (SSVNC) web page is located at:
+.TP
+http://www.karlrunge.com/x11vnc/ssvnc.html
+.TP
+Note: ZRLE encoding is now supported.
+.TP
+Note: F9 is shortcut to Toggle FullScreen mode.
+.TP
+\fB\-use64\fR
+In \fB\-bgr233\fR mode, use 64 colors instead of 256.
+.TP
+\fB\-bgr222\fR
+Same as \fB\-use64\fR.
+.TP
+\fB\-use8\fR
+In \fB\-bgr233\fR mode, use 8 colors instead of 256.
+.TP
+\fB\-bgr111\fR
+Same as \fB\-use8\fR.
+.TP
+\fB\-16bpp\fR
+If the vnc viewer X display is depth 24 at 32bpp
+request a 16bpp format from the VNC server to cut
+network traffic by up to 2X, then tranlate the
+pixels to 32bpp locally.
+.TP
+\fB\-bgr565\fR
+Same as \fB\-16bpp\fR.
+.TP
+\fB\-grey\fR
+Use a grey scale for the 16- and 8\fB\-bpp\fR modes.
+.TP
+\fB\-alpha\fR
+Use alphablending transparency for local cursors
+requires: x11vnc server, both client and server
+must be 32bpp and same endianness.
+.TP
+\fB\-ycrop\fR n
+Only show the top n rows of the framebuffer. For
+use with x11vnc \fB\-ncache\fR client caching option
+to help "hide" the pixel cache region.
+Use a negative value (e.g. \fB\-1\fR) for autodetection.
+Autodetection will always take place if the remote
+fb height is more than 2 times the width.
+.TP
+\fB\-sbwidth\fR n
+Scrollbar width for x11vnc \fB\-ncache\fR mode (\fB\-ycrop\fR),
+default is very narrow: 2 pixels, it is narrow to
+avoid distraction in \fB\-ycrop\fR mode.
+.TP
+\fB\-nobell\fR
+Disable bell.
+.TP
+\fB\-rawlocal\fR
+Prefer raw encoding for localhost, default is
+no, i.e. assumes you have a SSH tunnel instead.
+.TP
+\fB\-graball\fR
+Grab the entire X server when in fullscreen mode,
+needed by some old window managers like fvwm2.
+.TP
+\fB\-popupfix\fR
+Warp the popup back to the pointer position,
+needed by some old window managers like fvwm2.
+.TP
+\fB\-grabkbd\fR
+Grab the X keyboard when in fullscreen mode,
+needed by some window managers. Same as \fB\-grabkeyboard\fR.
+\fB\-grabkbd\fR is the default, use \fB\-nograbkbd\fR to disable.
+.TP
+\fB\-bs\fR, \fB\-nobs\fR
+Whether or not to use X server Backingstore for the
+main viewer window. The default is to not, mainly
+because most Linux, etc, systems X servers disable
+*all* Backingstore by default. To re\fB\-enable\fR it put
+Option "Backingstore"
+in the Device section of /etc/X11/xorg.conf.
+In \fB\-bs\fR mode with no X server backingstore, whenever an
+area of the screen is re\fB\-exposed\fR it must go out to the
+VNC server to retrieve the pixels. This is too slow.
+In \fB\-nobs\fR mode, memory is allocated by the viewer to
+provide its own backing of the main viewer window. This
+actually makes some activities faster (changes in large
+regions) but can appear to "flash" too much.
+.TP
+\fB\-noshm\fR
+Disable use of MIT shared memory extension (not recommended)
+.TP
+\fB\-termchat\fR
+Do the UltraVNC chat in the terminal vncviewer is in
+instead of in an independent window.
+.TP
+\fB\-unixpw str\fR
+Useful for logging into x11vnc in -unixpw mode. "str" is a
+string that allows many ways to enter the Unix Username
+and Unix Password. These characters: username, newline,
+password, newline are sent to the VNC server after any VNC
+authentication has taken place. Under x11vnc they are
+used for the -unixpw login. Other VNC servers could do
+something similar.
+You can also indicate "str" via the environment
+variable SSVNC_UNIXPW.
+Note that the Escape key is actually sent first to tell
+x11vnc to not echo the Unix Username back to the VNC
+viewer. Set SSVNC_UNIXPW_NOESC=1 to override this.
+If str is ".", then you are prompted at the command line
+for the username and password in the normal way. If str is
+"-" the stdin is read via getpass(3) for username@password.
+Otherwise if str is a file, it is opened and the first line
+read is taken as the Unix username and the 2nd as the
+password. If str prefixed by "rm:" the file is removed
+after reading. Otherwise, if str has a "@" character,
+it is taken as username@password. Otherwise, the program
+exits with an error. Got all that?
+.TP
+\fB New Popup actions:\fR
+
+ ViewOnly: ~ -viewonly
+ Disable Bell: ~ -nobell
+ Cursor Shape: ~ -nocursorshape
+ X11 Cursor: ~ -x11cursor
+ Cursor Alphablend: ~ -alpha
+ Toggle Tight/ZRLE: ~ -encodings ...
+ Disable JPEG: ~ -nojpeg
+ Full Color as many colors as local screen allows.
+ Grey scale (16 & 8-bpp) ~ -grey, for low colors 16/8bpp modes only.
+ 16 bit color (BGR565) ~ -16bpp / -bgr565
+ 8 bit color (BGR233) ~ -bgr233
+ 256 colors ~ -bgr233 default # of colors.
+ 64 colors ~ -bgr222 / -use64
+ 8 colors ~ -bgr111 / -use8
+
+ UltraVNC Extensions:
+ Disable Remote Input Ultravnc ext. Try to prevent input and
+ viewing of monitor at physical display.
+ Single Window Ultravnc ext. Grab and view a single window.
+ (click on the window you want).
+ Set 1/n Server Scale Ultravnc ext. Scale desktop by 1/n.
+ prompt is from the terminal.
+ Text Chat Ultravnc ext. Do Text Chat.
+
+ Note: the Ultravnc extensions only apply to servers that support
+ them. x11vnc/libvncserver supports some of them.
+
+.SH ENCODINGS
+The server supplies information in whatever format is desired by the
+client, in order to make the client as easy as possible to implement.
+If the client represents itself as able to use multiple formats, the
+server will choose one.
+
+.I Pixel format
+refers to the representation of an individual pixel. The most common
+formats are 24 and 16 bit "true\-color" values, and 8\-bit "color map"
+representations, where an arbitrary map converts the color number to
+RGB values.
+
+.I Encoding
+refers to how a rectangle of pixels are sent (all pixel information in
+VNC is sent as rectangles). All rectangles come with a header giving
+the location and size of the rectangle and an encoding type used by
+the data which follows. These types are listed below.
+.TP
+.B Raw
+The raw encoding simply sends width*height pixel values. All clients
+are required to support this encoding type. Raw is also the fastest
+when the server and viewer are on the same machine, as the connection
+speed is essentially infinite and raw encoding minimizes processing
+time.
+.TP
+.B CopyRect
+The Copy Rectangle encoding is efficient when something is being
+moved; the only data sent is the location of a rectangle from which
+data should be copied to the current location. Copyrect could also be
+used to efficiently transmit a repeated pattern.
+.TP
+.B RRE
+The Rise\-and\-Run\-length\-Encoding is basically a 2D version of
+run\-length encoding (RLE). In this encoding, a sequence of identical
+pixels are compressed to a single value and repeat count. In VNC, this
+is implemented with a background color, and then specifications of an
+arbitrary number of subrectangles and color for each. This is an
+efficient encoding for large blocks of constant color.
+.TP
+.B CoRRE
+This is a minor variation on RRE, using a maximum of 255x255 pixel
+rectangles. This allows for single\-byte values to be used, reducing
+packet size. This is in general more efficient, because the savings
+from sending 1\-byte values generally outweighs the losses from the
+(relatively rare) cases where very large regions are painted the same
+color.
+.TP
+.B Hextile
+Here, rectangles are split up in to 16x16 tiles, which are sent in a
+predetermined order. The data within the tiles is sent either raw or
+as a variant on RRE. Hextile encoding is usually the best choice for
+using in high\-speed network environments (e.g. Ethernet local\-area
+networks).
+.TP
+.B Zlib
+Zlib is a very simple encoding that uses zlib library to compress raw
+pixel data. This encoding achieves good compression, but consumes a
+lot of CPU time. Support for this encoding is provided for
+compatibility with VNC servers that might not understand Tight
+encoding which is more efficient than Zlib in nearly all real\-life
+situations.
+.TP
+.B Tight
+Like Zlib encoding, Tight encoding uses zlib library to compress the
+pixel data, but it pre\-processes data to maximize compression ratios,
+and to minimize CPU usage on compression. Also, JPEG compression may
+be used to encode color\-rich screen areas (see the description of
+\-quality and \-nojpeg options above). Tight encoding is usually the
+best choice for low\-bandwidth network environments (e.g. slow modem
+connections).
+.SH RESOURCES
+X resources that \fBvncviewer\fR knows about, aside from the
+normal Xt resources, are as follows:
+.TP
+.B shareDesktop
+Equivalent of \fB\-shared\fR/\fB\-noshared\fR options. Default true.
+.TP
+.B viewOnly
+Equivalent of \fB\-viewonly\fR option. Default false.
+.TP
+.B fullScreen
+Equivalent of \fB\-fullscreen\fR option. Default false.
+.TP
+.B grabKeyboard
+Grab keyboard in full-screen mode. This can help to solve problems
+with losing keyboard focus. Default false.
+.TP
+.B raiseOnBeep
+Equivalent of \fB\-noraiseonbeep\fR option, when set to false. Default
+true.
+.TP
+.B passwordFile
+Equivalent of \fB\-passwd\fR option.
+.TP
+.B userLogin
+Equivalent of \fB\-user\fR option.
+.TP
+.B passwordDialog
+Whether to use a dialog box to get the password (true) or get it from
+the tty (false). Irrelevant if \fBpasswordFile\fR is set. Default
+false.
+.TP
+.B encodings
+Equivalent of \fB\-encodings\fR option.
+.TP
+.B compressLevel
+Equivalent of \fB\-compresslevel\fR option (TightVNC\-specific).
+.TP
+.B qualityLevel
+Equivalent of \fB\-quality\fR option (TightVNC\-specific).
+.TP
+.B enableJPEG
+Equivalent of \fB\-nojpeg\fR option, when set to false. Default true.
+.TP
+.B useRemoteCursor
+Equivalent of \fB\-nocursorshape\fR option, when set to false
+(TightVNC\-specific). Default true.
+.TP
+.B useBGR233
+Equivalent of \fB\-bgr233\fR option. Default false.
+.TP
+.B nColours
+When using BGR233, try to allocate this many "exact" colors from the
+BGR233 color cube. When using a shared colormap, setting this resource
+lower leaves more colors for other X clients. Irrelevant when using
+truecolor. Default is 256 (i.e. all of them).
+.TP
+.B useSharedColours
+If the number of "exact" BGR233 colors successfully allocated is less
+than 256 then the rest are filled in using the "nearest" colors
+available. This resource says whether to only use the "exact" BGR233
+colors for this purpose, or whether to use other clients' "shared"
+colors as well. Default true (i.e. use other clients' colors).
+.TP
+.B forceOwnCmap
+Equivalent of \fB\-owncmap\fR option. Default false.
+.TP
+.B forceTrueColour
+Equivalent of \fB\-truecolour\fR option. Default false.
+.TP
+.B requestedDepth
+Equivalent of \fB\-depth\fR option.
+.TP
+.B useSharedMemory
+Use MIT shared memory extension if on the same machine as the X
+server. Default true.
+.TP
+.B wmDecorationWidth, wmDecorationHeight
+The total width and height taken up by window manager decorations.
+This is used to calculate the maximum size of the VNC viewer window.
+Default is width 4, height 24.
+.TP
+.B bumpScrollTime, bumpScrollPixels
+When in full screen mode and the VNC desktop is bigger than the X
+display, scrolling happens whenever the mouse hits the edge of the
+screen. The maximum speed of scrolling is bumpScrollPixels pixels
+every bumpScrollTime milliseconds. The actual speed of scrolling will
+be slower than this, of course, depending on how fast your machine is.
+Default 20 pixels every 25 milliseconds.
+.TP
+.B popupButtonCount
+The number of buttons in the popup window. See the README file for
+more information on how to customize the buttons.
+.TP
+.B debug
+For debugging. Default false.
+.TP
+.B rawDelay, copyRectDelay
+For debugging, see the README file for details. Default 0 (off).
+.SH ENVIRONMENT
+When started with the \fB\-via\fR option, vncviewer reads the
+\fBVNC_VIA_CMD\fR environment variable, expands patterns beginning
+with the "%" character, and executes result as a command assuming that
+it would create TCP tunnel that should be used for VNC connection. If
+not set, this environment variable defaults to "/usr/bin/ssh -f -L
+%L:%H:%R %G sleep 20".
+
+The following patterns are recognized in the \fBVNC_VIA_CMD\fR (note
+that all the patterns %G, %H, %L and %R must be present in the command
+template):
+.TP
+.B %%
+A literal "%";
+.TP
+.B %G
+gateway host name;
+.TP
+.B %H
+remote VNC host name, as known to the gateway;
+.TP
+.B %L
+local TCP port number;
+.TP
+.B %R
+remote TCP port number.
+.SH SEE ALSO
+\fBvncserver\fR(1), \fBXvnc\fR(1), \fBvncpasswd\fR(1),
+\fBvncconnect\fR(1), \fBssh\fR(1)
+.SH AUTHORS
+Original VNC was developed in AT&T Laboratories Cambridge. TightVNC
+additions was implemented by Constantin Kaplinsky. Many other people
+participated in development, testing and support.
+
+\fBMan page authors:\fR
+.br
+Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>,
+.br
+Terran Melconian <terran@consistent.org>,
+.br
+Tim Waugh <twaugh@redhat.com>,
+.br
+Constantin Kaplinsky <const@ce.cctpu.edu.ru>
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncviewer/vncviewer.c
--- vnc_unixsrc.orig/vncviewer/vncviewer.c 2004-01-13 09:22:05.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.c 200
7-05-31 15:18:09.000000000 -04
00
+++ vnc_unixsrc/vncviewer/vncviewer.c 200
8-01-03 17:30:53.000000000 -05
00
@@ -22,6 +22,7 @@
*/
...
...
@@ -7114,7 +6819,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+
+ } else if (!strcmp(str, "-")) {
+ char *p, *q;
+ p = getpass("unixuser@unixpasswd ");
+ p = getpass("unixuser@unixpasswd
:
");
+ if (! p) {
+ exit(1);
+ }
...
...
@@ -7123,7 +6828,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ exit(1);
+ }
+ *q = '\0';
+ strncpy(username,
q
, N);
+ strncpy(username,
p
, N);
+ strncpy(passwd, q+1, N);
+
+ } else if (infile) {
...
...
@@ -7199,7 +6904,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
/* The -listen option is used to make us a daemon process which listens for
incoming connections from servers, rather than actively connecting to a
@@ -45,89 +203,
834
@@
@@ -45,89 +203,
906
@@
listenForIncomingConnections() returns, setting the listenSpecified
flag. */
...
...
@@ -7735,13 +7440,13 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ }
+}
+
+void raiseme(
void
);
+void raiseme(
int force
);
+void AppendChatInput(char *);
+
+void printChat(char *str, Bool raise) {
+ if (appData.termChat) {
+ if (raise) {
+ raiseme();
+ raiseme(
0
);
+ }
+ fprintf(stderr, str);
+ } else {
...
...
@@ -7788,8 +7493,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ return 0;
+}
+
+void raiseme(
void
) {
+ if (
appData.termChat
&& getenv("WINDOWID")) {
+void raiseme(
int force
) {
+ if (
(force || appData.termChat)
&& getenv("WINDOWID")) {
+ unsigned long w;
+ if (sscanf(getenv("WINDOWID"), "%lu", &w) == 1) {
+ ;
...
...
@@ -7821,20 +7526,92 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+void
+DoServerScale(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
+ char str[100], *q;
+ char str[100], *
s, *
q;
+ int n;
+ raiseme();
+ fprintf(stderr, "\n\n\a\nEnter integer n for 1/n server scaling: ");
+ str[0] = '\0';
+ fgets(str, 100, stdin);
+ q = strstr(str, "\n");
+ if (q) *q = '\0';
+ if (str[0] != '\0') {
+ n = atoi(str);
+ if (1) {
+ s = DoScaleDialog();
+ } else {
+ raiseme(1);
+ fprintf(stderr, "\n\n\a\nEnter integer n for 1/n server scaling: ");
+ str[0] = '\0';
+ fgets(str, 100, stdin);
+ s = str;
+ q = strstr(str, "\n");
+ if (q) *q = '\0';
+ }
+ if (s[0] != '\0') {
+ n = atoi(s);
+ set_server_scale(n);
+ }
+}
+
+void set_ycrop(int n) {
+ if (n >= 1) {
+ int w = si.framebufferWidth;
+ int h = si.framebufferHeight;
+ appData.yCrop = n;
+ ReDoDesktop();
+ SendFramebufferUpdateRequest(0, 0, w, h, False);
+ schedule_fb_update();
+ }
+}
+
+void
+SetYCrop(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
+ char str[100], *q, *s;
+ int n;
+ if (1) {
+ s = DoYCropDialog();
+ } else {
+ raiseme(1);
+ fprintf(stderr, "\n\n\a\nEnter pixel size n -ycrop maximum y-height: ");
+ str[0] = '\0';
+ fgets(str, 100, stdin);
+ s = str;
+ q = strstr(str, "\n");
+ if (q) *q = '\0';
+ }
+ if (s[0] != '\0') {
+ n = atoi(s);
+ set_ycrop(n);
+ }
+}
+
+void set_scbar(int n) {
+ if (n >= 1) {
+ int w = si.framebufferWidth;
+ int h = si.framebufferHeight;
+fprintf(stderr, "set_scbat: %d\n", n);
+ appData.sbWidth = n;
+ ReDoDesktop();
+ SendFramebufferUpdateRequest(0, 0, w, h, False);
+ schedule_fb_update();
+ }
+}
+
+void
+SetScbar(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
+ char str[100], *q, *s;
+ int n;
+ if (1) {
+ s = DoScbarDialog();
+ } else {
+ raiseme(1);
+ fprintf(stderr, "\n\n\a\nEnter pixel size n scrollbar width: ");
+ str[0] = '\0';
+ fgets(str, 100, stdin);
+ s = str;
+ q = strstr(str, "\n");
+ if (q) *q = '\0';
+ }
+ if (s[0] != '\0') {
+ n = atoi(s);
+ set_scbar(n);
+ }
+}
+
+void
+SetScaleN(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
...
...
@@ -7933,8 +7710,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ if (b16 != NULL) XtVaSetValues(b16, XtNstate, False, NULL);
+ }
+}
- return 0;
+
+void
+Set256ColorsState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
...
...
@@ -8034,7 +7810,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
+ else
+ XtVaSetValues(w, XtNstate, False, NULL);
+}
+
- return 0;
+void
+SetServerInputState(Widget w, XEvent *ev, String *params, Cardinal *num_params)
+{
...
...
@@ -8072,7 +7849,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.c vnc_unixsrc/vncvi
}
diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncviewer/vncviewer.h
--- vnc_unixsrc.orig/vncviewer/vncviewer.h 2004-03-11 13:14:40.000000000 -0500
+++ vnc_unixsrc/vncviewer/vncviewer.h 200
7-05-30 23:52:07.000000000 -04
00
+++ vnc_unixsrc/vncviewer/vncviewer.h 200
8-01-03 12:03:29.000000000 -05
00
@@ -68,51 +68,73 @@
/* argsresources.c */
...
...
@@ -8201,7 +7978,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern void SetVisualAndCmap();
@@ -157,1
1 +180,18
@@
@@ -157,1
3 +180,32
@@
extern void DesktopInitBeforeRealization();
extern void DesktopInitAfterRealization();
...
...
@@ -8219,8 +7996,22 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+
/* dialogs.c */
+extern void YCropDialogDone(Widget w, XEvent *event, String *params,
+ Cardinal *num_params);
+extern char *DoYCropDialog();
+
+extern void ScbarDialogDone(Widget w, XEvent *event, String *params,
+ Cardinal *num_params);
+extern char *DoScbarDialog();
+
+extern void ScaleDialogDone(Widget w, XEvent *event, String *params,
+ Cardinal *num_params);
+extern char *DoScaleDialog();
+
extern void ServerDialogDone(Widget w, XEvent *event, String *params,
@@ -207,6 +237,10 @@
Cardinal *num_params);
extern char *DoServerDialog();
@@ -207,6 +249,10 @@
Cardinal *num_params);
extern void CreatePopup();
...
...
@@ -8231,7 +8022,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* rfbproto.c */
extern int rfbsock;
@@ -229,6 +2
63
,15 @@
@@ -229,6 +2
75
,15 @@
extern Bool SendClientCutText(char *str, int len);
extern Bool HandleRFBServerMessage();
...
...
@@ -8247,7 +8038,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
extern void PrintPixelFormat(rfbPixelFormat *format);
/* selection.c */
@@ -241,8 +2
84
,9 @@
@@ -241,8 +2
96
,9 @@
/* shm.c */
...
...
@@ -8258,7 +8049,7 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
/* sockets.c */
@@ -271,3 +3
15,50
@@
@@ -271,3 +3
27,52
@@
extern XtAppContext appContext;
extern Display* dpy;
extern Widget toplevel;
...
...
@@ -8283,6 +8074,8 @@ diff -Naur -X ./exclude vnc_unixsrc.orig/vncviewer/vncviewer.h vnc_unixsrc/vncvi
+extern void ToggleServerInput(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void ToggleSingleWindow(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void DoServerScale(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void SetYCrop(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void SetScbar(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void ShowScaleN(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void SetScaleN(Widget w, XEvent *ev, String *params, Cardinal *num_params);
+extern void ToggleTextChat(Widget w, XEvent *ev, String *params, Cardinal *num_params);
...
...
x11vnc/rates.c
View file @
7e7ef1b4
...
...
@@ -305,10 +305,9 @@ void measure_send_rates(int init) {
double
lat_min
=
.
0005
;
/* 0.5 ms */
int
min_cmp
=
10000
,
nclients
;
rfbClientIteratorPtr
iter
;
rfbClientPtr
cl
;
int
db
=
0
,
msg
=
0
;
db
=
0
;
rfbClientPtr
cl0
,
cl
;
int
msg
=
0
,
clcnt0
=
0
,
cc
;
int
db
=
0
,
ouch_db
=
0
,
ouch
=
0
;
if
(
!
measure_speeds
)
{
return
;
...
...
@@ -316,6 +315,9 @@ db = 0;
if
(
speeds_net_rate
&&
speeds_net_latency
)
{
return
;
}
if
(
!
client_count
)
{
return
;
}
if
(
!
orig_display_hook
)
{
orig_display_hook
=
screen
->
displayHook
;
...
...
@@ -324,7 +326,11 @@ db = 0;
if
(
start
==
0
.
0
)
{
dtime
(
&
start
);
}
dtime0
(
&
now
);
if
(
now
<
last_client_gone
+
4
.
0
)
{
return
;
}
now
=
now
-
start
;
nclients
=
0
;
...
...
@@ -333,13 +339,9 @@ db = 0;
return
;
}
cl0
=
NULL
;
iter
=
rfbGetClientIterator
(
screen
);
while
(
(
cl
=
rfbClientIteratorNext
(
iter
))
)
{
int
defer
,
i
,
cbs
,
rbs
;
char
*
httpdir
;
double
dt
,
dt1
=
0
.
0
,
dt2
,
dt3
;
double
tm
,
spin_max
=
15
.
0
,
spin_lat_max
=
1
.
5
;
int
got_t2
=
0
,
got_t3
=
0
;
ClientData
*
cd
=
(
ClientData
*
)
cl
->
clientData
;
if
(
!
cd
)
{
...
...
@@ -348,8 +350,26 @@ db = 0;
if
(
cd
->
send_cmp_rate
>
0
.
0
)
{
continue
;
}
if
(
cl
->
onHold
)
{
continue
;
}
nclients
++
;
if
(
cl0
==
NULL
)
{
cl0
=
cl
;
}
}
rfbReleaseClientIterator
(
iter
);
cl
=
cl0
;
cc
=
0
;
while
(
cl
!=
NULL
&&
cc
++
==
0
)
{
int
defer
,
i
,
cbs
,
rbs
;
char
*
httpdir
;
double
dt
,
dt1
=
0
.
0
,
dt2
,
dt3
;
double
tm
,
spin_max
=
15
.
0
,
spin_lat_max
=
1
.
5
;
int
got_t2
=
0
,
got_t3
=
0
;
ClientData
*
cd
=
(
ClientData
*
)
cl
->
clientData
;
#if 0
for (i=0; i<MAX_ENCODINGS; i++) {
...
...
@@ -393,9 +413,18 @@ if (db) fprintf(stderr, "%d client num rects req: %d mod: %d cbs: %d "
continue
;
}
if
(
ouch_db
)
fprintf
(
stderr
,
"START-OUCH: %d
\n
"
,
client_count
);
clcnt0
=
client_count
;
#define OUCH ( ouch || (ouch = (!client_count || client_count != clcnt0 || dnow() < last_client_gone+4.0)) )
rfbPE
(
1000
);
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-A
\n
"
);
if
(
OUCH
)
continue
;
if
(
sraRgnCountRects
(
cl
->
modifiedRegion
))
{
rfbPE
(
1000
);
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-B
\n
"
);
if
(
OUCH
)
continue
;
}
defer
=
screen
->
deferUpdateTime
;
...
...
@@ -419,6 +448,10 @@ if (db) fprintf(stderr, "%d client num rects req: %d mod: %d cbs: %d "
/* when req1 = 1 mod1 == 0, end of 2nd part of bulk transfer */
while
(
1
)
{
int
req0
,
req1
,
mod0
,
mod1
;
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-C1
\n
"
);
if
(
OUCH
)
break
;
req0
=
sraRgnCountRects
(
cl
->
requestedRegion
);
mod0
=
sraRgnCountRects
(
cl
->
modifiedRegion
);
if
(
use_threads
)
{
...
...
@@ -435,6 +468,10 @@ if (db) fprintf(stderr, "%d client num rects req: %d mod: %d cbs: %d "
if
(
dt2
>
spin_max
)
{
break
;
}
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-C2
\n
"
);
if
(
OUCH
)
break
;
req1
=
sraRgnCountRects
(
cl
->
requestedRegion
);
mod1
=
sraRgnCountRects
(
cl
->
modifiedRegion
);
...
...
@@ -452,6 +489,8 @@ if (db) fprintf(stderr, "dt2 calc: num rects req: %d/%d mod: %d/%d "
break
;
}
}
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-D
\n
"
);
if
(
OUCH
)
goto
ouch
;
if
(
!
got_t2
)
{
dt2
=
0
.
0
;
...
...
@@ -498,6 +537,8 @@ if (db) fprintf(stderr, "dt2 calc: num rects req: %d/%d mod: %d/%d "
rfbCFD
(
1000
*
1000
);
}
}
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-E
\n
"
);
if
(
OUCH
)
goto
ouch
;
dt
=
dtime
(
&
tm
);
i
++
;
...
...
@@ -550,10 +591,15 @@ if (db) fprintf(stderr, "dt3 calc: num rects req: %d/%d mod: %d/%d "
}
}
}
ouch:
screen
->
deferUpdateTime
=
defer
;
screen
->
httpDir
=
httpdir
;
if
(
OUCH
&&
ouch_db
)
fprintf
(
stderr
,
"***OUCH-F
\n
"
);
if
(
OUCH
)
break
;
dt
=
dt1
+
dt2
;
...
...
@@ -591,7 +637,6 @@ if (db) fprintf(stderr, "dt3 calc: num rects req: %d/%d mod: %d/%d "
dt1
,
dt2
,
dt3
,
cbs
);
msg
=
1
;
}
rfbReleaseClientIterator
(
iter
);
if
(
msg
)
{
int
link
,
latency
,
netrate
;
...
...
x11vnc/ssltools.h
View file @
7e7ef1b4
...
...
@@ -1639,7 +1639,11 @@ char create_display[] =
" cookie=`(echo $r; date; uptime; ps -ealf 2>&1) | md5sum | awk '{print $1}'`
\n
"
" fi
\n
"
" elif [
\"
X$have_xauth
\"
!=
\"
X
\"
]; then
\n
"
" cookie=`$have_xauth list | awk '{print $NF}' | tail -n 1`
\n
"
" if uname | grep SunOS > /dev/null; then
\n
"
" cookie=`$have_xauth list | awk '{print $NF}' | tail -1`
\n
"
" else
\n
"
" cookie=`$have_xauth list | awk '{print $NF}' | tail -n 1`
\n
"
" fi
\n
"
" fi
\n
"
" if [
\"
X$cookie
\"
=
\"
X
\"
]; then
\n
"
" # oh well..
\n
"
...
...
x11vnc/x11vnc.1
View file @
7e7ef1b4
...
...
@@ -2,7 +2,7 @@
.TH X11VNC "1" "January 2008" "x11vnc " "User Commands"
.SH NAME
x11vnc - allow VNC connections to real X11 displays
version: 0.9.4, lastmod: 2008-01-
1
4
version: 0.9.4, lastmod: 2008-01-
2
4
.SH SYNOPSIS
.B x11vnc
[OPTION]...
...
...
@@ -396,7 +396,7 @@ is already connected before the process goes into the
background, for example, usage of \fB-display\fR WAIT:..,
\fB-svc,\fR and \fB-connect\fR can make use of this "poor man's"
inetd mode. The default wait time is 500ms in this
mode. This usage could use useful: \fB-svc\fR \fB-loopbg\fR
mode. This usage could use useful: \fB-svc\fR \fB-
bg\fR \fB-
loopbg\fR
.PP
\fB-timeout\fR \fIn\fR
.IP
...
...
@@ -3773,7 +3773,8 @@ for slower
.IR lseek (2)
based reading. Use "snap:..."
to imply \fB-snapfb\fR mode and the "file:" access (this
is for devices that only provide the fb all at once).
is for unseekable devices that only provide the fb all
at once, e.g. a video camera provides the whole frame).
.IP
For shared memory segments string is of the form:
"shm:N@WxHxB" which specifies a shmid N and with
...
...
x11vnc/x11vnc.h
View file @
7e7ef1b4
...
...
@@ -483,6 +483,7 @@ extern int hack_val;
/* last client to move pointer */
extern
rfbClientPtr
last_pointer_client
;
extern
rfbClientPtr
latest_client
;
extern
double
last_client_gone
;
extern
int
waited_for_client
;
extern
int
findcreatedisplay
;
...
...
x11vnc/x11vnc_defs.c
View file @
7e7ef1b4
...
...
@@ -15,7 +15,7 @@ int xtrap_base_event_type = 0;
int
xdamage_base_event_type
=
0
;
/* date +'lastmod: %Y-%m-%d' */
char
lastmod
[]
=
"0.9.4 lastmod: 2008-01-
1
4"
;
char
lastmod
[]
=
"0.9.4 lastmod: 2008-01-
2
4"
;
/* X display info */
...
...
@@ -146,6 +146,7 @@ int hack_val = 0;
/* last client to move pointer */
rfbClientPtr
last_pointer_client
=
NULL
;
rfbClientPtr
latest_client
=
NULL
;
double
last_client_gone
=
0
.
0
;
int
waited_for_client
=
0
;
int
findcreatedisplay
=
0
;
...
...
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