用xf86config进行X-WINDOW配置
X-WINDOW是一种风行于UNIX的图形界面,现在它已经成功地移植到了LINUX平台上,装上X-WINDOW这一漂亮的门面,一定能让LINUX蓬荜生辉。它的最大特点是设备无关性,安装完后只要用xf86config配置一下就可以立马上班了。
听了这许多介绍,加上我装的是Red Hat Linux,X-WINDOW已经在我的系统里呆着了,我急不可待地在命令行上输入xf86config,原本认为一锤定音,哪想到却是大费周折:
首先当然得准备好资料,我将显示器和显卡的说明书放在案边,因为在设定
Xwindow时要知道显示器的垂直及水平扫描频率;还有显卡的主芯片,显存大小;DAC芯片和时钟芯片型号。
运行xf86cofnig后,前面几个画面没什麽重要的, 一直按ENTER直到设定鼠标的地方!屏幕上出现:
First specify a mouse protocol type. Choose one from the following list:
1. Microsoft compatible (2-button protocol)
2. Mouse Systems (3-button protocol)
3. Bus Mouse
4. PS/2 Mouse
5. Logitech Mouse (serial, old type, Logitech protocol)
6. Logitech MouseMan (Microsoft compatible)
7. MM Series
8. MM HitTablet
相信大家都知道自己的爱鼠该选那一种的吧??如果你的鼠标是可以2键与3键切换的,建议你使用3键的!!因为Xwindow下会使用到第三个键! 另外罗技的鼠标一般都应该要选第六项!我的小老鼠嘛,最常见,选2。
选好之后,会根据你选的mouse问一些东西!你可以看说明来决定要选Yes或No!根据我的经验一路回车下去就搞定了。直到屏幕上出现:
Please answer the following question with either ''y'' or ''n''.
Do you want to enable these bindings for the Alt keys?
要我们设置键盘,直接按Enter就行了!
注意,好戏上场了,屏幕显示:
It is VERY IMPORTANT that you do not specify a monitor type with a horizontal sync range
that is beyond the capabilities of your monitor.
If in doubt,choose a conservative setting.
hsync in kHz; monitor type with characteristic modes
1 31.5; Standard VGA, 640x480 @ 60 Hz
2 31.5 - 35.1; Super VGA, 800x600 @ 56 Hz
3 31.5, 35.5; 8514 Compatible, 1024x768 @ 87 Hz interlaced (no 800x600)
4 31.5, 35.15, 35.5; Super VGA, 1024x768 @ 87 Hz interlaced, 800x600 @ 56 Hz
5 31.5 - 37.9; Extended Super VGA, 800x600 @ 60 Hz, 640x480 @ 72 Hz
6 31.5 - 48.5; Non-Interlaced SVGA, 1024x768 @ 60 Hz, 800x600 @ 72 Hz
7 31.5 - 57.0; High Frequency SVGA, 1024x768 @ 70 Hz
8 31.5 - 64.3; Monitor that can do 1280x1024 @ 60 Hz
9 31.5 - 79.0; Monitor that can do 1280x1024 @ 74 Hz
10 Enter your own horizontal sync range
Enter your choice (1-10):
让你选择屏幕的水平扫描频率,如果你有显示器说明书,按说明书选择,或选10
自己输入。如果没有说明书,选5比较合适。接下来就是设定垂直扫描频率了:
You must indicate the vertical sync range of your monitor. You can either
select one of the predefined ranges below that correspond to industry-
standard monitor types, or give a specific range. For interlaced modes,
the number that counts is the high one (e.g. 87 Hz rather than 43 Hz).
1 50-70
2 50-90
3 50-100
4 40-150
5 Enter your own vertical sync range
一样的,根据说明书来选择,或选5自己输入。如果没有说明书,选2一般没问题。
接着,它会问你显示器厂家型号, 随便输入就可以了!干脆,一路回车,搞定。
屏幕上出现了选择显卡类型的提示:
Do you want to look at the card database? (按y,列出下一页)
0 S3 Trio64V+
1 ......
这里,它会列出近400百种显卡供你选择,选择与你相符的显卡。
下面就是让我们选择自己的X服务器,这个选项是一定要选的。
1 The XF86_Mono server. This a monochrome server that should work on any
VGA-compatible card, in 640x480 (more on some SVGA chipsets).
2 The XF86_VGA16 server. This is a 16-color VGA server that should work on
any VGA-compatible card.
3 The XF862_SVGA server. This is a 256 color SVGA server that supports a
a number of SVGA chipsets. It is accelerated on some Cirrus and WD
chipsets; it supports 16/32-bit color on certain Cirrus configurations.
4 The accelerated servers. These include XF86_S3, XF86_Mach32, XF86_Mach8,
XF86_8514, XF86_P9000, XF86_AGX, XF86_W32 and XF86_Mach64.
These four server types correspond to the four different ""Screen"" sections
in XF86Config (vga2, vga16, svga, accel).
Which one of these screen types do you intend to run by default (1-4)?
如果用户的显示卡是S3/Mach32/Mach8/8514/P9000/AGX/W32/S3 Virge系列就可以在第
四个选项中挑选自己的服务器,否则只能选择3,使用256色了。如果连选3都无法正常启动
X-WINDOW,那你只有选2,享用那丑陋的16色了,要么就只能换块卡了。像笔者的Trident
9685,只能选3,忍受那平谈无奇的256色。
接下来它会问你要不要做连接! 请选Y
Please answer the following question with either ''y'' or ''n''.
Do you want me to set the symbolic link?
然后它问你:Do you want to set it in /var/X11R6/bin?是否存盘,当然回答Y了。
显存大小:
How much video memory do you have on your video card:
1 256K
2 512K
3 1024K
4 2048K
5 4096K
6 Other
Enter your choice:
我的显卡有2MB的显存,所以选4 !
又是厂牌和型号, 随便给它几个英文字就可以了!象我索性送几个回车给它。
接下来是RAMDAC chip的设定...
The RAMDAC setting only applies to the S3 and AGX servers. Some RAMDAC''s are
auto-detected by the server. The detection of a RAMDAC is forced by using a
Ramdac ""identifier"" line in the Device section. The identifiers are shown
at the right of the following table of RAMDAC types:
1 AT&T 20C490 (S3 server) att20c490
2 AT&T 20C498/21C498/22C498 (S3) att20c498
3 AT&T 20C505 (S3) att20c505
4 BrookTree BT481 (AGX) bt481
5 BrookTree BT482 (AGX) bt482
6 BrookTree BT485/9485 (S3) bt485
7 Sierra SC15025 (S3, AGX) sc15025
8 S3 GenDAC (86C708) (autodetected) s3gendac
9 S3 SDAC (86C716) (autodetected) s3_sdac
10 STG-1700 (S3) stg1700
11 TI 3020 (S3) ti3020
12 TI 3025 (S3) ti3025
13 Normal DAC normal
Just press enter if you don''t want a Ramdac setting.
What Ramdac setting do you want (1-13)?
有说明书,可以对照说明书,但我建议有最省事的方法,按个q键,让它自己查。
再下来就是最讨厌的Clock chip的设定了:
A Clockchip line in the Device section forces the detection of a
programmable clock device. With a clockchip enabled, any required
clock can be programmed without requiring probing of clocks or a
Clocks line. Most cards don''t have a programmable clock chip.
Choose from the following list:
1 Chrontel 8391 (uncertain at the time of writing) ch8391
2 ICD2061A and compatibles (ICS9161A, DCS2824) icd2061a
3 ICS2595 ics2595
4 ICS5342 (similar to SDAC, but not completely compatible) ics5342
5 S3 GenDAC (86C708) and ICS5300 (autodetected) s3gendac
6 S3 SDAC (86C716) s3_sdac
7 Sierra SC11412 sc11412
8 TI 3025 ti3025
Just press enter if you don''t want a Clockchip setting.
What Clockchip setting do you want (1-8)?
由于说明书常常不写出这颗芯片的型号,所以......唉,天无绝人之路,按下回车键,等待它自己去检测吧!
注意盯着屏幕,当屏幕上出现:Do you want me to run ''X-probeonly'' now?一定要按Y,否则,它就不会做检测了。
最后就是选择显示模式:
For each depth, a list of modes (resolutions) is defined. The default
resolution that the server will start-up with will be the first listed
mode that can be supported by the monitor and card.
Currently it is set to:
""640x480"" ""800x600"" ""1024x768"" ""1280x1024"" for 8bpp
""640x480"" ""800x600"" ""1024x768"" for 16bpp
""640x480"" ""800x600"" for 32bpp
Note that 16bpp and 32bpp are only supported on a few configurations.
Modes that cannot be supported due to monitor or clock constraints will
be automatically skipped by the server.
1 Change the modes for 8pp (256 colors)
2 Change the modes for 16bpp (32K/64K colors)
3 Change the modes for 32bpp (24-bit color)
4 The modes are OK, continue.
Enter your choice:
干脆,一个回车完事。反正没多大用处。
然后屏幕提示:Shall I write it to /etc/XF86Config?输入Y,存盘结束。
终於完成了!真是劳神伤身,惊心动魄的时候到了。输入startx。如果你看到漂亮的Xwindow,那么祝贺你大功告成了。否则,真是悲惨世界:-<,大侠请重新来过。只好让你根据上面的介绍再配一遍吧。
其实,X-Win由两个部分组成:X服务器和窗口管理器。上面我们配置的就是X服务器,我们还应该学会为X-WIN改改面孔,才能真正随心所欲装点自己的LINUX哦。
X服务器只管理如何显示图形界面,如何响应键盘和鼠标的输入等等,但它不提供用户界面。窗口管理器则是在X服务器的基础上提供用户界面。这种分工使得开发X服务器的人专心于提高X的整体性能,开发窗口管理器的人专心于美化界面。正是因为这样,同是X-WIN,大家可以根据自己的喜爱来选择窗口管理器,也就是用户界面。
现在流行的窗口管理器有:fvwm、fvwm95、AfterStep、Enlightenment、KDE。我用的RED HAT LINUX 5.1安装版,选用fvwm作为X-WIN的窗口管理器。
fvwm是X-WIN的窗口管理器中最早最平凡的一种。fvwm95是从fvwm中发展演变而来的,它提供了虚拟工作区,可以用键盘来移动屏幕移动窗口和对窗口进行基本操作等等,提供了外部和内部命令两种方式来进行操作,并且提供窗口聚焦随属标的移动而变化的功能。而且还提代了事件音乐的功能。从外观上窗口就象WIN95一样,提供3D界面......我想fvwm95的取名与WIN95有紧密的关系吧!你可以找到它的RPM安装包,用RPM来安装它。
AfterStep是一个很漂亮的窗口管理器。它具有华丽的图标和界面,而且所有图标都是立体的,当然你也得为它付出“昂贵”的代价,带2M显存的视频加速卡。不过对于我们的玩家来说,应该不成问题!如果你对它满意的话,开动你的“猫”,目标mango.sfasu.edu/~frank/afterstep。安装十分简单,以超极权限者root登录系
统,将取回的文件弄到LINUX中来,在一个目录中展开。然后运行Installme,确定安装后,系统将询问使用64K色显示模式,如果你的显卡符合要求,一定要选是(Y),否则只有256色,真丑:-<。接着输入允许使用的用户列表,每个用户以空格分开,最多十个。参数输入后,安装将自动进行,很快你就可以享受了。:-P
Enlightenment比AfterStep更具有神秘色彩,阴森恐怖是它独具的风格,我试用后真的赞同网上传说的:AfterStep是天使,Enlightenment是魔鬼。这个窗口管理器的安装略显麻烦,不过我终于找到了它的RPM安装包,一下就行了。
KDE,大红大紫,可谓是窗口管理器中的明星。你看图(kde1.jpg kde2.jpg),我在光盘上找到它的RPM安装包后,立马装上,用一会儿就喜欢上它了。现在我的X-WIN中还用它作门面,许多朋友一看就爱屋及乌地爱上了LINUX。
真是人要衣装,佛要金装。这些美丽动人的界面仿佛完完全全洗去了我征战LINUX的倦意。我想你们也一定会喜欢上它们的。