From f15ff4f593c6e84cdfb2adc5ee6f04aaa2211b11 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 28 May 2013 13:06:41 +0200 Subject: [PATCH] xinitrc: Write errors to ~/.xinitrc.errors if xmessage is not installed. --- xinitrc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xinitrc b/xinitrc index d3b62b4..fc4582d 100755 --- a/xinitrc +++ b/xinitrc @@ -38,7 +38,12 @@ installed() { type "$1" >/dev/null 2>&1 } error() { - xmessage "$@" & + if installed xmessage; then + xmessage "$@" & + else + # Log message to a file which is displayed by my Zsh setup on startup. + echo "$@" >> "$HOME/.xinitrc.errors" + fi } # Save PID of the most recently started background process. Used to terminate # them when logging out to prevent unused background processes. On some -- 2.45.2