[kde-linux] kde default settings directory
stefano.crocco at alice.it
Wed Sep 17 09:35:44 UTC 2008
Alle Wednesday 17 September 2008, Nathan ha scritto:
> On Wednesday 17 September 2008 02:09:22 Erbureth wrote:
> Nothing really. Just curious how it could be done. I read somewhere that
> Gentoo is doing it, but I couldn't figure out how. I built KDE 4.1.1 using
> .kde and now I have added some older stuff from KDE 3.5.10 and since then
> things have gotten very slow.
Gentoo uses .kde as KDEHOME for both kde 3 and kde 4, but makes that directory a
symlink to .kde3 or .kde4, depending on which session is started. To do so, it
modifies the file $KDEDIR/bin/startkde of both versions so that it makes the
.kde symlink point to the correct directory. If you're interested, here's the
code it uses
[ -e "$HOME/.kde$(basename $KDEDIR)" ] || mkdir "$HOME/.kde$(basename $KDEDIR)"
if [ -z "$HOME" ]; then
xmessage "HOME is unset. Your user config seems to be broken. Aborting."
elif [ ! -d "$HOME/.kde$(basename $KDEDIR)" ]; then
xmessage "$HOME/.kde$(basename $KDEDIR) exists but is not a dir. Aborting."
elif [ -L "$HOME/.kde" ]; then
ln -sf ".kde$(basename $KDEDIR)" "$HOME/.kde"
elif [ ! -e "$HOME/.kde" ]; then
ln -s ".kde$(basename $KDEDIR)" "$HOME/.kde"
elif [ -d "$HOME/.kde" ]; then
xmessage "~/.kde is not a symlink. Please move ~/.kde to ~/.kde3.5 (if appropriate) and symlink ~/.kde to it." > /dev/null 2>/dev/null
xmessage "~/.kde is not a symlink or a dir. Make it a symlink to .kde$(basename $KDEDIR) or remove it." > /dev/null 2>/dev/null
This code is put in the startkde file just before the line starting with
# Check if a KDE session is already running
(at least, this is in the startkde file from KDE 4. In the one from KDE 3,
it'll be something similar).
I think another option would be to set the environment variable KDEHOME to
.kde3 and .kde4 depending on which one you launch. Maybe you can do that
modifying the startkde file, or from somewhere else.
I hope this helps
More information about the kde-linux