How to compile and run  SVGALIB-1.4.3  on command line Linux

You can get it from

I have been using svgalib for some time now but to get it to run was a major problem.    I made notes and thisi sthe method I use to compile Svgalib-1.4.3


1)   All this is done with Slackware 10.2.    

2)   I compiled and used nano for the changes used here.     

3)   I have 3 Dell laptops I have compiled svaglib on.   They are all latitudes ( C660  D610   D620 ).

4)  I logged in as root

5)  I copied svgalib-1.4..3.tar.gz  to  the    /root directory.      

6)   I used unzip svgalib-1.4.3.tar.gz

7)    I  used tar -xvf svgalib-1.4.3.tar.gz

8)   I went to  /etc/vga

9)   I used nano to change libvga.config as below

9a)    I entered control dash  then 383 to jump to line 383   

9b)  Now backspace to erase the # sign so the line now reads Vesa Text     ( it was commented out)    

10 ) I went back to /root/svgalib-1.4.3

11)  I entered "make clean"

12)  I entered "make install"  

At this point I got errors about terms like HDinstall,  Hsyncstruct,  and Vdisplay.

13)    I put in the following patch

13a)    go to /root/svgalib-1.4.3 /src

13b)   I entered nano vga.c

13c)   I went to a line near line number 3914 and …..

13d)     changed line mmt.##x = atop(ptr);           to      x = atoi(ptr) ;

14)   I went to line  ML_GETINT(HDisplay);         

14a)   and changed it to ML_GETINT(mmt.HDisplay);          ( don't forget the dot)    

14b)    Then I added mmt.    7 more times up to and including the VTotal line .   ( two  m's one t and a dot )  
  15)  I went to line number  1953 and between the lines   "__vga_mmap();"      and    "if (( long) GM < 0 ) {"

15a)    I added the line   " #if  0"

16)   Then a few lines down between the lines   " } "    and    "/* disable video */

16a)    I added the line       "   #endif "

17)    I then saved  my new version of vga.c   with control  O

18)   I went back to /root/svga-1.4.3

19)   I entered make clear

20)   I entered make install

21) I got a message to make demopgs  

22)   I got a message to set MAXREGS to 5756

23)    I went to /root/svgalib-1.4.3/src

24)   I entered nano driver.h  

25)    About 20 lines down in the MAX_REGS line  i changed the 5000 to 5756

26 I went back to /root/svgalib-1.4.3  

27)   I entered " make clean "

28) I entered " make install"

29)   I entered  " make demos"  

30 I entered cd demos

31)   i entered ./vgatest

32)    I entered 36

You should see lots of colors

don't forget to compile with the -lvga extension    

Yes there are a lot of extra steps but it makes it simpler.   

The mandlebrot pictures I posted on this website were made this way.