From bcdc8591d20f23e3f4a1645a7ccfc473b2916c3e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 22 Apr 2015 16:19:24 -0400 Subject: X11/clientrc: properly escape $DISPLAY for systemd --- .config/X11/clientrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to '.config/X11/clientrc') diff --git a/.config/X11/clientrc b/.config/X11/clientrc index 88ae527..ac0d5a8 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -18,9 +18,10 @@ if [ -f "$usermodmap" ]; then fi [ -n "$XDG_RUNTIME_DIR" ] || exit 1 -trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT -mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" +_DISPLAY="$(systemd-escape -- "$DISPLAY")" +trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}")" EXIT +mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" -cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" & -systemctl --user start "wm@${DISPLAY}.target" & +cat "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" & +systemctl --user start "wm@${_DISPLAY}.target" & wait -- cgit v1.2.3