From 1cdc7055122eae4a260b0f6f5aaa5522af145e43 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 4 Oct 2015 15:04:21 -0400 Subject: Be more careful about what happens when XDG_RUNTIME_DIR isn't set. --- .config/X11/clientrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to '.config/X11/clientrc') diff --git a/.config/X11/clientrc b/.config/X11/clientrc index ac0d5a8..bc68ed6 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -17,7 +17,10 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi -[ -n "$XDG_RUNTIME_DIR" ] || exit 1 +if [ -z "$XDG_RUNTIME_DIR" ]; then + printf "XDG_RUNTIME_DIR isn't set\n" >&2 + exit 6 +fi _DISPLAY="$(systemd-escape -- "$DISPLAY")" trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}")" EXIT mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" -- cgit v1.2.3