• Home
Name Date Size #Lines LOC

..--

Makefile.amD03-May-2024427 91

Makefile.inD03-May-202411.3 KiB417345

READMED03-May-20244.8 KiB160102

apply_turbovncD03-May-20241.1 KiB4734

convertD03-May-20242 KiB8052

convert_rfbserverD03-May-20242.2 KiB5744

tight.cD03-May-202455.6 KiB1,5031,182

turbojpeg.hD03-May-20249.1 KiB23042

undo_turbovncD03-May-2024721 2614

README

1#
2# This work has been (or is hereby) released into the public domain by
3# its author, Karl J. Runge <runge@karlrunge.com>. This applies worldwide.
4#
5# In case this is not legally possible: Karl J. Runge grants anyone the
6# right to use this work for any purpose, without any conditions, unless
7# such conditions are required by law.
8#
9
10INTRO:
11------
12
13This is a "patch" to make x11vnc/libvncserver work with TurboVNC:
14
15	http://www.virtualgl.org/About/TurboVNC
16	http://www.karlrunge.com/x11vnc/faq.html#faq-turbovnc
17
18It is very experimental/kludgy.  Not all TurboVNC features may be enabled.
19We are currently evaluating whether TurboVNC support should be officially
20put into x11vnc/libvncserver.
21
22TurboVNC is an optimized VNC for fast refresh rates on fast networks.
23
24It does pretty well on good broadband as well.  But it is not as fast
25as regular TightVNC on slow links.
26
27
28TURBOJPEG:
29---------
30
31TurboVNC uses the TurboJPEG library based on a fast proprietary JPEG
32implementation.  You will need to download it from the VirtualGL
33sourceforge site:
34
35	http://sourceforge.net/project/showfiles.php?group_id=117509&package_id=166100
36
37Either install it or simply unpack the .deb or .rpm file into a directory.
38
39N.B. you can unpack a .deb via 'ar x package.deb' and the extracting
40from the data.tar.gz file.  rpm2cpio can be used to unpack .rpm's.
41
42
43QUICK-START:
44------------
45
46For those in a hurry:
47
48  cd x11vnc-x.y.z/x11vnc/misc/turbovnc
49  ./apply_turbovnc
50  cd ../../..
51  env LDFLAGS='-L/DIR -Xlinker --rpath=/DIR' ./configure
52  make AM_LDFLAGS='-lturbojpeg'
53
54where you replace /DIR with your directory containing libturbojpeg.so.
55
56
57PATCHING AND BUILDING:
58----------------------
59
60After unpacking your x11vnc-x.y.z.tar.gz tarball cd to the
61x11vnc-x.y.z/x11vnc/misc/turbovnc (where this README file is) and from
62that directory run:
63
64	./apply_turbovnc
65
66that will modify files in the libvncserver and x11vnc directories above
67this directory.  (To undo these changes run: ./undo_turbovnc)  The input
68sources, tight.c and turbojpeg.h are from the TurboVNC source package.
69
70After applying, go back to the top level source directory and run:
71
72	env LDFLAGS='-L/path/to/turbojpeg -Xlinker --rpath=/path/to/turbojpeg' ./configure
73
74where the turbojpeg library is:
75
76	/path/to/turbojpeg/libturbojpeg.so
77
78(change /path/to/turbojpeg to the directory where you installed or
79unpacked it.)
80
81If you are not using gnu gcc and gnu linker the options may be a little
82different (e.g. -R instead of -Xlinker --rpath).
83
84If you need additional ./configure options or env. var. settings,
85add them too.
86
87
88Next, run this make command:
89
90	make AM_LDFLAGS='-lturbojpeg'
91
92This is a hack and may not always work, if it doesn't edit x11vnc/Makefile
93and add '-lturbojpeg' to the LIBS variable.
94
95This should create a binary:
96
97	./x11vnc/x11vnc
98
99that supports VirtualGL's TurboVNC.
100
101You will need a TurboVNC viewer, you can get one here:
102
103	http://sourceforge.net/project/showfiles.php?group_id=117509&package_id=128130
104
105Let us know how it goes.
106
107
108PERFORMANCE:
109------------
110
111Note that x11vnc has to read the display's screen pixels from the
112graphics card memory.  This can be slow, e.g. 10 MB/sec.
113
114There is not a big need for graphics card manufacturers to optimize the
115read rate; the write rate is the one they optimize greatly.
116
117	http://www.karlrunge.com/x11vnc/#limitations
118
119If you run x11vnc and see lines like this:
120
121    28/02/2009 00:52:07 Autoprobing selected port 5900
122    28/02/2009 00:52:07 fb read rate: 10 MB/sec
123    28/02/2009 00:52:07 screen setup finished.
124
125you have a typical slow one.
126
127Whereas if you see this:
128
129    28/02/2009 00:54:46 Autoprobing selected port 5900
130    28/02/2009 00:54:46 fb read rate: 321 MB/sec
131    28/02/2009 00:54:46 fast read: reset wait  ms to: 10
132    28/02/2009 00:54:46 fast read: reset defer ms to: 10
133    28/02/2009 00:54:46 screen setup finished.
134
135that is very fast.  In such a situation you may want to dial down
136x11vnc's delay, e.g.:  -wait 5 -defer 5, or even smaller to push things
137out more quickly.
138
139We have only seen it this fast on Linux by using the nvidia proprietary
140graphics drivers.  The Xorg drivers are typically slow 10 MB/sec.
141
142It will also be fast if the X server is virtual: Xvfb or Xdummy
143since the screen pixels are stored in RAM:
144
145	http://www.karlrunge.com/x11vnc/faq.html#faq-xvfb
146
147And it will be fast if the ShadowFB xorg.conf option is enabled (if the
148card supports it.)
149
150
151The point we are trying to make is that even though TurboVNC uses a
152wicked fast JPEG implementation, and cuts out overhead in its attempt to
153pump out as many frames per second as it can, if it is slow for x11vnc
154to read the screen pixels in the first place then you might not even
155notice the TurboVNC speedup.
156
157So TurboVNC+x11vnc will be faster than TightVNC+x11vnc, but if there is
158a large overhead/bottleneck from reading the graphics card framebuffer,
159then the speedup will be marginal.
160