setterm syntax changed

Felix Miata mrmazda at
Wed Jun 25 21:57:36 UTC 2014

On 2014-06-25 15:02 (GMT+0100) Richard W.M. Jones composed:

> On Wed, Jun 25, 2014 at 12:06:10AM -0400, Felix Miata wrote:

>> Was there good reason to change it? For well over a decade across
>> all distros I've used, I've included this line in root's .bashrc,
>> always:

>> 	setterm -foreground white -bold -background blue -blank 59 -store

>> The current man page has changed to require "--" where "-" was
>> sufficient previously. Now my ancient .bashrc generates

>> 	setterm: argument error: -background

>> on login, and nothing that worked before works now. :-(

> This is a non backwards compatible change in upstream util-linux:

>    commit fb27f91cac9702ad1858d782dd840d5868547423
>    Author: Sami Kerola <kerolasa>
>    Date:   Mon May 19 22:21:14 2014 +0100

>      setterm: recommend long options with double hyphen

>      While the -version style options will work for next unknown number of
>      years start moving towards user interface that has way of invoking long
>      options as most of the other commands.

>      Signed-off-by: Sami Kerola <kerolasa>

> so sooner or later it's going to affect all distros ...

> My suggestion would be to replace your command with:

>    if setterm --help 2>&1 | grep -q -- --background; then
>      setterm --foreground white --bold --background blue --blank 59 --store
>    else
>      setterm -foreground white -bold -background blue -blank 59 -store
>    fi

> But yes, backwards incompatible changes suck, although in this case
> setterm has historically done something non-standard.

	setterm --foreground white --bold --background blue --blank 59 --store

produces nearly the same error message:

	setterm: argument error: --background

Note that the argument the message apparently applies to is neither first nor 
"The wise are known for their understanding, and pleasant
words are persuasive." Proverbs 16:21 (New Living Translation)

  Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata  ***

More information about the devel mailing list