

Some important environment variables used by KDE:
KDEDIRHas to be set if
KDEDIRS is not set and has to point to the root of the
KDE installation tree. Allows KDE to find its data like icons,
menus and libraries.
KDEDIRSOverrides KDEDIR and allows you to specify
multiple directories where KDE searches for its data. Useful if you want
or have to install some programs to a different prefix than the rest of
KDE.
$KDEHOMEIf
not set, KDE uses ~/.kde as
the directory where personal data is stored.
KDEROOTHOMEIf
not set, KDE uses ~root/.kde
as the directory for root's
personal data. Was introduced to prevent KDE from accidently
overwriting user data with root permissions when the user runs a KDE
program after switching with su to root.
KDEWMIf the
KDEWM environment variable has been set, then it will
be used as KDE's window manager within the
startkde script instead of KWin.
KDE_LANGOverrides
the KDE language configuration, e.g. KDE_LANG=fr kprogram
& starts a program with French translation if the
necessary files are installed.
KDE_MULTIHEADSet
this variable to true to indicate that KDE is running
on a multi-head system.
KDE_FORK_SLAVES(Since KDE 3.2.3) Set this variable to spawn KIO-slaves directly from the application process itself. By default KIO-slaves are spawned using klauncher/kdeinit. This option is useful if the KIO-slave should run in the same environment as the application. This can be the case with Clearcase.
KDE_HOME_READONLYSet this variable to indicate that your home directory is mounted as read-only.
KDE_NO_IPV6(Since KDE 3.2.3) - Set this variable to disable IPv6 support and IPv6 DNS lookups.
KDE_IS_PRELINKED(Since KDE 3.2) - Set this variable to indicate that you have prelinked your KDE binaries and libraries. This will turn off kdeinit.
KDE_UTF8_FILENAMESIf this environment variable is set, KDE assumes all filenames are in UTF-8 encoding regardless of the current C locale.
KDE_FULL_SESSION(Since KDE 3.2) Automatically set to true by KDE startup, it is used by e.g. Konqueror to know if it should consider remaining in memory for future re-use when being closed. If not set, Konqueror will exit after being closed (e.g. KDE su does that, it's also useful for debugging).
KDESYCOCAAllows you to specify the path and the name of the generated KDE system configuration cache file.
KDETMPAllows
to specify another path than /tmp where KDE stores its temporary
files.
KDEVARTMPAllows
to specify another path than /var/tmp where KDE stores its variable
files.
XDG_DATA_HOME
(Since KDE 3.2) Defines the base directory relative to which user-specific
data files should be stored. Default is $HOME/.local/share
XDG_DATA_DIRS
(Since KDE 3.2) Defines the preference-ordered set of base directories to
search for data files in addition to the $ base
directory. Default is
XDG_DATA_HOME/usr/local/share/:/usr/share/
KDE adds locations from $KDEDIRS and profiles
as well. Used for .desktop and
.directory menu files. .desktop files under $.
XDG_DATA_DIRS/applications.directory files under
$XDG_DATA_DIRS/desktop-directories
XDG_CONFIG_HOME
(KDE 3.2) - Defines the base directory relative to which user
specific configuration files should be stored. Default is
$.HOME/.config
XDG_CONFIG_DIRS
(KDE 3.2) - Defines the preference-ordered set of base directories
to search for configuration files in addition to the $XDG_CONFIG_HOME
base directory. The default is /etc/xdg KDE adds locations from
$KDEDIRS and profiles as well. Used by .menu descriptions in
$.
XDG_CONFIG_DIRS/menus