summaryrefslogtreecommitdiff
path: root/.config/X11
diff options
context:
space:
mode:
authorLuke Shumaker <shumakl@purdue.edu>2015-09-24 15:56:22 -0400
committerLuke Shumaker <shumakl@purdue.edu>2015-09-24 15:56:22 -0400
commit1f657262cae273a20c104465697aa283ed77196b (patch)
treeeee5182c976b939d8b22d13aaeb7e333bfb18c73 /.config/X11
parent4d6eed98970b4241f95b70309926e46040ce1956 (diff)
Be more careful about what happens when XDG_RUNTIME_DIR isn't set.
Diffstat (limited to '.config/X11')
-rw-r--r--.config/X11/clientrc5
1 files changed, 4 insertions, 1 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc
index 8bced30..46c4edd 100644
--- a/.config/X11/clientrc
+++ b/.config/X11/clientrc
@@ -19,7 +19,10 @@ fi
exec mate-session
-[ -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}"