From 22982eaa6edb89a6a1a03a358894e7b50de05ea5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 25 May 2020 17:32:58 +0200 Subject: .profile: ensure we have XDG_RUNTIME_DIR set --- .profile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.profile b/.profile index e8e2fed..6f6e3eb 100644 --- a/.profile +++ b/.profile @@ -1,3 +1,13 @@ + +# set xdg runtime dir if it's not defined +if [ -z "${XDG_RUNTIME_DIR}" ]; then + export XDG_RUNTIME_DIR=/run/user/"$(id -u)" + if [ ! -d "${XDG_RUNTIME_DIR}" ]; then + mkdir "${XDG_RUNTIME_DIR}" + chmod 0700 "${XDG_RUNTIME_DIR}" + fi +fi + if [ -d "${HOME}/bin" ]; then pathprepend "${HOME}/bin" pathprepend "${HOME}/bin/$(uname -n)" -- cgit 1.4.1