Many Linux users have such a painful experience. When you log in and type this lovely startx as usual, you just receive an error message.
Many of us gnu/linux users have had such a terrible experience. When you
Many Linux users have such a painful experience. When you
login and type the sweet startx as usual, you only receive scrolling lines
When you log in and enter this lovely startx as usual, you just receive
of error messages. One copy of the error message is usually stored in
Error message. Errors are usually stored in
/var/log/XFree86.0.log. If you can access the log file, you will notice
/var/log/XFree86.0. log。 If you read this log file, you will notice
the last lines of the file may look like this:
The last line of the file usually looks like this:
Could not init font path element unix/:7100, removing from list!
Fatal server error:
could not open default font ‘fixed’
I have to admit that I was in panic when I saw this message in the first
I have to admit that I was scared when I first saw these messages.
several times. As an intermediate user of linux system, I was not so
As an intermediate Linux system user, I feel that it is difficult to dial with the command console and surf with Lynx
comfortable using text console for modem dialup and surfing with lynx. So
Comfortable surfing. therefore
I had to spend a lot of time on another box and use Google to search for
I have to spend a lot of time on another computer using Google to search for help on the Internet.
help on web. It was amazing that so many people like me have this exact
It’s amazing how many people like me have
terrible experience and those replies in web forums and mailing lists
Horrible experiences and responses to online forums and mailing lists
generally offer more sympathy than real help. Using our common sense and
It usually offers more compassion than real help. With our general understanding and
some research, most of us can figure out this failure has something to do
Research, most of us can judge that this is an X fontserviceFailed for.
with X font server.
After having done a little more research, now I believe that this failure
After further research, I now believe that
may not be so serious as it looks. Please follow me by doing the steps
It’s not as serious as people think. Please follow me through the following steps,
below, in most of the cases you will get your X windows starting up again.
In most cases, you will be able to re-enter x windows.
Note: The following examples run on my Red Hat box. But I believe they are
Note: these examples are on my red hat system. But I believe them
general enough to be used for other distributions.
Usually enough for other distributions.
1. Check if the X font server is running.
1. Check x fontserviceWhether it is running.
Some people like me tend to suspect it is caused by bugs in the X font
Some people, like me, tend to suspect that this is made up of XserviceCaused by the bugs of,
server, but it turned out that X font server is quite robust. We can run
But it proves that the X fontserviceIs good. We can run
the xfs script under /etc/init.d to see if the font server is running.
The XFS grid folder is located in /etc/init D to see if the fontserviceRunning.
[[email protected] /root]# /etc/init.d/xfs status
xfs (pid 1385) is running…
In some cases, the only reason for the failure is that the font server is
In some cases, the only reason for failure is the fontservicestop it
dead. So, you need to restart font server like this:
So you need to restart the fontserviceLike this:
[[email protected] /root]# /etc/init.d/xfs start
Starting xfs: [ OK ]
Well, my learned lesson is don’t take this ‘[OK]’ for granted. You have to
OK, my study course doesn’t admit that OK is true. You must
check the status again to see if it is running. If it does run, you can
Check the condition again to see if it is running. If it doesn’t work, you can try
try startx to see if you can start X windows. If you still cannot start X
Startx to see if you can start x windows. When fontserviceWhen running, if you still can’t run x
server when the font server runs, it means you are having more serious
serviceIt means you have more serious mistakes.
trouble. You need to waste a little more time reading on the following
You need to spend a little more time reading the following steps.
Note: In a weird case, my root partition was fully filled by two huge log
Note: in an odd case, my root directory is full of two information files larger than 2GB.
files occupying more than 2 GB. The font server dies when it cannot write
When it is impossible to write into /tmp fontservicestop it.
to /tmp. So the simple solution was finding the huge files and deleting
So some examplessolveThe way is to find huge files to delete them.
2. Check if the font ‘fixed’ is accessible.
Check whether the font “fixed” is understandable.
Now it is time to ensure that the font ‘fixed’ is accessible. First, we
It is time to make sure that the font “fixed” is affected. first
can use command fslsfonts to see if font ‘fixed’ exists in the search
We can run the command fslsfonts to see if the font exists in the path we are looking for:
[[email protected] alex]# fslsfonts -server unix/:7100 -ll -fn fixed
DIR MIN MAX EXIST DFLT ASC DESC NAME
–> 0 255 some 0 11 2 fixed
COPYRIGHT Public domain font. Share and enjoy.
This is the normal output when ‘fixed’ is available. Here, we can see that
When “fixed” is available, this is the normal output. We can see that
‘fixed’ is actually an alias for the font
“Fixed” is actually an alias for a font.
there is no font ‘fixed’, we first need to gain knowledge of the search
If the font is not “fixed”, we first need to get more information on the path where the font is located.
path for fonts. We can use command chkfontpath to look at those paths:
We can use the command chkfontpath to see the paths:
[[email protected] alex]# /usr/sbin/chkfontpath
Current directories in font path:
These are the font paths on my box. It shows that xfs looks into these
These font paths are on my computer. It shows that XFS looks at these paths for a particular font when it is fixed.
paths seeking a specific font when it is required. There are two types of
There are two types of important documents:
important files: fonts.dir in each of these paths, and fonts.alias in some
fonts. Dir in each path, and fonts Alias is in some paths.
of the paths. For example, let’s go to /usr/X11R6/lib/X11/fonts/100dpi,
For example, let’s go to /usr/x11r6/lib/x11/fonts/100dpi,
and open the files. The files look like this:
And open the file. The file looks like this:
The first line specifies the number of fonts under current directory.
This first line details the number of fonts in the current directory.
Following lines map file names to font names.
The following lines are the names of the font files.
This file maps font alias to font names. So it is clear that once font
This file displays the alias and original name of the font file. Therefore, it is necessary to clearly know the “fixed” of the previous font,
‘fixed’ is needed, the font server search fonts.alias in each font path
typefaceserviceFind font aliases in each font path in the game.
for a match. If the match exists, the corresponding font file is specified
If the match exists, the corresponding font file is specified in fonts dir。
in fonts.dir. If no match exists, which is a rare situation, the X server
If the game doesn’t exist, that’s a very rare case, fontserviceNo, we need to rebuild the font list.
cannot start and we need to rebuild the font lists. The rebuilding process
This is the process of reconstruction
will generate new fonts.dir and fonts.alias files.
A new fonts Dir and fonts Alias file.
3. Rebuild font list.
Rebuild the font list.
Font list can be rebuilt using the script file xfs under /etc/init.d.
Use the geben file XFS in /etc/init D, the font list can be reconstructed
Following is an excerpt of the script:
The following is an extract from this document:
pushd . &> /dev/null
for d in $(/usr/sbin/chkfontpath –list | cut -f 2 -d ‘:’) ;do
if [ -d “$d” ]; then
# Check if we need to rerun mkfontdir
if ! [ -e fonts.dir ]; then
elif [ “$(find . -type f -cnewer fonts.dir 2>/dev/null)” != “” ];then
if [ “$NEEDED” = “yes” ]; then
if [ -L /usr/X11R6/bin/X ]; then
echo -n $”Starting $prog: “
[ -x /usr/sbin/chkfontpath ] && buildfontlist
rm -fr /tmp/.font-unix
daemon xfs -droppriv -daemon
[ $ret -eq 0 ] && touch /var/lock/subsys/xfs
For readers not familiar with shell programming, this excerpt means that
Because the reader is not familiar with running the command program, this grid file means that every time the XFS grid is running,
each time xfs script is run, it will check whether there is a fonts.dir
It will check for fonts Dir is in every wordbook path in the list.
file in each listed font path. If fonts.dir is missing in a path, font
When fonts Dir disappears in the path, and the font list needs to be rebuilt.
list needs to be rebuilt. If a fonts.dir does exist for each path, it will
If fonts Dir does not exist in every path, it will
check if the status of any file in the font directory is changed after the
Check whether all files in the font directory are changed in fonts Dir last changed.
last change of fonts.dir. If this is true, the font list also needs to be
If this is true, the font list also needs to be rebuilt.
For newbies not interested in learning shell programming, we play a small
AsnetworkNovices are not interested in learning commands. We play a trick in the subroutine buildfontlist ().
trick in the subroutine buildfontlist(). We can set “NEEDED=yes” in the
We canset up“Needed=yes” forces the reconstruction of the font list in the first case.
first instance to force the rebuilding of font list.
4. Fonts really missing?
Is the font really missing?
If all steps above fail. My last suggestion is to check if the font file
If all the above steps fail. My last comment is to check whether the font file
is really removed by some processes. Then you need to reinstall the font.
Actually deleted by some programs. Then you need to reset upFont. ‘