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