From cc570ca63ed9076726aad9d3182a2d1df18fedb3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 11 May 2012 10:06:38 -0400 Subject: [PATCH] Only use xset to turn off beeps if we have it installed. --- src/.bashrc.d/20nobeep | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.26.2