LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-09-2004, 11:18 PM   #1
harry349
LQ Newbie
 
Registered: Nov 2003
Posts: 19

Rep: Reputation: 0
could not init font path element - Xvfb


I attempt to launch Xvfb in rc.local. I use the line:

/usr/X11R6/bin/Xvfb :1 -screen 0 160x120x8 &

This worked fine in RedHat 7.2. I am now using RedHat 9, and when that line executes, I get the following error message:

Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!

I'm not actually sure yet if the Xvfb session is launching or not, but I don't think it is. Any idea as to what the cause of this error message is, and how I can fix it so Xvfb works properly and I don't get the error message anymore?

Thanks!
----
Edit: It appears that Xvfb is still running properly despite this error/warning, however I'd still be interested in what I can do to resolve the issue. Furthermore, I do have a path

/usr/X11R6/lib/X11/fonts/CID/

but it is empty. Any ideas?

Last edited by harry349; 06-10-2004 at 07:40 AM.
 
Old 06-10-2004, 08:17 AM   #2
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
If the font path is empty, then there are no fonts there, so it should not be listed in the XFree86 configuration file. If it is (as implied by the error), I would remove that line, and also run mkfontdir to re-index the fonts that you have.

Hope this helps.
 
Old 06-10-2004, 08:42 PM   #3
harry349
LQ Newbie
 
Registered: Nov 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for your reply. Please excuse my ignorance, I guess I'm kind of a newbie when it comes to this stuff. I've just never had to mess with it before.

I looked in

/etc/X11/XF86Config
and
/etc/X11/fs/config

and neither contain any reference to "CID". I did notice that the latter file had a section that looked like this:

Code:
# where to look for fonts
#
catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
        /usr/X11R6/lib/X11/fonts/75dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/100dpi:unscaled,
        /usr/X11R6/lib/X11/fonts/misc,
        /usr/X11R6/lib/X11/fonts/Type1,
        /usr/X11R6/lib/X11/fonts/Speedo,
        /usr/X11R6/lib/X11/fonts/cyrillic,
        /usr/X11R6/lib/X11/fonts/TTF,
        /usr/share/fonts/default/Type1,
        ,
        /usr/lib/openoffice/share/fonts/truetype
Notice the effectively blank line. Yet the error occurs every time Xvfb launches, particularly after I reboot since it's in rc.local. What other configuration file(s) should I be checking?
 
Old 06-11-2004, 03:03 AM   #4
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
According to this page:
Quote:
NAME

Xvfb - virtual framebuffer X server

SYNOPSIS

Xvfb [option...]

OPTIONS

In addition to the normal server options described in the Xdec(1X) manual
page, Xvfb accepts the following command line switches:

-config configuration file
Specifies the name of a configuration file to use to configure the
loadable Xvfb server. The default configuration file is
/usr/var/X11/Xvfb.conf.
So I guess that would be the place to check. Sorry, I was under the impression that it read from the X server settings. My mistake.
 
Old 06-11-2004, 09:13 PM   #5
harry349
LQ Newbie
 
Registered: Nov 2003
Posts: 19

Original Poster
Rep: Reputation: 0
Thanks for your help so far.

Strangely, the man pages for Xvfb on my system make no reference to a -config parameter, nor a Xvfb.conf file. I also cannot find this file on my system (/usr/var doesn't even exist). Perhaps I have a different version of Xvfb? I tried using the "find" command to find it anywhere on disk, but I'm not sure I was using it properly. :/ Needless to say I don't *think* I have this file.

Any other ideas on how I might be able to rid myself of this message?
 
Old 06-13-2004, 07:15 AM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Well, about all you can do at this point is to try to fgrep your filetree to find out what file contains the string /usr/X11R6/lib/X11/fonts/CID/.

Which is not necessarily my idea of a fun afternoon, but since neither of our two potential configuration files are the ones that contain this string, and we have no idea where any other configuration file might be, or what it might be called, I don't see too many other options. I'm not too good at grepping, so I would refer you to man grep for more information on this command.

Hope this helps.
 
Old 07-10-2004, 02:56 AM   #7
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
I just booted with this error, and have fixed it. Here's how and why, in case it applies to you:

Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!

I had added ~/.xinitrc to get numlock to come on at boot, and I had not added "exec fluxbox"
under the window manager part. So following motub's advice, I ran mkfontdir after properly
editing the .xinitrc file, and wham...

back in Slack...


Edit: btw - I found this thread by entering
Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list!
in Google and it was the second post.

motub - good to see you dumped Windoze...

Last edited by Bruce Hill; 07-10-2004 at 02:59 AM.
 
Old 08-04-2004, 10:29 PM   #8
harry349
LQ Newbie
 
Registered: Nov 2003
Posts: 19

Original Poster
Rep: Reputation: 0
OK, here's where things stand.

First, thanks for your help thus far motub and Chinaman.

I kinda gave up on this for a month or two, but when I realized that my root account had gotten over 2500 e-mails (was getting an e-mail every 1/2 hour when my cron service that I set to run every half hour was failing to open its X display created by Xvfb), I decided I better revisit it.

I did a man grep, and based on that info, I didn't understand how fgrep would be what I would want to use, so I unmounted my windows partition and samba shares and did

grep -r usr/X11R6/lib/X11/fonts/CID /*

For a while I saw some heavy hard disk access, but nothing printed to the screen. I left for work. Came back to the PC over 12 hours later and there was no longer any hard disk access, but it had not printed anything to the screen and had not returned either. Wasn't sure what to make of that...

I hadn't modified ~/.xinitrc (doesn't even exist on my system) or /etc/X11/xinit/xinitrc, nor do I know what fluxbox is. I tried running mkfontdir anyway, and it returned immediately with no output, which I presume is normal.

I'm running out of ideas, but my next thought is to try to contact people more intimately familiar with Xvfb, since it is starting to look more like it's not running properly. Any additional ideas (things I might have been doing wrong with grep, or other ideas) would be greatly appreciated, thanks!
 
Old 08-05-2004, 08:29 AM   #9
djinn_fr
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
I am using Redhat ES 3.0 , and I get same errors to launch xvfb. I needed it in order to use some graphic libraries for tomcat.
I looked man page and find the argument -fp. I used it like that:
Xvfb :1 -fp /usr/X11R6/lib/X11/fonts/misc -screen 0 800x600x8&

And it works fine for me.
I think the default folder is /usr/X11R6/lib/X11/fonts/CID. But in my case, it's an empty one, so I change it to misc.

Hope it helps.
 
Old 08-05-2004, 09:50 AM   #10
harry349
LQ Newbie
 
Registered: Nov 2003
Posts: 19

Original Poster
Rep: Reputation: 0
That appears to have worked, thanks so much!!!

I don't know what the deal is, but my man pages for Xvfb really suck. They didn't reference any X configuration file parameter (motub's comment from earlier) or a "-fp" parameter, presumably "font path", yet that -fp parameter did work.

I no longer get the error message on launch. I'll send an update this afternoon regarding whether or not I continue getting errors upon use of the X display stating it could not be opened. I suspect I won't get these errors any longer either.

Thanks again!

EDIT:

Yep, that did the trick all right, thanks.

Last edited by harry349; 08-05-2004 at 07:51 PM.
 
Old 08-14-2004, 11:05 PM   #11
jpelletier
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
I had this message "could not find path element" when I was trying to install new truetype fonts. It seems that the utilities for creating the files 'font.dir' and 'font.scale' do not support spaces in the font's file name.

I use slackware 9.1 with Xfree86 4.3
 
Old 08-14-2004, 11:09 PM   #12
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Quote:
Originally posted by jpelletier
I had this message "could not find path element" when I was trying to install new truetype fonts. It seems that the utilities for creating the files 'font.dir' and 'font.scale' do not support spaces in the font's file name.

I use slackware 9.1 with Xfree86 4.3
Perhaps this will help you...

To remove the spaces in files ->
for i in *; do mv "$i" `echo $i | tr ' ' '_'`; done

The above was given me by Tinkster, and has proven valuable to me,
especially for files that I've migrated from Windoze ;-)
 
Old 08-15-2004, 08:12 AM   #13
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Nice one, Chinaman (she said as she copied and pasted to her 'useful tips and commands' file)! jpelletier's mileage may vary, but on the face of it, that ought to work.

And you said you wouldn't be learning any (Bash) scripting anytime soon....! Insanely useful, isn't it?

Though I find it odd... no, I see my mistake already. I was going to say that I find it odd that Xvfb should barf on Windows fonts with spaces in the filename, when I use fonts with spaces in the filename.... but then I realized I don't. The spaces are in the font display name (Comic Sans MS), not the filename (comic.ttf). A fine, but important distinction.

Of course, most Windows fonts-- at least the ones from MS, downloaded ones may be completely different-- generally don't contain spaces, so it might also be possible, if there are only a few fonts exhibiting this problem, to just rename them manually.

But running your/Tinkster's little scriptlet is just l33t, even if it's only 3 files that have to be renamed.
 
Old 08-15-2004, 08:19 AM   #14
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
It sure helps with stuff migrated from Windoze. I've used it to change the files
in the Windoze partition before moving or copying to a Linux partition that just
couldn't handle the spaces. Where I've found it most useful is really when the
copying needs to descend into directories - especaily for music that I've got
ripped to a Windoze partition. You know, when you work from the cli you
just can't have spaces in the filenames. But give all the credit to Tinkster,
as I'm still not "learning any bash scripting or commands." I do have a file
named ~/good_commands that I keep just such as this tucked away into
for reference. ;-)

To answer you properly, scripting is insanely useful, I'm just too far away
from that arena right now. As the Chinese say, "man man lai."

Last edited by Bruce Hill; 08-15-2004 at 08:20 AM.
 
Old 08-15-2004, 08:27 AM   #15
jpelletier
LQ Newbie
 
Registered: Aug 2004
Posts: 4

Rep: Reputation: 0
Quote:
Originally posted by Chinaman
Perhaps this will help you...

To remove the spaces in files ->
for i in *; do mv "$i" `echo $i | tr ' ' '_'`; done

The above was given me by Tinkster, and has proven valuable to me,
especially for files that I've migrated from Windoze ;-)
Thanks!
I've added it to a script that I've done for installing new fonts

Code:
#!/bin/bash

TRUE_TYPE_FONT_DIR=/usr/local/share/ttfonts
GHOSTSCRIPT_FONT_DIR=/usr/share/ghostscript/fonts

echo "Updating system with new true type files"

# Generate the necessary files for X11
pushd $TRUE_TYPE_FONT_DIR

# Remove spaces from fonts file names
for i in *; do mv "$i" `echo $i | tr ' ' '_'`; done

ttmkfdir -o fonts.scale
/usr/X11R6/bin/mkfontdir
echo X11 is updated

# Need to check if X11 is running; if not, skip this test
/usr/X11R6/bin/xset fp rehash -display localhost:0

# Now, generate the font files for printing
cd $GHOSTSCRIPT_FONT_DIR

# Generate a backup file if this program is ran for the first time
# After, the Fontmap file will always be regenerated from this backup
if [ ! -e Fontmap.org ]
then 
    cp Fontmap Fontmap.org
fi

ttfontmap $TRUE_TYPE_FONT_DIR > truetype.txt
cat Fontmap.org truetype.txt > Fontmap

echo Ghostscript is updated
popd
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not init font path element unix/:7100, removing from list! jeffreybluml Fedora 18 10-12-2011 09:06 AM
"Could not init font path element""Unix /: 7100 removing from list/ zameer_india Linux - Networking 7 07-03-2006 07:11 AM
Dropline 2.8.2 causes font path element error in X Windows jtp51 Slackware 1 12-30-2004 03:05 PM
Could not init font path element?? nu_us3r Linux - Newbie 4 08-25-2004 08:01 PM
Could not init font path element. Could not find default font "fixed" SidA Red Hat 0 06-19-2004 09:42 PM


All times are GMT -5. The time now is 11:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration