aboutsummaryrefslogtreecommitdiffstats
path: root/.zprofile
diff options
context:
space:
mode:
Diffstat (limited to '.zprofile')
-rw-r--r--.zprofile6
1 files changed, 5 insertions, 1 deletions
diff --git a/.zprofile b/.zprofile
index dd49b8f..e76fdd3 100644
--- a/.zprofile
+++ b/.zprofile
@@ -38,7 +38,11 @@ fi
#
if [[ ! -d "$TMPDIR" ]]; then
- export TMPDIR="$XDG_RUNTIME_DIR"
+ if [[ $USER == "root" ]]; then
+ export TMPDIR="/tmp/$USER"
+ else
+ export TMPDIR="$XDG_RUNTIME_DIR"
+ fi
mkdir -p -m 700 "$TMPDIR"
fi