summaryrefslogtreecommitdiffstats
path: root/startkde
diff options
context:
space:
mode:
Diffstat (limited to 'startkde')
-rw-r--r--startkde11
1 files changed, 10 insertions, 1 deletions
diff --git a/startkde b/startkde
index 0fa4eb327..c6be49c18 100644
--- a/startkde
+++ b/startkde
@@ -83,7 +83,10 @@ else
elif [ -f /usr/bin/kde4-config ]; then
# Looks like KDE4 is installed.
if [ -d $HOME/.kde ] && [ ! -d $HOME/.kde3 ]; then
- # Presume $HOME/.kde is being used for KDE4
+ # Presume $HOME/.kde is being used for KDE4 as it already exists.
+ export KDEHOME=$HOME/.kde3
+ else
+ # Presume $HOME/.kde is being used for KDE4 to be on the safe side.
export KDEHOME=$HOME/.kde3
fi
elif [ -f /opt/kde3/bin/kde-config ]; then
@@ -102,6 +105,12 @@ else
echo "[startkde] Set KDEHOME to $KDEHOME." 1>&2
fi
+# Run a quick test for root.
+if [ -z "$KDEROOTHOME" ] && [ "$UID" = "0" ]; then
+ echo "startkde: User ID is $UID. Setting KDEROOTHOME to $KDEHOME."
+ export KDEROOTHOME=$KDEHOME
+fi
+
# Modify the following environment variables only as necessary.
if [ -d /opt/kde3/games ]; then
export PATH=/opt/kde3/games:$PATH