From: W. Trevor King Date: Fri, 11 May 2012 14:06:38 +0000 (-0400) Subject: Only use xset to turn off beeps if we have it installed. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc570ca63ed9076726aad9d3182a2d1df18fedb3;p=dotfiles-public.git Only use xset to turn off beeps if we have it installed. --- diff --git a/src/.bashrc.d/20nobeep b/src/.bashrc.d/20nobeep index 8eddcbf..50fc3ec 100644 --- a/src/.bashrc.d/20nobeep +++ b/src/.bashrc.d/20nobeep @@ -1,6 +1,10 @@ # turn off terminal beep in X if [ $TERM == "xterm" ] && [ -n "$DISPLAY" ]; then - xset b off + XSET=$(which xset 2> /dev/null) + if [ -n "${XSET}" ]; then + xset b off + fi; + unset XSET fi # turn of terminal beeps in the console, unless connecting via SSH