








			  Linux XFree86 HOWTO 

		  : Eric S. Raymond esr@snark.thyrsus.com

		   : J.S. Lin, r6921068@ms.cc.ntu.edu.tw

			     v5.2, 31 October 1997



				   Abstract

     ļȡ,װ,趨 Linux ϵ X Window System (X11R6),
     XFree86 3.3 . һһ趨 XFree86 ϵͳ.



1.  

X Window System  UNIX ϵͳǿ (Щ˿ܻ˵Ӵҷǳӵ)
ͼλҵ. ԭ X Window System ʽ MIT չ;
ʱҵ߾Ѿʹ X ΪUNIX ƽ̨ϵĹҵ׼. ʵ, ÿ̨
UNIX վ X Window system ĸ汾.

һ MIT X Window System version 11, release 6 (X11R6)  80386/80486/Pentium
UNIX systems ,طеֲ汾Ѿڷչ, ԭ David Wexelblat
<dwex@XFree86.org> 쵼ĳʽʦŶ.  汾, XFree86, ȡø
System V/386, 386BSD,  x86 UNIX ʵ, Linux. Ҫ bina
ries, 䵵, libraries, Լ.

XFree86 ǿȡ XFree86 վ, <URL:http://www.XFree86.org>.

ڱļ, ǽһ Linux װ趨 XFree86, Լ뿿
XFree86 ļ(Щļ») ʵĳЩϸ. Ȼ,
ʹúͶ[using and customizing]  X Window System ԶļΧ ---
Ŀ,Ӧڶʹ X Window System ĺ,ȡһ.

1.1  ѶԴ

ǰδ Linux, ǡһЩϵͳ[X Window System]Ļ.
ҪҵЩϵõط Linux Documentation Project  home page 
<URL:http://sunsite.unc.edu/LDP>.  ҵļ֮,ʱ[up-to-
date]汾, <URL:http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>

1.2  ļ°汾

Linux XFree86 HOWTO °汾ᶨԵ comp.os.linux.help   Լ
news.answers1 . Ҳµ Linux WWW  FTP վ, LDP home page.


____________________

1. <URL:news:news.answers>

Linux XFree86 HOWTO 						      1





Linux XFree86 HOWTO 						      2



ܼļ°汾ȫѶ[World Wide Web],  URL
<URL:http://sunsite.unc.edu/LDP/HOWTO/XFree86-HOWTO.html>.

1.3  غ붩

ļ, ڵļķŸ Eric S. Raymond, esr@thyrsus.com.
Һܻӭκν. ļҵ.
֪,ʹܹ¸汾. лл.

 Ҫ Ÿ, Щʹʾʾ X , .  
HOWTO ͼǿ,׵ָ һ װ, ʹµĻʽ趨[interactive
configurator].	㷢,һ XFree86 Video Timings HOWTO,
<URL:http://sunsite.unc.edu/LDP/HOWTO/XFree86-Video-Timings-HOWTO.html>.  
XFree86's `Videomodes.doc' ֮µ HTML 汾.)  ļ¼֪,
춽趨ѵ.  ܰ,Ҳﲻ.


2.  Ӳ

 XFree86 3.3, µʾƬǱ֧Ԯ. ļʾ濨
Ӧ˵ʹõľƬ. гõµʾ,
һ̨»ʾ, ӦҪȷָʾļ,ͺ,
Ƭ. ҪΪȥ֧Ԯ绰; һ㷷̻.  󲿷
PC Ӳ巷̻˵ʾ ``׼ SVGA '',  ''Ӧ''
ϵͳ. һ (ᵽ Linux  XFree86!)
û֧ԮʾƬ, Ҫϸ.

Ҳ֪ܵʾִ SuperProbe ʽ,  XFree86 ׼[distri
bution]. »и꾡˵.

±׼ SVGA Ƭб֧Ԯ:

   	 Tseng ET3000, ET4000AX, ET4000/W32, ET6000

   	 Western Digital/Paradise PVGA1

   	 Western Digital WD90C00, WD90C10, WD90C11, WD90C24, WD90C30, WD90C31,
     WD90C33

   	 Genoa GVGA

   	 Trident TVGA8800CS, TVGA8900B, TVGA8900C, TVGA8900CL, TVGA9000,
     TVGA9000i, TVGA9100B, TVGA9200CX, TVGA9320, TVGA9400CX, TVGA9420,
     TGUI9420DGi, TGUI9430DGi, TGUI9440AGi, TGUI9660XGi, TGUI9680

   	 ATI 18800, 18800-1, 28800-2, 28800-4, 28800-5, 28800-6, 68800-3,
     68800-6, 68800AX, 68800LX, 88800GX-C, 88800GX-D, 88800GX-E, 88800GX-F,
     88800CX, 264CT, 264ET, 264VT, 264VT2, 264GT

   	 NCR 77C22, 77C22E, 77C22E+

   	 Cirrus Logic CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428,
     CLGD5429, CLGD5430, CLGD5434, CLGD5436, CLGD5440, CLGD5446, CLGD5462,
     CLGD5464, CLGD6205, CLGD6215, CLGD6225, CLGD6235, CLGD6410, CLGD6412,








Linux XFree86 HOWTO 						      3



     CLGD6420, CLGD6440

   	 OAK OTI067, OTI077, OTI087

   	 Avance Logic ALG2101, ALG2228, ALG2301, ALG2302, ALG2308, ALG2401

      Chips & Technologies 65520, 65530, 65540, 65545, 65520, 65530, 65540,
     65545, 65546, 65548, 65550, 65554

      MX MX68000, MX680010

      Video 7/Headland Technologies HT216-32

      SiS 86C201, 86C202, 86C205

      ARK Logic ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT

      RealTek RTG3106

      Alliance AP6422

      Matrox MGA2064W and Mystique cards

      NVidia/SGS Thomson NV1, STG2000

¾мԵ SVGA ƬҲ֧Ԯ:

   	 8514/A (and true clones)

   	 ATI Mach8, Mach32, Mach64

   	 Cirrus CLGD5420, CLGD5422, CLGD5424, CLGD5426, CLGD5428, CLGD5429,
     CLGD5430, CLGD5434, CLGD5436, CLGD5440, CGLD5446, CLGD5462, CLGD5464.

   	 S3 86C911, 86C924, 86C801, 86C805, 86C805i, 86C928, 86C864, 86C964,
     86C732, 86C764, 86C765, 86C868, 86C968, 86C325, 86C988

   	 Western Digital WD90C31, WD90C33, WD90C24A

   	 Weitek P9000

   	 IIT AGX-014, AGX-015, AGX-016

   	 IBM XGA-2

   	 Tseng ET4000/W32, ET4000/W32i, ET4000/W32p, ET6000

   	 Ark Logic ARK1000PV, ARK1000VL, ARK2000PV, ARK2000MT

   	 MGA2064W

ʹЩƬʾб֧Ԯлʽ[bus type], VLB  PCI.

 Avance Logic, MX  Video 7 Ƭֻ֧Ԯ 256 ɫģʽ,








Linux XFree86 HOWTO 						      4



ȫͬʱ֧Ԯ 256 ɫ ɫģʽ. ʾװ㹻 DRAM,
ϾƬܶ඼֧Ԯÿλ[pixel] 16  32 λԪ[bits] ģʽ (رһЩ
Mach32, P9000, S3  Cirrus boards). ͨ趨ÿλ 8 λԪ (༴ 256
ɫ).

ɫŷʽ[monochrome server]Ҳ֧Ԯ generic VGA cards, Hercules monochrome
card, Hyundai HGC1280, Sigma LaserView,  Apollo monochrome cards.  Compaq
AVGA Ĳ, ֻ 64k ʾ֧Ԯɫŷʽ,  GVGA δԳ 64k
.

бʵؽʱ. XFree86 Ŀǰ汾 release notes
Ӧû֧ԮʾƬб.

XFree86 չٵһ,
ĳЩʾΪܶÿʹõʱƵ,ʹ÷Ǳ׼.
Щ,ЩҪûй,γʽſĹ;
ҪǾҪչǩһžɡ¶,ȡø.  Ե
XFree86 ɢ, Щ XFree86 չŶȥ.
кóһʱ,Ǹⷢ Diamond ĳЩʾ,  XFree86 
3.1 ʱ, Diamond ѾʼչŶӺ,ͳѵʽЩ.

 Linux  XFree86 һ̨ 486 , ٴ 8 megabytes RAM,
;гƬʾ. Ϊõı, ǽʹüٿ, 
S3-chipset card. Ӧü XFree86 ļ,
ھðһԵ̬,򰺹Ӳ֮ǰ,ȼض֧Ԯ.

Farrel McKay ռʾ XFree86 µȼȽ[benchmark ratings com
parisons]. Щػ USENET newsgroups comp.windows.x.i386unix2 ,
comp.os.linux.x3 , <URL:comp.benchmarks>, <URL:comp.sys.ibm.pc.hardware.video>.
ǿȡվ <URL:http://www.goof.com/xbench>.

һֵһ, Matt Welsh ( FAQ ķ) ĸ Linux system һ̨
486DX2-66, 20 megabytes RAM, װ 2 megabytes DRAM  VLB S3-864 chipset
card.  ڸû X benchmarks ,Ҳ Sun Sparc IPX workstations .
Linux system Ǳ Sparc IPX  7  (Ŀ̽,  Linux ¶øʾ
XFree86-3.1 Լܳ 171,000 xstones; Sparc IPX Լ 24,000). һ,
ʹü SVGA  Linux system µ XFree86 ҵϵ UNIX worksta
tions (ͨü򵥵 framebuffers ͼʾ[graphics]) нϼѵı.

ĻҪ 4 megabytes  physical RAM,  16 megabytes  virtual RAM
(, 8 megs physical  8 megs swap).  סе physical RAM
Խ,ϵͳȱҪ[swap]ȡӲԽ.  Ϊ[swap
ping](ŵϼ), Ҫ XFree86 Ļ,  8
megabytes RAM ǱҪ. 16 megabytes .   4 megabytes  physical
RAM ϵͳܱ 8 megs ϵͳ  (ɸߴ 10 ).





____________________

2. <URL:news:comp.windows.x.i386unix>

3. <URL:news:comp.os.linux.x>







Linux XFree86 HOWTO 						      5



3.  װ XFree86

п,ȡõ XFree86  Linux distribution[׼] һ, ,
ֿظûбҪ. ,Թһ.

XFree86  Linux binary distribution  FTP վҵ.   XFree86 վ,
 <URL:ftp://ftp.xfree86.org/pub/XFree86/current/binaries/Linux-ix86> (
дʱ, Ŀǰİ汾 3.2A; °汾ڵͳ).

κ֮ǰ,ִ `preinst.sh'  shell script.
Ը,İװ֮ǰ,Ҫ׵λйصȾҪ.

ֱ XFree86, бг XFree86-3.3 ׼еĵ.

 server ֮һǱ:

      X338514.tgz
	    Server for 8514-based boards.

      X33AGX.tgz
	    Server for AGX-based boards.

      X33I128.tgz
	    Server for the Number Nine Imagine 128.

      X33Mach32.tgz
	    Server for Mach32-based boards.

      X33Mach64.tgz
	    Server for Mach64-based boards.

      X33Mach8.tgz
	    Server for Mach8-based boards.

      X33Mono.tgz
	    Server for monochrome video modes.

      X33P9K.tgz
	    Server for P9000-based boards.

      X33S3.tgz
	    Server for S3-based boards.

      X33S3V.tgz
	    Server for the S3 ViRGE and ViRGE/VX (considered beta)

      X33SVGA.tgz
	    Server for Super VGA-based boards.

      X33W32.tgz
	    Server for ET4000/W32-based boards.

㲻֪Ҫȡһ,ȡ VGA16 server,X33VGA16.tgz.
,㶼Ҫһ,Ϊ㽫Ҫ¸ȥִԶ趨.








Linux XFree86 HOWTO 						      6



ȫǱ:

      preinst.sh
	    Pre-installation script

      postinst.sh
	    Post-installation script

      X33bin.tgz
	    The rest of the X11R6 binaries.

      X33cfg.tgz
	    Config files for xdm, xinit and fs.

      X33doc.tgz
	    Documentation.

      X33man.tgz
	    Manual pages.

      X33fnts.tgz
	    75dpi, misc and PEX fonts

      X33lib.tgz
	    Shared X libraries and support files.

      X33set.tgz
	    XF86Setup utility

      X33VG16.tgz
	    Server for VGA/EGA-based boards.

µѡԵ:

      X33f100.tgz
	    100dpi fonts

      X33fcyr.tgz
	    Cyrillic fonts

      X33fnon.tgz
	    Other fonts (Chinese, Japanese, Korean, Hebrew)

      X33fscl.tgz
	    Scalable fonts (Speedo and Type1)

      X33fsrv.tgz
	    Font server and config files

      X33prog.tgz
	    X header files, config files and compile-time libs

      X33lkit.tgz
	    X server LinkKit








Linux XFree86 HOWTO 						      7



      X33lk98.tgz
	    PC98 X server LinkKit

      X33nest.tgz
	    Nested X server

      X33prt.tgz
	    X print server

      X33vfb.tgz
	    Virtual framebuffer X server

      X33ps.tgz
	    PostScript version of the documentation

      X33html.tgz
	    HTML version of the documentation

Ǹ XFree86 Ŀ¼ӦðĿǰ汾 release notes  RELNOTES.
춰װϸ,ɲ춸ļ[RELNOTES].

Ҫװ XFree86 Ĺȡϵ, ( root )  /usr/X11R6 Ŀ¼,
ʹ /usr/X11R6 ⿪Щָ:

     gzip -dc X33bin.tgz | tar xfB -


סЩ tar  /usr/X11R6 Ŀ¼װ,
ԺҪҪǡװ.

Ҫȷ /usr/X11R6/bin  path .  Խɱ༭ϵͳڶ
/etc/profile  /etc/csh.login (˸,ϵͳеʹ,ʹõ
shell ).  Լ򵥵޸ /etc/.bashrc  /etc/.cshrc ( shell
) ѸĿ¼˵ path .

ҲҪȷ /usr/X11R6/lib ܱ runtime linker ld.so ҵ.  Ϊ,

     /usr/X11R6/lib


 /etc/ld.so.conf,  root ȥִ /sbin/ldconfig,


4.  趨 XFree86

4.1  һ趨

ǰ,Ҫ趨 XFree86 ԱʹĻ, , ʾ, ʾ, Ĳ,
ҪԶȥ趨͡Ե[hand-hacking] һܸӵ趨[configu
ration file], ǿ˵һֲԴ.  ڲҪ;
3.2/3.3ķ,ʹ̼ûʲ.  Ҫǿ XF86Setup ʽ.

ʽֽ³Ҵ EGA/VGA ֮ʾPCӲ.
 SVGA16 server ͽ׹ͨ 640x480 ģʽ X.








Linux XFree86 HOWTO 						      8



Ȼִлʽʽ,㾭趨 -- mouse, keyboard, (video)
card, monitor,  `other' (ʽ server ѡ). ȫ൱.

һСҪס,ʹĿǰPC, ļʵ XF86Setup
е `Generic 102-key PC (intl)' Ԥ `Generic 101-key PC'.
ѡԤ(101), [keyboard]ļұ(ּ [numeric keypad
and friends])ϵİȺ[key cluster]ܻû.

㲻ȷʾʽ[monitor type],гʽ.
ϰ(ѡǽϵ dot-clock ٶ,
ҶӲҪҲȽϵ). ˻һصŤ[distorted]ͼʱ,
[Back off]. СֵŤ (ͼ̫,̫С,ƫ)
ʲ; ǿϽ΢[fine-tuning] mode .

, ʽ xvidtune ȥ[tweak]ʾģʽ[video mode],
óʼľӴ[warning box]ʹе. ڶƵʾ[multisync monitors]
(ǰöƵ) Ϊⷽʽ.

4.2  

տʼ X server, ЩĿżû趨ȷ.
Ǽ趨еһЩ.  ͨʾ timing values
ȷ, ʾ dot clocks 趨ȷ.  Խ xvidtune ;
өĻʵǻҲʱ,ͨǱʾ Ҫص XF86Setup
ѡܱȽϵ͵ʾʽ[monitor type].

ʾ[roll], ߱ģ[fuzzy], رʾʾ tim
ing values  dot clocks Ǵ. , ҪȷȷָʾƬ, 
XF86Config е Device ֮ĿҲ.	Ҫȷʹȷ X
server , /usr/X11R6/bin/X з [symbolic link] server.

ʧܵ,  ''[bare]''  X; Ҳ,
ʹָ:

     X > /tmp/x.out 2>&1


ȻԿȥ X server (ʹ ctrl-alt-backspace ) Ҽ /tmp/x.out
. X server ᱨκξ漰---, ʾûһ dot clock
ʾ֧Ԯģʽ.

סʹ ctrl-alt-numeric +  ctrl-alt-numeric - л XF86Config
е Screen  Modes  гʾģʽ.
߽ģʽܿʵ,еϵ͵Ľ.	ٻ֪ X
趨ⲿȷ.

, һʾϵĴֱˮƽ֮С/׼Ŧ.  ںܶ, X
տʱ, ЩҪ. ٸ, ʾеƫһʱ,
ܹͨʹʾĿ.

USENET  newsgroup comp.windows.x.i386unix Ҫй XFree86,
comp.os.linux.x Ҳ. һ newsgroup
ЩʾйصҲǸ---ҲպÿĳЩ˸ͬ.









Linux XFree86 HOWTO 						      9



4.3  Զ趨

ʾ֧Ԯ 1600x1200 --  XF86Setup
װܹ֧֮ԮĽ 1280x1024,
ҪԶȥԵ[hand-hack] X ֮趨,Աȡѻı.

ɻ, ҪԶȥԵ[hand-hack]ʾ趨,
ȥһ LDP  XFree86 Video Timings HOWTO, <URL:http://sun
site.unc.edu/LDP/HOWTO/video-modes.html>. ( XFree86  `Videomodes.doc'
֮µ HTML 汾.)

4.4  ʹ 16-λԪ ɫ

ڶ, X ʹ 8-λԪ ɫ[color depth]256ɫ. Ϊܿ,
ܶӦóʽԼɫʶӦͼ[colormap],˲ɫת,
αӵԼɫʶӦͼ֮Ӵƶʱ.  Arena WWW .

ҪʹȽͼλӦóʽ,256ɫҲ㹻.  Լ򵥵ʹ 16-λԪ
ɫ 65K ɫ, ɿ X ʱ,ָ

	 startx -- -bpp 16

߽

	 exec X :0 -bpp 16

ڽ .xserverrc . Ҫע,еӦóʽ 16-bit
ɫ.

϶ɫҪʾͬʱתɸ. ʾӦ,
ǽ[resolution]Ǹ[refresh rate]Ҫ.  XFree
ڶǽͽ. Ҫֽȶ͸, ¼һʵ Mod
eline  XF86Config , 䶨͸µĽ.ٸ,
ȡֵ

     Modeline "1024x768"  75  1024 1048 1184 1328 768 771 777 806 -hsync -vsync




     Modeline "1024x768"  65  1024 1032 1176 1344 768 771 777 806 -hsync -vsync.


ħ 75  65 Ǹʱ[clock rates], Щҵ X ¼
.X.err . ѯһ XF86 ļ monitors ,й 16 λԪɫ
ʺʾܹʱʵ Modelines.


5.  ִ XFree86

 XF86Config 趨, ׼ X server һ, ȷ /usr/X11R6/bin
 path .

 XFree86 ָ








Linux XFree86 HOWTO 						     10



     startx


 xinit  front-end[ǰ˽] ( UNIX ϵͳ,ϰʹ xinit).

ָῪʼ X server ִĿ¼[home directory]֮ .xinitrc
ҵָ.    .xinitrc ֻǸҪִ X clients  shell script.
, ϵͳڶ /usr/X11R6/lib/X11/xinit/xinitrc ᱻʹ.

һ׼ .xinitrc :

     #!/bin/sh

     xterm -fn 7x13bold -geometry 80x32+10+50 &
     xterm -fn 9x15bold -geometry 80x34+30-10 &
     oclock -geometry 70x70-7+7 &
     xsetroot -solid midnightblue &

     exec twm


 script  xterm clients, һ oclock, 趨Ӵ[root win
dow]()ɫ ɫ[midnightblue].  ȻӴʽ twm. ע twm
 shell  exec [statement]ִе;  xinit [process] twm
ȡ. һ twm 뿪, X server ر.  ʹ root [menus] ʹ twm
뿪: 汳Ϸſ mouse ĵһ---⽫,ǽ뿪
Exit Twm.

ȷ .xinitrc еָ execΪͷ, ǲᱻڱִе
(ͷ,ûٽ[ampersand]ʲᶯ).  , X server ر˲,
ȥִ .xinitrc е client.

, ԰ ctrl-alt-backspace ֮ϼ뿪 X.  ֱӿ X server,
뿪Ӵϵͳ.

Ƿǳ,ǳ򵥵趨. Ҫóʽ趨ǿ .xinitrc
Լ޸ļ. , fvwm Ӵʽ ṩ,
ϲöɫ,,ӴСλõȵ.

½Ӵ X Window System ҵ; ǿҽѡһ The X Window
System: A User's Guide ĺ.	ʹ趨 X ʵǱȽԺܺ.
һ xterm, oclock,  twm  man pages, ʹϿʼ.

5.1  ʹõ

ļ 1996 İȨ Eric S. Raymond. ɵʹ, ɢ, 븴,
ֻҪ:

    ûԹȨע.

    ûԹ汾ż.

    ûԹļָĿǰ WWW 汾.









Linux XFree86 HOWTO 						     11



    رκŨ, , 汾.

ĿǱһЩǱڵĶ, ⿴ǾеĻ𻵵İ汾.
Ϊ, ѯһ.

5.2  л

This document was originated by Matt Welsh in the dim and backward abysm of
time.  Thanks, Matt!





















































Linux XFree86 HOWTO 						     12





































































				   CONTENTS



1.  ..................................................................... 1
   1.1 ѶԴ ......................................................... 1
   1.2 ļ°汾 ....................................................... 1
   1.3 غ붩 ........................................................... 2

2. Ӳ ................................................................. 2

3. װ XFree86 ............................................................. 5

4. 趨 XFree86 ............................................................. 7
   4.1 һ趨 ............................................................. 7
   4.2  ............................................................. 8
   4.3 Զ趨 ............................................................. 9
   4.4 ʹ 16-λԪ ɫ  ................................................. 9

5. ִ XFree86 ............................................................. 9
   5.1 ʹõ .......................................................... 10
   5.2 л ................................................................ 11


































				       i


