From: Simon Ruderich Date: Tue, 28 May 2013 11:06:41 +0000 (+0200) Subject: xinitrc: Write errors to ~/.xinitrc.errors if xmessage is not installed. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=f15ff4f593c6e84cdfb2adc5ee6f04aaa2211b11;p=config%2Fdotfiles.git xinitrc: Write errors to ~/.xinitrc.errors if xmessage is not installed. --- 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