Typo
[linux_from_scratch_hints.git] / OLD / svnc-x_terminal.txt
blob7d5fdbc39a0a317bfa8dd5ab45657f5fc09e3c00
1 TITLE:          Setting up a minimalistic X terminal using the svga vncviewer
2 LFS VERSION:    All (tested against LFS-pre4.0)
3 AUTHOR:         Csaba Henk <ekho@math-inst.hu>
5 SYNOPSIS:
6         This hints shows how to equip an uClibc-based bootfloppy with
7         the svga vncviewer. With this enhanced bootfloppy you can turn even
8         low-end computers to X terminals. We also describe a possible
9         minimalistic server + client (X terminal) configuration.
11 VERSION:        0.5
13 CONTENTS
15  Introduction
16  What do we need?
17 Completing the bootfloppy
18  Installing more of uClibc
19  Installing svgalib
20  Installing svncviewer
21  Creating the bootdisk
22 Setting up the network environment
23  Setting up general server programs
24  Installing the vnc server
25  Connecting from client to server 
26 Closing remarks
27  Version notes
28  Bugs and weirdnesses
29  Todo
30  Credits
31 Appendix A -- svgalib-1.9.17-Makefiles.diff
33 PREFACE
35 * For the most recent version check out 
37 http://www.math-inst.hu/~ekho/lowlife/svnc-x_terminal.txt
39 * See changelog at 
41 http://www.math-inst.hu/~ekho/lowlife/Changelog
43 * Comments, ideas, critics, flames are welcome.
45 * (If you are an LFS user, you can skip this.) Although this document is
46 formally an LFS hint, you can see use of it without knowing what LFS is
47 (I tried to write it keeping this possibility in mind). Anyway, I
48 recommend you to check out what LFS is. If you are not familiar with
49 compiling source code in unix/linux environment, then there is no use of
50 going on without checking out what LFS is. Consult the following docs
51 first:
53 http://www.linuxfromscratch.org/lfs/intro.shtml
54 http://www.linuxfromscratch.org/faq/
55 http://www.linuxfromscratch.org/view/4.0/chapter02/chapter02.html
57 HINT
59 Introduction
60 ------------
62 As the Linux Xterminal mini-HOWTO claims: "Ideally, an XT is silent,
63 swift, and deadly". A cheap and great way to achieve this ideal is to
64 use old PC's as terminals. Two issues arise here: 
66 1) How to make them display X?
67 2) How to make them silent?
69 Concerning 2), the possible sources of noise are fans and HD. In case
70 of old PC's (486s and old Pentiums) the CPU needs no fan -- if there
71 is any fan, you can find it at the power supply, and it's not a big
72 risk to plug that out. This is where oldness becomes a feature.
73 Concerning the HD: to make the it quiet, you should avoid using it.
74 An alternative is using a ramdisk for carrying your root filesystem.
75 The most easy way to make the kernel mount a ramdisk as root
76 filesystem is booting from a floppy. This is why I use a bootfloppy.
78 This design implies that in case of an old PC, we will be tight on
79 memory. One kind of reaction to this circumstance is trying to trim
80 down X for the floppy. I chose an other way, namely, displaying X via
81 vnc: we put svgalib + the svga vncviewer to the floppy.
83 This hint is a continuation of the uclibc-bootfloppy hint (
85 http://hints.linuxfromscratch.org/hints/uclibc-bootfloppy.txt
86 http://www.math-inst.hu/~ekho/lowlife/uclibc-bootfloppy.txt
88 ) which describes how to put together a bootfloppy based on recent linux
89 kernel, the uClibc C library and busybox. The steps described here
90 should be performed when you get to the "Other programs" chapter of the
91 uclibc-bootfloppy hint.
93 This way we get a "bleeding edge" bootfloppy with recent versions of
94 the used programs, and this setup needs no more than 7M RAM -- in
95 this value kernel mem usage, ramdisk size, svncviewer displaying a
96 bunch of graphic programs are all included. This value could still be
97 decreased by using older stuff; why do I insist on being at the
98 bleeding edge? See the answer in the uclibc-bootfloppy hint.
100 This hint,additional info and downloadable bootdisk image with svnc
101 can be found at my homepage (or at its mirror):
103 http://www.math-inst.hu/~ekho/lowlife/
104 http://www.personal.ceu.hu/students/01/Csaba_Henk/lowlife/
106 In this hint we the assume that you use an x86 PC (both for making and
107 booting the floppy) with gcc. You may try to port it to another
108 architecture / compiler. Doing it on another architecture should not
109 be hard. Doing it with another compiler depends on how much does
110 uClibc support that compiler.
112 If you copy command from this hint to your shell, be careful that
113 line-terminating backslashes (\) will keep their position (no whitespace
114 characters should follow them). A possible solution is open this hint in
115 the Vim GUI, and copy'n'paste from there.
118 What do we need?
119 ----------------
121 Here I list the programs which we need for the bootfloppy and the ones
122 which are used in the particular server + client setup which will be 
123 described in the sequel.
125 Generally you are encouraged to use the most update versions of the
126 programs (and your favorite distributions, if there are more of them).
127 Still there are some items where I have some additional comment on the
128 version/distribution; these are marked with (!). You can find the
129 version notes at the end of this hint. 
131 * The server side:
133 tightvnc
134  http://prdownloads.sourceforge.net/vnc-tight/tightvnc-1.2.*_unixsrc.tar.bz2
135 xinetd
136 some kind of telnet daemon
137 some kind of tftp daemon
139 * The client (bootfloppy) side
141 svgalib-1.9.17 (!)
142  http://www.arava.co.il/matan/svgalib/svgalib-1.9.17.tar.gz
143 svnc-0.1 (!)
144  ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/svnc-0.1.tgz
145  and the mirrors listed in
146  http://www.realvnc.com/pipermail/vnc-list/2002-June/031178.html
147 tightvnc (only needed for compiling svnc)
150 Completing the bootfloppy
151 =========================
153 First you need a bootflopy development environment. Setting up one is 
154 described in the uclibc-bootfloppy hint. Do what the uclibc-bootfloppy 
155 hint tells you, until you get to the "Other programs" chapter. 
157 Then do the following; you are supposed to work as the bootdisk user in
158 the present chapter (ie.,
159 type
161 su - bootdisk
163 if you didn't do it yet), except for a short while (you will be told
164 when to become root).
166 Installing more of uClibc
167 -------------------------
169 For svgalib we need the math libraries of uClibc. If you installed gpm         
170 to the floppy filesystem correctly, you already have them. If you don't        
171 have them on the floppy filesystem, type:
173 cd /usr/i386-linux-uclibc/lib/ &&
174 cp -a libm-* libm.so.0 ~/rfloppy/lib
176 Installing svgalib
177 ------------------
179 First some necessary corrections for the 1.9.17 version of svgalib;
180 hopefully these will be unnecessary for subsequent releases. You find a
181 patch in Appendix A for svgalib-1.9.17, or at
183 http://www.math-inst.hu/~ekho/lowlife/svgalib-1.9.17-Makefiles.patch
185 This patch corrects some typos in the Makefiles. Put the patch to the
186 svgalib source dir as svgalib-1.9.17-Makefiles.patch . Then type
188 ln -s ../egadrv.c src/drivers &&
189 patch -Np1 -i svgalib-1.9.17-Makefiles.patch 
191 (the first command is the correction of a file misplacement).
193 These were the version-specific corrections. Now let's go for the real
194 stuff.
196 Adjust the list of supported drivers in Makefile.cfg according to
197 your needs. By carefully choosing the few drivers you need, you can
198 decrease the size of the binary with about 100 kb or maybe more! However, 
199 our filesystem is big enough for the svga library with all default drivers
200 compiled in. If the kernel release you use for the bootfloppy is not the
201 same as the one used on your development platform, also set the
202 KERNELRELEASE, INCLUDEDIR variables according to this.
204 Now we compile svgalib and install it to the directory of the floppy's
205 filesystem. In this development version of svgalib the svga-aware
206 programs are needed no more to run as setuid root, but a kernel module
207 is to be loaded for using svgalib. The commands below also compile and
208 install the kernel module. 
210 make shared &&
211 cd sharedlib &&
212 for q in "" gl; do 
213 strip libvga$q.so.1.9.*
214 ln -s libvga$q.so.1.9.* libvga$q.so.1 
215 ln -s libvga$q.so.1 libvga$q.so
216 done &&
217 mkdir -p $HOME/rfloppy/usr/lib && 
218 cp -a libvga* $HOME/rfloppy/usr/lib &&
219 # Now comes the compilation of the module
220 cd ../kernel/svgalib_helper &&
221 make all &&
222 mkdir -p $HOME/rfloppy/lib/modules &&
223 cp svgalib_helper.o $HOME/rfloppy/lib/modules &&
224 cd ../..
226 Also create the file $HOME/rfloppy/etc/vga/libvga.config, and put into it
227 your mouse type at least. Eg., my libvga.config looks like:
229 mouse IMPS2
230 mdev /dev/misc/psaux
232 If you feel like, you can also compile the svga test suite. It is useful
233 if you want to custom-tailor your svga configuration (which means
234 adjusting the libvga.config file). To do so, type
236 cd demos &&
237 make "LIBS=../sharedlib/libvga.so ../sharedlib/libvgagl.so" &&
238 cd ../threeDKit &&
239 make "LIBS=../sharedlib/libvga.so ../sharedlib/libvgagl.so" \
240  "INCLUDES = -I../include -I. -I../src -I../gl" &&
241 cd ..
243 in the svgalib source directory. You will find the executables in the
244 demos and threeDKit directories.  
246 Do not delete the svgalib source dir -- we will need it in the following
247 section!
249 Installing svncviewer
250 ---------------------
252 Do not yet extract the svncviewer tarball! The following commands will
253 assume that the svgalib source dir, the tightvnc and svncviewer tarballs
254 and you (ie., the bootdisk user) are at $HOME.
256 To get svncviewer compiled, we need the libvncauth.a library form the
257 tightvnc distribution. (Thus svncviewer is compiled inside the vnc
258 source tree.) The usual way to compile both of libvncauth.a and
259 svncviewer is to create makefiles with the xmkmf utility, and then
260 running make. 
262 However, xmkmf will not work with uClibc (unless we build X against
263 uClibc, and we don't want to do that). Therefore we do the following:
265 * run xmkmf (imake) using glibc on both of libvncauth and svncviewer;
267 * run make on libvncauth and svncviewer with options for using uClibc
268 and local svgalib and for size optimization.
270 In practice this means the following: first we define a variable which
271 stores the relative path from the svncviewer source dir to svgalib
272 source dir (we need this path as we don't install the uClibc-linked
273 svgalib on the development platform). If you follow my setup faithfully,
274 it should be:
276 export SVGADIR=../../svgalib-1.9.17
278 (otherwise find it out by yourself :).
280 Here I tell you about a patch I made for svncviewer:
282 http://www.math-inst.hu/~ekho/lowlife/svnc-0.1-modeforce.patch
284 This introduces a -mode option for svncviewer with which you can force
285 svncviewer to use a given svga mode (these modes are described in the
286 svgalib docs or check out the vgatest executable of the svgalib test
287 kit). If you don't apply the patch just execute the following sequence
288 of commands, otherwise take a break for patching when its time comes. 
290 bzcat tightvnc-1.2.*_unixsrc.tar.bz2 | tar xv &&
291 cd vnc_unixsrc &&
292 tar xvzf ../svnc-0.1.tgz &&
293 unset CC ; : &&
294 cd libvncauth &&
295 xmkmf &&
296 cd ../svncviewer &&
297 xmkmf &&
298 export CC=i386-uclibc-gcc &&   # Not necessary, just to restore defaults
299 cd ../libvncauth &&
300 make "CC=i386-uclibc-gcc" "CDEBUGFLAGS = $CFLAGS -fno-strength-reduce" \
301  "AR = i386-uclibc-ar clq" &&
302 cd ../svncviewer &&
303 make "CC=i386-uclibc-gcc" "CDEBUGFLAGS = $CFLAGS -fno-strength-reduce" \
304  "INCLUDES = -I../include -I. -I$SVGADIR/include -I$SVGADIR/gl" \
305  "SVGALIB = $SVGADIR/sharedlib/libvga.so $SVGADIR/sharedlib/libvgagl.so" &&
306 strip svncviewer &&
307 mkdir -p $HOME/rfloppy/usr/bin &&
308 cp svncviewer $HOME/rfloppy/usr/bin
310 If you intend to compile svncviewer in an environment without X (ie.,
311 you don't have xmkmf), then try to compile libvncauth.a and
312 svncviewer with the help of the following scripts (they are simply
313 the output of the respective make commands; I give away these and not
314 the Makefiles because xmkmf-made Makefiles are huge and illegible):
316 http://www.math-inst.hu/~ekho/lowlife/make_uclibc-libvncauth 
317 http://www.math-inst.hu/~ekho/lowlife/make_uclibc-svncviewer 
319 Creating the bootdisk
320 ---------------------
322 Proceed on as it is described in the similarly named chapter of the
323 uclibc-bootdisk hint.
326 Setting up the network environment
327 ==================================
329 You have the bootdisk with the svga vncviewer. If you know what you want
330 to do with it, you have clear ideas that in what network environment you
331 will use it, then the rest of the hint is not too interesting for you.
333 In the sequel we describe a minimalist local network setup: a server
334 machine running a vnc server, and a client machine booted with our
335 bootfloppy, which can connect to the server in three basic ways: it
336 can transfer files via tftp, it can get a character terminal on the
337 server via telnet, and it can display X desktops via vnc. Using the
338 tftp and telnet services requires that you enabled the respective
339 clients when you compiled busybox. (And you will also need ifconfig
340 being enabled in busybox.)
342 We will assume that you connect the two machines directly (without a
343 switch or things like that) and that you have a free network interface
344 (network card, serial/parallel port) on both machines.
346 Setting up general server programs
347 ----------------------------------
349 Fix an unused IP address for the server and the client side, from
350 private network IP-address range, from the same network class, and
351 store it in the $SERVER and $CLIENT variables, respectively. Eg., I
352 use 
354 $SERVER=192.168.0.2
355 $CLIENT=192.168.0.1
357 (its an example and not a command!). Then you should install xinetd
358 (or alternatively, inetd), some telnet daemon, and some tftp daemon.
359 These are covered by the BLFS book (available at
361 http://beyond.linuxfromscratch.org
363 ). Choose a directory for tftp transfers, store its value in the
364 variable $TRANSFER. (That is, tftp clients can download files located in
365 $TRANSFER, and can upload files to $TRANSFER.) Choose carefully the
366 list of those users/groups which can write to $TRANSFER.
368 Configure xinetd to run telnetd and tftpd bound to $SERVER like this
369 (the names of the executables may be different on your system; and
370 consider that by the settings below tftp is ran by a specific user):
372 echo "
373         service telnet
375        socket_type             = stream
376        wait                    = no
377        user                    = root
378        server                  = /usr/sbin/in.telnetd
379        bind                    = $SERVER
380        only_from               = $CLIENT
381        log_on_failure += USERID
384         service tftp
386        socket_type             = dgram
387        protocol                = udp
388        wait                    = yes
389        user                    = tftpd
390        server                  = /usr/sbin/tftpd
391        server_args             = $TRANSFER
392        bind                    = $SERVER
393        only_from               = $CLIENT
394 }" >> /etc/xinetd.conf
396 Note that binding these services to $SERVER is essential for security --
397 telnet transfers data unencrypted and tftp transfers data without asking
398 for password.
400 Now you can configure the network interface on the server -- in the
401 following example we use plip:
403 ifconfig plip0 $SERVER pointopoint $CLIENT
405 (It's your homework to find out how to get it executed at startup.)
407 Restart xinetd; in an "official" LFS/BLFS system it is done with
409 /etc/rc.d/init.d/xinetd restart
411 Installing the vnc server
412 -------------------------
414 In this setup we will install the vnc server in a standalone way, that
415 is, it won't be handled by xinetd so you will have to start it manually.
416 (One benefit of this approach that in this case the vnc session remains
417 alive after a viewer disconnects, so you can use it as a portable X
418 desktop, "the screen of X".) If you would like a "vnc + xinetd"-ish vnc
419 setup, check out the tightvnc hint (
421 http://hints.linuxfromscratch.org/hints/tightvnc.txt
425 Install tightvnc with the following commands:
427 xmkmf &&
428 make World &&
429 cd Xvnc &&
430 ./configure &&
431 make &&
432 cd .. &&
433 sed '/^ *\$fontPath/s%^%#%' vncserver > vncserver.tmp &&
434 mv vncserver.tmp vncserver &&
435 ./vncinstall /usr/bin /usr/share/man
437 [Explanation:
439 "sed '/^ *\$fontPath/s%^%#%' vncserver [...]" : 
441 this command comments the $fontPath variable out, as I see no effect of
442 setting it other than getting error messages (it may be different on
443 your system).]
445 Note: the above commands do not cover the installation of the java
446 viewer, which enables java-supporting browsers to display vnc desktops.
447 The java viewer is shipped with the tightvnc source code in a
448 precompiled form; however, if you want to act according to LFS spirit,
449 *do not* install it, rather download the tightvnc-1.2.*_javasrc package
450 from the tightvnc site, and compile it yourself. That's pretty
451 straightforward.  
453 Connecting from client to server 
454 --------------------------------
456 Now its time to boot the floppy on the client machine. We will use the
457 $SERVER, $CLIENT variables with the same values on the client machine as
458 well.
460 When you get the prompt on the client, set up the network -- eg.,
461 continuing the above example with plip:
463 ifconfig plip0 $CLIENT pointopoint $SERVER
465 * If all is nice, you can get a prompt of the server on the client simply by
466 typing
468 telnet $SERVER
470 * Transferring files between the server and client is as follows:
472 - downloading the file foo from server to client: on the server, put foo
473 into $TRANSFER, make it world-readable, then on the client: get sure that
474 foo does not exist in the current directory, then type:
476 tftp -g -r foo $SERVER 
478 - uploading the file foo from client to server: on the server type
480  > $TRANSFER/foo &&
481 chmod a+w $TRANSFER/foo
483 then on the client type
485 tftp -p -l foo $SERVER 
487 -- its primitive, but saves your floppy from the bloat.
489 * And getting an X desktop via vnc: at the server, login as the user
490 whose desktop is to be reached from the client (you can use the telnet
491 of the client). Then type:
493 vncserver
495 (you may need to pass -geometry and -depth options to be compatible with
496 the video capabilities of the client).
498 On the client, type:
500 insmod /lib/modules/svgalib_helper.o &&
501 svncviewer $SERVER:1
503 and see the desktop of the server. 
505 Customizations:
507 * pass the "-interface $SERVER" option to the vnc server if you worry
508 for security and you want to make sure that only the client has access to
509 the vnc server;
511 * pass the "-compatiblekbd" option to the vnc server if you want to use
512 non-standard characters; eg., this way typing Alt+i in an xterm gives
513 you an acuted e. This is the way to go for people whose language uses
514 nonstandard characters, as vnc does not support xmodmap well.
516 There is a more tricky way of using vnc: with the help of ssh tunneling
517 you can reach any vnc server from the client which is reachable from the
518 server. Say you run a vnc server at pistike.org, on display 1 (port
519 5901), as user steve. On the server type
521 ssh -g -L 5902:localhost:5901 steve@pistike.org
523 This forwards port 5902 of the server to port 5901 of pistike.org. Thus
524 when you type 
526 svncviewer $SERVER:2
528 on the client, you will be connected to the vnc server of pistike.org.
529 Moreover, the connection between the server and pistike.org will be
530 secured. 
532 So that's the story.
534 Closing remarks
535 ===============
537 Version notes
538 -------------
540 * svgalib-1.9.17:
542 As it can be read in the svgalib.org site, "Pre releases of svgalib-2
543 will be called 1.9.x, with no pre, but they are still very
544 experimental." Why do we use experimental version? Simply because it
545 works much more flawlessly: the stable release (svgalib-1.4.3) was also
546 willing to compile, but it gave me segmentation faults. Note that the
547 1.9.17 version has some lesser bugs which are corrected in this hint;
548 these corrections are likely to become unnecessary with a new release of
549 svgalib. 
551 * snvc-0.1:
553 You can find two different kind of releases of the svga vncviewer: there
554 is the original one, that's used in this hint, and there are the Debian
555 releases (see at
557 http://packages.qa.debian.org/s/svncviewer.html
559 ). For me the deb version seems to be an unclever dirty hack: its
560 maintainer changed keyboard handling in way such that you can compile
561 the program with an arbitrary keyboard layout (it's shipped with US and
562 German layouts), but this way several keyboard combination got disabled:
563 eg., killing the viewer with Ctrl+Alt+Backspace does not work; the
564 Ctrl+Alt+Left/Right combinations of icewm for changing desktops neither
565 work. And the source ships with precompiled libvncauth.a and svncviewer
566 and bunch of other unnecessary things; it's quite annoying (the manpage
567 is fine, tho). So I sticked with the oldie-but-goldie original version
568 of svncviewer.
570 Bugs and weirdnesses
571 --------------------
573 The list below is about both of the uclibc-bootfloppy and the
574 svnc-x_terminal hints. 
576 The following weirdnesses are probably due to the respective programs
577 and not to doing something wrong in these hints.
579 * Sometimes when switching to another terminal and then back to the
580 svga vncviewer the keyboard gets screwed up. Using serial mouse,
581 sometimes the keyboard gets screwed up without any obvious reason.
582 However, after restarting the viewer, things behave normally again.
584 * Using libvgagl-dependent programs (like svncviewer) on my 486
585 laptop, I see a horizontal white line at half height of the screen.
586 I wonder whether this occurs with other LCD monitors.
588 Todo
589 ----
591 Now it seems that the uclibc-bootfloppy and svnc-x_terminal hints got
592 quite close to their idea: you set up the development environment, su to
593 bootdisk user, type in some commands, finally put a floppy to the drive
594 and run the mkbootdisk script, and you have the bootfloppy.
596 However, I can say only "Now it seems..." but I can't say "Now it is..."
597 -- without testing the stuff by many people and getting feedback I
598 can't.
600 So the main TODO is to be done by you, kind reader: test and report!! 
602 After it happens, these hints can be claimed to be mature.
604 Another TODO will be in the future to upgrade to newer versions of the
605 installed programs, if new versions come out. 
607 Credits
608 -------
610 I gathered information from the following sources:
612 LFS mailing lists
613 busybox mailing list
614 uClibc mailing list archives
615 vnc mailing list archives
616 "Creating a custom bootdisk" chapter of the BLFS book
617 Bootdisk HOWTO
618 PLIP-install HOWTO
619 http://ebusiness.gbdirect.co.uk/case_studies/xterminal.html
620 the LODS project (http://www.khk.net/lods/index.html)   
621 the tomsrtbt project (http://www.toms.net/rb/)
623 Contributions
624 -------------
626 Archaic had some useful advice about trimming the root filesys (/etc).
627 Following the advice of Bill Maltby, "rdev $DISK 0,0" is used rather
628 than "rdev $DISK $DISK" or "rdev $DISK 2,0".
631 * * * Appendices * * *
635 Appendix A -- svgalib-1.9.17-Makefiles.patch
636 --------------------------------------------
638 %%%<svgalib-1.9.17-Makefiles.patch>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
639 diff -aur orig/svgalib-1.9.17/Makefile.cfg svgalib-1.9.17/Makefile.cfg
640 --- orig/svgalib-1.9.17/Makefile.cfg    2002-12-03 10:53:56.000000000 +0100
641 +++ svgalib-1.9.17/Makefile.cfg 2003-07-01 23:53:59.000000000 +0200
642 @@ -316,7 +316,7 @@
643         INCLUDE_TVGA_DRIVER=
644  endif
646 -#ifneq($(INCLUDE_S3_DRIVER),y)
647 +ifneq ($(INCLUDE_S3_DRIVER),y)
648         INCLUDE_NORMAL_DAC =
649         INCLUDE_S3_SDAC_DAC =
650         INCLUDE_S3_GENDAC_DAC =
651 @@ -328,4 +328,4 @@
652         INCLUDE_ICW_DAC =
653         INCLUDE_IBMRGB52x_DAC =
654         INCLUDE_SC1148X_DAC =
655 -#endif
656 +endif
657 diff -aur orig/svgalib-1.9.17/demos/Makefile svgalib-1.9.17/demos/Makefile
658 --- orig/svgalib-1.9.17/demos/Makefile  2002-04-10 15:54:26.000000000 +0200
659 +++ svgalib-1.9.17/demos/Makefile       2003-07-02 00:14:23.000000000 +0200
660 @@ -58,7 +58,7 @@
661         $(CC) $(CFLAGS) $(LDFLAGS) -o linearspeed linearspeed.c memset.o $(LIBS)
663  buildcsr: $(OBJS) mkcur.o
664 -       $(CC) -o buildcsr $(OBJS) $(FLAGS) mkcur.o -lvgagl -lvga
665 +       $(CC) -o buildcsr $(OBJS) $(FLAGS) mkcur.o $(LIBS)
667  clean: cleanbin
668         rm -f .depend *.o *~ *.bak core
669 %%%</svgalib-1.9.17-Makefiles.patch>%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
672 END of "Setting up a minimalistic X terminal using the svga vncviewer" hint