KDE defines a filesystem hierarchy which is used by the KDE environment itself as well as all KDE applications. In general KDE stores all its files in a directory tree with a fixed structure.
By default KDE uses two directory trees:
One at the system level (for example /opt/kde3
).
One at the user level in the user's home directory
(usually
~/.kde
)
As a system administrator you can create additional trees. Such additional trees can be used for profiles
SuSE® Linux® for example uses:
$
HOME
/.kde
/opt/kde3
. (This is
SuSE®-specific; other distributions may use
/usr
or /usr/kde3
)
/etc/opt/kde3
. (This was added by
SuSE®).
If you have the KIOSK Admin tool v0.7 or later installed you can
check which directory trees are used with the following command:
kiosktool-kdedirs
--check
KDE and KDE applications look up files by scanning all the KDE directory trees. The directory trees are checked in order of precedence. When a file is present in multiple directory trees, the file from the last tree takes precedence. Normally, the tree located in the user's home directory has the highest precedence. This is also the directory tree to which changes are written.
For information about the text/plain
MIME type
the following files are searched:
$
HOME
/.kde/share/mimelnk/text/plain.desktop
/opt/kde3/share/mimelnk/text/plain.desktop
/etc/opt/kde3/share/mimelnk/text/plain.desktop
If a user makes a change, the change is written to $
HOME
/.kde/share/mimelnk/text/plain.desktop
For configuration files the story is slightly different. If there are multiple configuration files found in the directory trees with the same name, their content is combined. The precedence order of the directory trees plays a role here. When two files define the same configuration key, the file with the highest precedence determines which value is used for the key.
For example, if the following two files exist, with these contents:
$HOME
/.kde/share/config/foobar
Color=red Shape=circle
/etc/opt/kde3/share/config/foobar
Color=blue Position=10,10
The files will be merged to result in:
Color=red Shape=circle Position=10,10