I ended up making the file check the $TERM environment variable because $0 returns "-bash" in both the console and terminal.
if [[ $TERM == "linux" ]]; then
setterm ...
fi
if [[ $0 == '-bash' ]]; then
setterm ...
setterm ...
...
fi
After the latest update to util-linux (2.25-3), whenever I open xfce4-terminal these lines show up:
setterm: terminal xterm does not support --blength
setterm: terminal xterm does not support --bfreq
setterm: terminal xterm does not support --blank
[gilmoreja@JamesPC ~]$
Is there a better way to handle making sure setterm runs when a console is used, but not necessarily when a terminal is opened? Or is there some other way to solve this issue? There doesn't seem to be a switch for setterm for any kind of "quiet mode."
]]>