LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-20-2006, 04:02 PM   #1
jam222
Member
 
Registered: Feb 2004
Posts: 56

Rep: Reputation: 15
font error with KDE


Whenever I shutdown kde I see the error on the screen

xset: bad path element (#162), possible causes are
Directory does not exist or has wrong permissions
Directory missing fonts.dir
Incorrect font server address or syntax

Though the KDE functions OK

Can anyone please tell me how can I get rid of this error
 
Old 08-20-2006, 06:14 PM   #2
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 -current
Posts: 2,300

Rep: Reputation: 90
You could try running fc-cache
 
Old 08-20-2006, 07:04 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Can anyone please tell me how can I get rid of this error
This error message is a pet peeve of mine. Not that I make a difference in this world, but after, what?, four years of using KDE this error message continues to haunt people and the KDE developers do not add some error proofing to eliminate the root cause.

The message means exactly what is reported: there is a missing fonts.dir. With KDE this message happens with four KDE font locations. You can discover those locations by reviewing the $KDE/bin/startkde script.

IIRC the locations are $KDE/share/fonts, $KDE/share/fonts/override, ~/.fonts, and ~/.fonts/override.

In Slackware, $KDE = /opt/kde.

The problem is caused by an empty font directory that the startkde script validates. I got so tired of these messages that I inserted echo messages in the script so that if I see these messages---common when updating KDE---I can toggle the echo messages and then pin-point exactly which of the four directories is the culprit.

I have a copy of my modified startkde script at my web site: startkde-3.4.3. Some of the mods I made to the script will make no sense unless you browse A More "Intelligent" startx Script.

Bear in mind that this script is customized for my box, for KDE 3.4.3, and you know the legalese. When you review the script, look for references to sys_fdir, sys_odir and usr_fdir, usr_odir. Enable those related echo messages, and then when you run or shutdown KDE, look at the xsession errors log in your home directory. You then will know which KDE-based font directory needs attention.

I hope this helps.
 
Old 08-22-2006, 04:42 PM   #4
jam222
Member
 
Registered: Feb 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks for the response. Can you please tell me what is the name of the error log file as I cannot see any xsession error log file in my home directory and once I have found which fonts.dir is missing what do I do to resolve the issue.
 
Old 08-22-2006, 05:00 PM   #5
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Can you please tell me what is the name of the error log file as I cannot see any xsession error log file in my home directory . . .
The usual name for the log file is ~/.xsession-errors or something very similar. Notice the dot naming convention, which means the file is hidden from normal viewing unless you have your file manager (Konqueror) and ls command alias configured to show hidden files.

Quote:
once I have found which fonts.dir is missing what do I do to resolve the issue
Check the following directories:

1. $KDE/share/fonts
2. $KDE/share/fonts/override
3. ~/.fonts
4. ~/.fonts/override

One of those directories is empty. With root privileges:

1. Open a Konsole session
2. cd to that empty directory
3. run mkfontdir
4. run mkfontscale
5. run fc-cache -fv
 
Old 08-23-2006, 03:54 PM   #6
jam222
Member
 
Registered: Feb 2004
Posts: 56

Original Poster
Rep: Reputation: 15
When I do an ls -a I get the below files and directories. I haven't got any .fonts directory. When I create the two directories manually and try to run mkfonddir it says "command not found"

./ .config/ .mcop/ .xine/
../ .fonts.conf .mcoprc 5248868.stm
.DCOPserver_jam3_:0@ .fullcircle/ .mozilla/ Desktop/
.DCOPserver_jam3__0 .gxine/ .qt/ TechMon/
.ICEauthority .kde/ .screenrc TechMon+AmaroK/
.Xauthority .kderc .serverauth.2949 TechMon+XMMS/
.bash_history .lesshst .superkaramba/ com/
.bash_profile .local/ .viminfo
.bashrc .macromedia/ .vimrc
 
Old 08-23-2006, 11:12 PM   #7
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
You do not need a .fonts directory in your home directory. What about the contents of /opt/kde/share/fonts and /opt/kde/share/fonts/override?
 
Old 08-24-2006, 02:39 PM   #8
jam222
Member
 
Registered: Feb 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Contents of directory /opt/kde/share/fonts/override are


drwxr-xr-x 2 root root 4096 2006-08-20 22:36 ./
drwxr-xr-x 3 root root 4096 2006-08-20 22:36 ../
-rw-r--r-- 1 root root 2 2006-08-20 22:36 fonts.dir

and contents of /opt/kde/share/fonts are

drwxr-xr-x 3 root root 4096 2006-08-20 22:36 ./
drwxr-xr-x 20 root root 4096 2006-08-20 22:36 ../
drwxr-xr-x 2 root root 4096 2006-08-20 22:36 override/


But I cannot run the commands mentioned

I get the below errors

bash: mkfontdir: command not found
bash: mkfontscale: command not found
bash: fc-cache: command not found
 
Old 08-24-2006, 04:08 PM   #9
ThorX
LQ Newbie
 
Registered: Aug 2006
Distribution: Star...DarkStar
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by jam222
When I do an ls -a I get the below files and directories. I haven't got any .fonts directory. When I create the two directories manually and try to run mkfonddir it says "command not found" ...
I hope following may be helpful to You:

The field “command not found” can be avoided by running commands (as root): "mkfontdir", "mkfontscale" and "fc-cache" by using this: /usr/X11R6/bin/(+command). Thus, mkfontdir = /usr/X11R6/bin/mkfontdir etc...
 
Old 08-25-2006, 03:35 AM   #10
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
bash: mkfontdir: command not found
bash: mkfontscale: command not found
bash: fc-cache: command not found
Try the following:

cd /opt/kde/share/fonts
su -c mkfontdir
su -c mkfontscale
cd ./override
su -c mkfontdir
su -c mkfontscale
su -c fc-cache-fv

As ThorX mentioned, you often can get around the "command not found" message simply by using the full path of the command, but to run these commands you need root privileges too. You also can obtain root privileges by typing su root and the root password, and you have to remember to exit as root back to normal user as soon as you finish your task.
 
Old 08-26-2006, 04:38 PM   #11
jam222
Member
 
Registered: Feb 2004
Posts: 56

Original Poster
Rep: Reputation: 15
I have tried it. Commands did work this time but still getting the same font errors.
 
Old 08-26-2006, 08:26 PM   #12
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
Commands did work this time but still getting the same font errors.
After you run the mkfontdir, mkfontscale and fc-cache commands, you should see in the affected directories the following files:

fonts.dir
fonts.scale
fonts.cache-1

Do you see those files?
 
Old 08-27-2006, 11:07 AM   #13
tramni1980
Member
 
Registered: Jul 2006
Location: Köln, Germany
Distribution: Slackware64-14.2 & -current, DragonFly BSD, OpenBSD
Posts: 819

Rep: Reputation: 55
Hello!
I had the same errors reported, until I deleted the /opt/kde/share/fonts/override directory. I do not have ~./fonts and ~.fonts/override directories. If I create them, then I obtain 3 error messages - one for ~./fonts, one for ~/.fonts.override and one for /opt/kde/share/fonts/override. I issued mkfontscale, mkfontdir and fc-cache -fv for all of them, but the error message stopped to appear after I deleted all directories that actually contain no font files, i.e. ~./fonts, ~/.fonts.override and /opt/kde/share/fonts/override.
So just delete the /opt/kde/share/fonts/override directory, and the error message should cease to appear.
 
Old 08-28-2006, 12:24 AM   #14
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
. . . but the error message stopped to appear after I deleted all directories that actually contain no font files . . .
In parallel with that, look at your /var/log/Xorg.0.log with a text editor/viewer. If you see any messages about missing fonts, then edit your /etc/X11/xorg.conf file to comment out those fonts. Restart X.
 
Old 08-28-2006, 04:21 PM   #15
jam222
Member
 
Registered: Feb 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Deleting the fonts directories has worked. I don't get the errors any more. Thanks all who have contributed in this thread for giving me useful pointers.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Font Path error on closing XServer (KDE) Toods Slackware 0 02-07-2006 09:12 AM
kde font installer error egyptian Linux - Software 2 10-31-2004 04:51 AM
KDE font installer error. RoaCh Of DisCor Linux - Software 1 10-25-2004 06:44 PM
Finally got KDE 3.2.2 installed, but now have a font error when starting Konsole blk96gt Slackware 5 08-03-2004 02:29 AM
dpi font | gdm | kde DE | xinitrc.kde | Slackware 10 acummings Slackware 2 07-28-2004 11:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration