From 202cacb4e429c5c65ae95fe15e23a0e0da606971 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 12 Sep 2013 02:55:07 +0200 Subject: [PATCH] zsh/rc: Display errors from ~/.xinitrc.errors on startup. See ~/.xinitrc for details. --- zsh/rc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/zsh/rc b/zsh/rc index fc4b4f3..7429b9b 100644 --- a/zsh/rc +++ b/zsh/rc @@ -903,6 +903,17 @@ exec 2>>(while read -r -k -u 0 line; do print -n $'\0' done &) +# Display possible log messages from ~/.xinitrc (if `xmessage` wasn't +# installed). No race condition as xinitrc has finished before a shell is +# executed and only one shell is started on login. +if [[ -f ~/.xinitrc.errors ]]; then + echo "${fg_bold[red]}xinitrc failed!${fg_bold[default]}" + echo + cat ~/.xinitrc.errors + rm ~/.xinitrc.errors + echo +fi + # Run the following programs every 4 hours (and when zsh starts). PERIOD=14400 periodic() { -- 2.45.2