# turn off terminal beep in X if [ -n "$DISPLAY" ] && [ "$TERM" == "xterm" ]; then if [ -x "$(command -v xset)" ]; then xset b off fi; fi # turn of terminal beeps in the console, unless connecting via SSH if [ -n "$TERM" ] && [ -z "$SSH_CLIENT" ]; then setterm -blength 0 fi