Thanks for pointing me Jeremy, Running fc-list does not give any errors, and the trace doesn''t point to an error. The error I get is during the start of X... So I tried tracing the startx command, but there is no reference at all to anything that has to do with fontconfig. I tried tracing startkde, but didn''t really find a clue. In the .xsession_errors file I get: [..] startkde: Starting up... Fontconfig error: Cannot load default config file Fontconfig error: Cannot load default config file kbuildsycoca running... Fontconfig error: Cannot load default config file kdecore (KLibLoader): WARNING: KLibrary: /opt/kde/lib/kde3/kcm_kdnssd.so: undefined symbol: init_kdnssd kxkb: WARNING: Unable to open /tmp/kde-thomas/dvorak.xkm: No such file or directory ERROR: Communication problem with khotkeys, it probably crashed. [..] And in the startkde script I see: [..] echo ''startkde: Starting up...'' 1>&2 # run KPersonalizer before the session, if this is the first login if kreadconfig --file kpersonalizerrc --group General --key FirstLogin --default true --type bool; then # start only dcopserver, don''t start whole kdeinit (takes too long) echo ''startkde: Running kpersonalizer...'' 1>&2 dcopserver kwin --lock & kpersonalizer --before-session # handle kpersonalizer restarts (language change) while test $? -eq 1; do kpersonalizer --r --before-session done dcopquit kwin dcopserver_shutdown --wait fi # the splashscreen and progress indicator splash=`kreadconfig --file ksplashrc --group KSplash --key Theme` if test "$splash" = "None"; then echo >/dev/null #nothing elif test "$splash" = "Simple"; then ksplashsimple else ksplash --nodcop fi # certain features such as Konqueror preloading work only with full KDE running KDE_FULL_SESSION=true export KDE_FULL_SESSION # We set LD_BIND_NOW to increase the efficiency of kdeinit. # kdeinit unsets this variable before loading applications. LD_BIND_NOW=true kdeinit +kcminit if test $? -ne 0; then # Startup error echo ''startkde: Could not start kdeinit. Check your installation.'' 1>&2 xmessage -geometry 500x100 "Could not start kdeinit. Check your installation." fi # finally, give the session control to the session manager # if the KDEWM environment variable has been set, then it will be used as KDE''s # window manager instead of kwin. # if KDEWM is not set, ksmserver will ensure kwin is started. # kwrapper is used to reduce startup time and memory usage # kwrapper does not return usefull error codes such as the exit code of ksmserver. # We only check for 255 which means that the ksmserver process could not be # started, any problems thereafter, e.g. ksmserver failing to initialize, # will remain undetected. test -n "$KDEWM" && KDEWM="--windowmanager $KDEWM" kwrapper ksmserver $KDEWM if test $? -eq 255; then # Startup error echo ''startkde: Could not start ksmserver. Check your installation.'' 1>&2 xmessage -geometry 500x100 "Could not start ksmserver. Check your installation." fi [..] Obviously, the first lines correspond to each other. But I can''t figure out where the configuration file of fontconfig is opened. How can I trace this? Thanks Jeremy C. Reed wrote:> On Fri, 22 Jul 2005, Thomas De Schampheleire wrote: > >> My main problem is the error "Fontconfig error: Cannot load default >> config file" I guess. > > >> Where is fontconfig looking for the configuration? How can I resolve >> the problem? > > > Use strace or ktrace to track this down. > > For example, on NetBSD I ran: > > ktrace fc-list > > and then ran kdump and saw: > > 6104 fc-list NAMI "/usr/pkg/etc/fontconfig/fonts.conf" > 6104 fc-list RET open 3 > ... > 6104 fc-list NAMI "/home/reed/.fonts.conf" > 6104 fc-list RET access -1 errno 2 No such file or directory > 6104 fc-list CALL access(0x804c280,4) > 6104 fc-list NAMI "/usr/pkg/etc/fontconfig/local.conf" > 6104 fc-list RET access -1 errno 2 No such file or directory > ... > > So I can clearly see what configurations it looks at (or attempts) and > in what order ... > > "strace fc-list" on another outputted: > > access("/etc/fontconfig/fonts.conf", R_OK) = 0 > open("/etc/fontconfig/fonts.conf", O_RDONLY) = 3 > fstat64(3, {st_mode=S_IFREG|0644, st_size=11518, ...}) = 0 > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, > -1, 0) = 0 > xb7feb000 > read(3, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 8192 > access("/home/reed/.fonts.conf", R_OK) = 0 > open("/home/reed/.fonts.conf", O_RDONLY) = 4 > ... > open("/etc/fontconfig/local.conf", O_RDONLY) = 4 > fstat64(4, {st_mode=S_IFREG|0644, st_size=350, ...}) = 0 > ... > > > Jeremy C. Reed > > BSD News, BSD tutorials, BSD links > http://www.bsdnewsletter.com/ > > >
On Fri, 22 Jul 2005, Thomas De Schampheleire wrote:> The error I get is during the start of X... So I tried tracing the startx > command, but there is no reference at all to anything that has to do with > fontconfig.That makes me think that you have multiple libfontconfig installed -- some using non-existent config.> I tried tracing startkde, but didn''t really find a clue. In the > .xsession_errors file I get:strace needs switches to follow children too.> Fontconfig error: Cannot load default config fileMaybe try: strings /usr/lib/libfontconfig.so | egrep "/.*(conf|font)" Or wherever your libfontconfig is at. That worked for me on two systems to show where my configuration directory was at. Jeremy C. Reed BSD News, BSD tutorials, BSD links http://www.bsdnewsletter.com/
On Fri, 22 Jul 2005, Thomas De Schampheleire wrote:>> That makes me think that you have multiple libfontconfig installed -- some >> using non-existent config. > > I did a locate and there is only one libfontconfig on my system.locate doesn''t tell you what is currently on your system -- unless you rebuild the locate database immediately before running locate.>> strings /usr/lib/libfontconfig.so | egrep "/.*(conf|font)" >> >> Or wherever your libfontconfig is at. >> >> That worked for me on two systems to show where my configuration directory >> was at. > > It returns > /fonts.cache-1 > ~/.fonts.cache-1 > /etc/fonts > /usr/share/fonts > > there is a config file in /etc/fonts, but not in /usr/share/fonts, that > directory doesn''t exist. > > what to do now?Use strace -f to follow all children. (Be sure to capture stderr.) And then search through the tens of thousands of lines for what triggered the error. Jeremy C. Reed BSD News, BSD tutorials, BSD links http://www.bsdnewsletter.com/
On Sat, 23 Jul 2005, Thomas De Schampheleire wrote:>> Use strace -f to follow all children. (Be sure to capture stderr.) And then >> search through the tens of thousands of lines for what triggered the error. > > When I do that I get a fatal error that X cannot copy its old log file to > .old... I don''t know why, but it really is the -f switch that causes the > error.Start X server without any clients except just a single xterm (that is not built with libfontconfig). Then do a strace to start up other apps. Jeremy C. Reed BSD News, BSD tutorials, BSD links http://www.bsdnewsletter.com/
On Fri, 22 Jul 2005, Thomas De Schampheleire wrote:> My main problem is the error "Fontconfig error: Cannot load default config > file" I guess.> Where is fontconfig looking for the configuration? How can I resolve the > problem?Use strace or ktrace to track this down. For example, on NetBSD I ran: ktrace fc-list and then ran kdump and saw: 6104 fc-list NAMI "/usr/pkg/etc/fontconfig/fonts.conf" 6104 fc-list RET open 3 ... 6104 fc-list NAMI "/home/reed/.fonts.conf" 6104 fc-list RET access -1 errno 2 No such file or directory 6104 fc-list CALL access(0x804c280,4) 6104 fc-list NAMI "/usr/pkg/etc/fontconfig/local.conf" 6104 fc-list RET access -1 errno 2 No such file or directory ... So I can clearly see what configurations it looks at (or attempts) and in what order ... "strace fc-list" on another outputted: access("/etc/fontconfig/fonts.conf", R_OK) = 0 open("/etc/fontconfig/fonts.conf", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=11518, ...}) = 0 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0 xb7feb000 read(3, "<?xml version=\"1.0\"?>\n<!DOCTYPE "..., 8192) = 8192 access("/home/reed/.fonts.conf", R_OK) = 0 open("/home/reed/.fonts.conf", O_RDONLY) = 4 ... open("/etc/fontconfig/local.conf", O_RDONLY) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=350, ...}) = 0 ... Jeremy C. Reed BSD News, BSD tutorials, BSD links http://www.bsdnewsletter.com/
Jeremy C. Reed wrote:> On Fri, 22 Jul 2005, Thomas De Schampheleire wrote: > >> The error I get is during the start of X... So I tried tracing the >> startx command, but there is no reference at all to anything that has >> to do with fontconfig. > > > That makes me think that you have multiple libfontconfig installed -- > some using non-existent config.I did a locate and there is only one libfontconfig on my system. I did mess around with the fontconfig, see my original post...> >> I tried tracing startkde, but didn''t really find a clue. In the >> .xsession_errors file I get: > > > strace needs switches to follow children too. > >> Fontconfig error: Cannot load default config file > > > Maybe try: > > strings /usr/lib/libfontconfig.so | egrep "/.*(conf|font)" > > Or wherever your libfontconfig is at. > > That worked for me on two systems to show where my configuration > directory was at.It returns /fonts.cache-1 ~/.fonts.cache-1 /etc/fonts /usr/share/fonts there is a config file in /etc/fonts, but not in /usr/share/fonts, that directory doesn''t exist. what to do now?> > Jeremy C. Reed > > BSD News, BSD tutorials, BSD links > http://www.bsdnewsletter.com/ > > >
Jeremy C. Reed wrote:> On Fri, 22 Jul 2005, Thomas De Schampheleire wrote: > >>> That makes me think that you have multiple libfontconfig installed -- >>> some using non-existent config. >> >> >> I did a locate and there is only one libfontconfig on my system. > > > locate doesn''t tell you what is currently on your system -- unless you > rebuild the locate database immediately before running locate.I did a rebuild of the db.> >>> strings /usr/lib/libfontconfig.so | egrep "/.*(conf|font)" >>> >>> Or wherever your libfontconfig is at. >>> >>> That worked for me on two systems to show where my configuration >>> directory was at. >> >> >> It returns >> /fonts.cache-1 >> ~/.fonts.cache-1 >> /etc/fonts >> /usr/share/fonts >> >> there is a config file in /etc/fonts, but not in /usr/share/fonts, >> that directory doesn''t exist. >> >> what to do now? > > > Use strace -f to follow all children. (Be sure to capture stderr.) And > then search through the tens of thousands of lines for what triggered > the error.When I do that I get a fatal error that X cannot copy its old log file to .old... I don''t know why, but it really is the -f switch that causes the error.> > Jeremy C. Reed > > BSD News, BSD tutorials, BSD links > http://www.bsdnewsletter.com/ > > >
Hi, I''m having problems with fontconfig configuration files. I first had fontconfig installed in /usr/local but then I decided to reinstall it in /usr. Since then I had some serious font problems in X, and after some trying I couldn''t even get into X (kde). Now I reinstalled X completely and can get into it via a workaround ( startx /opt/kde/bin/startkde --:0 ) The errors I''m getting is after loading X: ~/.xsession-errors 01 stderr is not a tty - where are you? 02 xset: bad font path element (#72), possible causes are: 03 Directory does not exist or has wrong permissions 04 Directory missing fonts.dir 05 Incorrect font server address or syntax 06 xset: bad font path element (#72), possible causes are: 07 Directory does not exist or has wrong permissions 08 Directory missing fonts.dir 09 Incorrect font server address or syntax 10 startkde: Starting up... 11 Fontconfig error: Cannot load default config file 12 Fontconfig error: Cannot load default config file 13 kbuildsycoca running... 14 Fontconfig error: Cannot load default config file I don''t know what line one means, but I don''t think that''s the problem. My main problem is the error "Fontconfig error: Cannot load default config file" I guess. I have the following config files: /home/thomas/.fonts.conf /etc/fonts/fonts.conf I also added a symlink to the global file from /usr/local/etc/fonts/fonts.conf but that doesn''t seem to help. Where is fontconfig looking for the configuration? How can I resolve the problem? I found the same error on this list, but am not able to open the reply (blank page): http://lists.freedesktop.org/pipermail/fontconfig/2003-September/000635.html Thanks for any help.