From 93212415c3e6a32f8db27054cab620a9d5e3ef39 Mon Sep 17 00:00:00 2001 From: David Runge Date: Fri, 30 Sep 2016 14:45:54 +0200 Subject: .zprofile: Adding tmpdir exception for root. --- .zprofile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.zprofile') 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 -- cgit v1.2.3-70-g09d2