startx启动图形界面失败的几个解决方法

2020-01-30 12:12:37于丽


[fonts.dir]


775
UTI___14.pcf.gz -adobe-utopia-regular-i-normal--19-140-100-100-p-104-iso10646-1
UTBI__14.pcf.gz -adobe-utopia-bold-i-normal--19-140-100-100-p-109-iso10646-1
UTI___12.pcf.gz -adobe-utopia-regular-i-normal--17-120-100-100-p-89-iso10646-1
UTI___24.pcf.gz -adobe-utopia-regular-i-normal--33-240-100-100-p-179-iso10646-1
courO08.pcf.gz -adobe-courier-medium-o-normal--11-80-100-100-m-60-iso10646-1
UTBI__12.pcf.gz -adobe-utopia-bold-i-normal--17-120-100-100-p-93-iso10646-1
...

The first line specifies the number of fonts under current directory.
这第一行详细说明字体的数量在当前目录。
Following lines map file names to font names.
以下几行是字体文件的名字。

[fonts.alias]

lucidasans-bolditalic-8 -b&h-lucida-bold-i-normal-sans-11-80-100-100-p-69-iso8859-1
lucidasans-bolditalic-10 -b&h-lucida-bold-i-normal-sans-14-100-100-100-p-90-iso8859-1
lucidasans-bolditalic-12 -b&h-lucida-bold-i-normal-sans-17-120-100-100-p-108-iso8859-1
lucidasans-bolditalic-14 -b&h-lucida-bold-i-normal-sans-20-140-100-100-p-127-iso8859-1
lucidasans-bolditalic-18 -b&h-lucida-bold-i-normal-sans-25-180-100-100-p-159-iso8859-1
lucidasans-bolditalic-24 -b&h-lucida-bold-i-normal-sans-34-240-100-100-p-215-iso8859-1
...

This file maps font alias to font names. So it is clear that once font
这个文件显示字体文件的别名与原名。因此清楚知道从前字体的“fixed”是需要的,
'fixed' is needed, the font server search fonts.alias in each font path
字体服务在比赛中寻找字体别名在每一字体路径中。
for a match. If the match exists, the corresponding font file is specified
如果比赛是存在,那相应的字体文件是指定在fonts.dir。
in fonts.dir. If no match exists, which is a rare situation, the X server
如果比赛不存在,那是非常罕见的情形,字体服务不可以运行我们需要重建字体列表。
cannot start and we need to rebuild the font lists. The rebuilding process
这重建的过程
will generate new fonts.dir and fonts.alias files.
将会产生新的fonts.dir和fonts.alias文件。

3. Rebuild font list.
重建字体列表。

Font list can be rebuilt using the script file xfs under /etc/init.d.
运用格本文件xfs在/etc/init.d下,字体列表可以被重建
Following is an excerpt of the script:
以下是格本文件的摘录:

...
buildfontlist() {
pushd . &> /dev/null
for d in $(/usr/sbin/chkfontpath --list | cut -f 2 -d ':') ;do
if [ -d "$d" ]; then
cd $d
# Check if we need to rerun mkfontdir
NEEDED=no
if ! [ -e fonts.dir ]; then
NEEDED=yes
elif [ "$(find . -type f -cnewer fonts.dir 2>/dev/null)" != "" ];then
NEEDED=yes