[Kde-kiosk] Solved: KDE config path

subbukk subbukk at gmail.com
Thu Dec 21 13:36:48 CET 2006


Hi,

I too got bitten by /etc/kde3 overriding profile configs. I traced the bug 
to a hard-coded path in a Debian KDE patch. This explains why RedHat and 
SuSE distros worked fine.

Here is the problem that I was faced with:

$ kde-config --prefix
/usr
$ kde-config --path config
/home/me/.kde/share/config/:/etc/kde3/:/etc/kde-profiles/users/share/config/

To fix, I duped /etc/kde3 onto /usr/share/config. symlink wont work as the 
code checks for a directory :-(
# prefix=$(kde-config --prefix); mkdir -p $prefix/share/config
# echo "/etc/kde3 $prefix/share/config none rw,bind 1 2" >>/etc/fstab
# mount /etc/kde3
#

Next, I used hexedit to rename /etc/kde3 to /etc/kde0 in libkdecore.so. I 
can hear some howls of protest about this :-). But I had to get in a fix 
quickly before the holiday break.

# F=libkdecore.so.4.2.0
# mv $F $F.dist; cp $F.dist $F
# hexedit $F
   ---- press TAB to go to ASCII mode
   ---- /etc/kde3 and ENTER
   ---- replace 3 with 0
   ---- save and exit (CTRL-X, y)
# cp $F $F.patched
# cmp -b libkdecore.4.2.0.{dist,patched}
libkdecore.so.4.2.0.dist libkdecore.so.4.2.0.patched differ: byte 2186020, 
line 9668 is  63 3  60 0
# md5sum libkdecore.4.2.0.{dist,patched}
f9555b64e5827d3b59417974ea418fc4  libkdecore.so.4.2.0.dist
04df6bf1d0c0909deac1d3c099ea6141  libkdecore.so.4.2.0.patched

Now I get:
$ kde-config --path config
/home/me/.kde/share/config/:/etc/kde0/:/etc/kde-profiles/users/share/config/:/usr/share/config

/etc/kde0 is not a valid path, so the path order is fixed.

If /usr is on a read-only volume, the /etc/kde3 can be mounted 
on /etc/kde-profiles/default/share/config and ",default" suffixed to 
every profile in the profile map.

Sweet Success!
K. K. Subbu


More information about the kde-kiosk mailing list