<s>
x11vnc	B-Application
is	O
a	O
Virtual	B-Protocol
Network	I-Protocol
Computing	I-Protocol
(	O
VNC	B-Protocol
)	O
server	O
program	O
.	O
</s>
<s>
It	O
allows	O
remote	B-Protocol
access	I-Protocol
from	O
a	O
remote	O
client	O
to	O
a	O
computer	O
hosting	O
an	O
X	B-Operating_System
Window	I-Operating_System
session	O
and	O
the	O
x11vnc	B-Application
software	O
,	O
continuously	O
polling	O
the	O
X	B-Operating_System
server	O
's	O
frame	B-Algorithm
buffer	I-Algorithm
for	O
changes	O
.	O
</s>
<s>
This	O
allows	O
the	O
user	O
to	O
control	O
their	O
X11	B-Operating_System
desktop	O
(	O
KDE	B-Application
,	O
GNOME	B-Application
,	O
Xfce	B-Language
,	O
etc	O
.	O
)	O
</s>
<s>
x11vnc	B-Application
can	O
also	O
poll	O
non-X11	O
frame	B-Algorithm
buffer	I-Algorithm
devices	O
,	O
such	O
as	O
webcams	B-Protocol
or	O
TV	B-Device
tuner	I-Device
cards	I-Device
,	O
iPAQ	B-Application
,	O
Neuros	O
OSD	O
,	O
the	O
Linux	B-Application
console	I-Application
,	O
and	O
the	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
graphics	O
display	O
.	O
</s>
<s>
x11vnc	B-Application
is	O
part	O
of	O
the	O
LibVNCServer	B-Language
project	O
and	O
is	O
free	B-Application
software	I-Application
available	O
under	O
the	O
GNU	B-License
General	I-License
Public	I-License
License	I-License
.	O
</s>
<s>
x11vnc	B-Application
was	O
written	O
by	O
Karl	O
Runge	O
.	O
</s>
<s>
x11vnc	B-Application
does	O
not	O
create	O
an	O
extra	O
display	O
(	O
or	O
X	B-Operating_System
desktop	O
)	O
for	O
remote	B-Protocol
control	I-Protocol
.	O
</s>
<s>
Instead	O
,	O
it	O
uses	O
the	O
existing	O
X11	B-Operating_System
display	O
shown	O
on	O
the	O
monitor	O
of	O
a	O
Unix-like	B-Operating_System
computer	O
in	O
real	O
time	O
,	O
unlike	O
other	O
Linux	B-Application
alternatives	O
such	O
as	O
TightVNC	B-Language
Server	O
.	O
</s>
<s>
However	O
,	O
it	O
is	O
possible	O
to	O
use	O
Xvnc	B-Protocol
or	O
Xvfb	B-Device
to	O
create	O
a	O
'	O
virtual	O
 '	O
extra	O
display	O
,	O
and	O
have	O
x11vnc	B-Application
connect	O
to	O
it	O
,	O
enabling	O
X-11	O
access	O
to	O
headless	B-Application
servers	I-Application
.	O
</s>
<s>
x11vnc	B-Application
has	O
security	O
features	O
that	O
allows	O
the	O
user	O
to	O
set	O
an	O
access	O
password	O
or	O
to	O
use	O
Unix	B-Application
usernames	O
and	O
passwords	O
.	O
</s>
<s>
It	O
also	O
has	O
options	O
for	O
connection	O
via	O
a	O
secure	O
SSL	B-Protocol
link	O
.	O
</s>
<s>
An	O
SSL	B-Protocol
Java	O
VNC	B-Protocol
viewer	O
applet	B-Application
is	O
provided	O
that	O
enables	O
secure	O
connections	O
from	O
a	O
web	B-Application
browser	I-Application
.	O
</s>
<s>
The	O
VeNCrypt	O
SSL/TLS	B-Protocol
VNC	B-Protocol
security	O
type	O
is	O
also	O
supported	O
.	O
</s>
<s>
Many	O
of	O
the	O
UltraVNC	B-Language
extensions	O
to	O
VNC	B-Protocol
are	O
supported	O
by	O
x11vnc	B-Application
,	O
including	O
file	O
transfer	O
.	O
</s>
<s>
x11vnc	B-Application
keeps	O
a	O
copy	O
of	O
the	O
X	B-Operating_System
server	O
's	O
frame	B-Algorithm
buffer	I-Algorithm
in	O
RAM	B-Architecture
.	O
</s>
<s>
The	O
X11	B-Operating_System
programming	O
interface	O
XShmGetImage	O
is	O
used	O
to	O
retrieve	O
the	O
frame	B-Algorithm
buffer	I-Algorithm
pixel	B-Algorithm
data	O
.	O
</s>
<s>
x11vnc	B-Application
compares	O
the	O
X	B-Operating_System
server	O
's	O
frame	B-Algorithm
buffer	I-Algorithm
against	O
its	O
copy	O
to	O
see	O
which	O
pixel	B-Algorithm
regions	O
have	O
changed	O
(	O
and	O
hence	O
need	O
to	O
be	O
sent	O
to	O
the	O
VNC	B-Protocol
viewers	O
.	O
)	O
</s>
<s>
Reading	O
pixel	B-Algorithm
data	O
from	O
the	O
physical	O
frame	B-Algorithm
buffer	I-Algorithm
can	O
be	O
much	O
slower	O
than	O
writing	O
to	O
it	O
(	O
because	O
graphics	O
devices	O
are	O
not	O
optimized	O
for	O
reading	O
)	O
and	O
so	O
a	O
sequential	O
pixel	B-Algorithm
by	O
pixel	B-Algorithm
check	O
would	O
often	O
be	O
too	O
slow	O
.	O
</s>
<s>
To	O
improve	O
the	O
situation	O
,	O
x11vnc	B-Application
reads	O
in	O
full	O
rows	O
of	O
pixels	B-Algorithm
separated	O
by	O
32	O
pixels	B-Algorithm
vertically	O
.	O
</s>
<s>
This	O
method	O
enables	O
x11vnc	B-Application
to	O
detect	O
changes	O
on	O
the	O
screen	O
roughly	O
32	O
times	O
more	O
quickly	O
than	O
a	O
sequential	O
check	O
would	O
(	O
unless	O
the	O
changes	O
are	O
very	O
small	O
,	O
say	O
only	O
1	O
pixel	B-Algorithm
tall	O
.	O
)	O
</s>
<s>
If	O
the	O
X11	B-Operating_System
DAMAGE	O
extension	O
is	O
present	O
,	O
x11vnc	B-Application
uses	O
it	O
to	O
provide	O
hints	O
where	O
to	O
focus	O
its	O
polling	O
,	O
thereby	O
finding	O
changes	O
even	O
more	O
quickly	O
and	O
also	O
lowering	O
the	O
system	O
load	O
.	O
</s>
<s>
When	O
x11vnc	B-Application
receives	O
user	O
input	O
events	O
(	O
keystrokes	O
,	O
pointer	O
motion	O
,	O
and	O
pointer	O
button	O
clicks	O
)	O
from	O
a	O
VNC	B-Protocol
viewer	O
,	O
it	O
must	O
inject	O
them	O
synthetically	O
into	O
the	O
X	B-Operating_System
server	O
.	O
</s>
<s>
The	O
X11	B-Operating_System
programming	O
interfaces	O
XTestFakeKeyEvent	O
,	O
XTestFakeMotionEvent	O
,	O
and	O
XTestFakeButtonEvent	O
of	O
the	O
XTEST	O
extension	O
are	O
used	O
to	O
achieve	O
this	O
.	O
</s>
<s>
For	O
non-X11	O
managed	O
devices	O
(	O
such	O
as	O
the	O
Mac	B-Operating_System
OS	I-Operating_System
X	I-Operating_System
graphics	O
display	O
)	O
different	O
programming	O
interfaces	O
must	O
be	O
used	O
.	O
</s>
<s>
x11vnc	B-Application
also	O
provides	O
an	O
interface	O
where	O
the	O
user	O
can	O
supply	O
their	O
own	O
input	O
injection	O
program	O
.	O
</s>
<s>
Often	O
special-purpose	O
systems	O
are	O
built	O
using	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
to	O
manage	O
the	O
graphical	O
display	O
.	O
</s>
<s>
x11vnc	B-Application
can	O
be	O
used	O
to	O
export	O
the	O
system	O
's	O
display	O
for	O
remote	O
VNC	B-Protocol
access	O
.	O
</s>
<s>
x11vnc	B-Application
is	O
known	O
to	O
have	O
been	O
run	O
on	O
the	O
following	O
types	O
of	O
systems	O
:	O
Electron	O
microscope	O
,	O
MRI	B-Algorithm
and	O
Radiology	O
image	O
analysis	O
system	O
,	O
Power	O
plant	O
and	O
Oil	O
platform	O
management	O
consoles	O
,	O
Materials	O
distribution	O
control	O
,	O
Ship	O
self-defense	O
system	O
testing	O
,	O
NMR	O
systems	O
,	O
Silicon	B-Architecture
wafer	I-Architecture
analysis	O
microscope	O
,	O
and	O
Theater	O
and	O
concert	O
lighting	O
control	O
.	O
</s>
<s>
x11vnc	B-Application
is	O
used	O
to	O
export	O
the	O
X11	B-Operating_System
displays	O
in	O
embedded	B-Architecture
systems	I-Architecture
such	O
as	O
Linux-based	O
PDAs	B-Application
and	O
Home	O
theater	O
PCs	O
.	O
</s>
<s>
If	O
x11vnc	B-Application
cannot	O
be	O
run	O
on	O
the	O
special-purpose	O
system	O
,	O
sometimes	O
it	O
can	O
be	O
run	O
on	O
a	O
nearby	O
computer	O
and	O
poll	O
the	O
X	B-Operating_System
server	O
frame	B-Algorithm
buffer	I-Algorithm
over	O
the	O
network	O
.	O
</s>
<s>
This	O
is	O
how	O
proprietary	O
X	B-Protocol
terminal	I-Protocol
devices	O
can	O
be	O
accessed	O
via	O
x11vnc	B-Application
.	O
</s>
<s>
Although	O
x11vnc	B-Application
's	O
primary	O
use	O
is	O
for	O
X	B-Operating_System
servers	I-Operating_System
associated	O
with	O
physical	O
graphics	O
hardware	O
,	O
it	O
can	O
also	O
attach	O
to	O
virtual	O
X	B-Operating_System
servers	I-Operating_System
(	O
whose	O
frame	B-Algorithm
buffers	I-Algorithm
exist	O
in	O
RAM	B-Architecture
only	O
)	O
such	O
as	O
Xvfb	B-Device
or	O
a	O
Sun	B-Protocol
Ray	I-Protocol
session	O
.	O
</s>
<s>
x11vnc	B-Application
has	O
options	O
(	O
-create	O
and	O
-svc	O
)	O
to	O
start	O
Xvfb	B-Device
automatically	O
,	O
possibly	O
as	O
the	O
Unix	B-Application
user	O
that	O
logged	O
in	O
.	O
</s>
<s>
The	O
interactive	O
response	O
of	O
x11vnc	B-Application
and	O
Xvfb	B-Device
may	O
not	O
be	O
as	O
fast	O
as	O
Xvnc	B-Protocol
,	O
however	O
this	O
mode	O
enables	O
features	O
that	O
Xvnc	B-Protocol
does	O
not	O
have	O
,	O
such	O
as	O
SSL	B-Protocol
encryption	I-Protocol
and	O
Unix	B-Application
usernames	O
and	O
passwords	O
.	O
</s>
<s>
The	O
RFB	B-Protocol
(	O
VNC	B-Protocol
)	O
protocol	O
is	O
odd	O
when	O
compared	O
to	O
other	O
network	O
graphics	O
protocols	O
,	O
such	O
as	O
X11	B-Operating_System
and	O
RDP	B-Protocol
,	O
in	O
that	O
there	O
is	O
no	O
provision	O
for	O
viewer-side	O
caching	O
of	O
pixel	B-Algorithm
data	O
.	O
</s>
<s>
For	O
example	O
,	O
every	O
re-exposure	O
of	O
a	O
window	O
or	O
background	O
region	O
needs	O
to	O
have	O
its	O
(	O
compressed	O
)	O
pixel	B-Algorithm
data	O
resent	O
over	O
the	O
network	O
.	O
</s>
<s>
This	O
effect	O
is	O
particularly	O
noticeable	O
for	O
windows	O
with	O
complex	O
or	O
photo	O
regions	O
(	O
such	O
as	O
a	O
web	B-Application
browser	I-Application
window	O
)	O
that	O
gets	O
iconified	O
and	O
deiconified	O
or	O
re-exposed	O
often	O
.	O
</s>
<s>
x11vnc	B-Application
has	O
an	O
experimental	O
and	O
somewhat	O
brute-force	O
implementation	O
of	O
client-side	O
caching	O
.	O
</s>
<s>
When	O
creating	O
the	O
RFB	B-Protocol
frame	B-Algorithm
buffer	I-Algorithm
in	O
this	O
mode	O
,	O
x11vnc	B-Application
allocates	O
a	O
very	O
large	O
scratch	O
region	O
below	O
the	O
top	O
portion	O
used	O
for	O
the	O
actual	O
(	O
on-screen	O
)	O
pixel	B-Algorithm
data	O
.	O
</s>
<s>
x11vnc	B-Application
can	O
then	O
use	O
the	O
RFB	B-Protocol
CopyRect	O
command	O
to	O
instruct	O
the	O
viewer	O
to	O
move	O
rectangles	O
of	O
pixel	B-Algorithm
data	O
into	O
and	O
out	O
of	O
the	O
scratch	O
region	O
.	O
</s>
<s>
In	O
this	O
way	O
x11vnc	B-Application
can	O
manage	O
the	O
scratch	O
region	O
to	O
store	O
and	O
retrieve	O
pixel	B-Algorithm
data	O
without	O
having	O
to	O
resend	O
it	O
over	O
the	O
network	O
.	O
</s>
<s>
x11vnc	B-Application
's	O
client-side	O
caching	O
mode	O
can	O
give	O
noticeable	O
interactive	O
response	O
improvements	O
for	O
many	O
activities	O
.	O
</s>
<s>
Since	O
it	O
uses	O
the	O
existing	O
RFB	B-Protocol
CopyRect	O
command	O
,	O
the	O
scheme	O
will	O
work	O
with	O
any	O
(	O
i.e.	O
</s>
<s>
unmodified	O
)	O
VNC	B-Protocol
viewer	O
.	O
</s>
<s>
So	O
instead	O
using	O
5	O
MB	O
for	O
a	O
1280x1024	O
truecolor	O
frame	B-Algorithm
buffer	I-Algorithm
,	O
closer	O
to	O
100	O
MB	O
will	O
be	O
used	O
(	O
on	O
both	O
the	O
VNC	B-Protocol
client	O
and	O
server	O
sides	O
.	O
)	O
</s>
<s>
Second	O
,	O
the	O
VNC	B-Protocol
viewer	O
may	O
treat	O
the	O
scratch	O
region	O
in	O
ways	O
that	O
confuse	O
the	O
user	O
,	O
for	O
example	O
displaying	O
it	O
to	O
the	O
user	O
or	O
automatically	O
panning	O
down	O
into	O
it	O
if	O
the	O
mouse	O
reaches	O
the	O
bottom	O
of	O
the	O
real	O
screen	O
.	O
</s>
<s>
The	O
Unix	B-Application
VNC	B-Protocol
viewer	O
in	O
automatically	O
hides	O
the	O
scratch	O
region	O
.	O
</s>
<s>
Finally	O
,	O
x11vnc	B-Application
's	O
heuristics	O
for	O
caching	O
and	O
reusing	O
window	O
pixel	B-Algorithm
data	O
are	O
not	O
perfect	O
and	O
can	O
lead	O
to	O
unexpected	O
flashing	O
of	O
a	O
window	O
's	O
contents	O
and	O
other	O
undesired	O
effects	O
.	O
</s>
