Subject: Re: Blinking text: %{+B} attribute.

From: Micah Cowan <[email-masked]>
Date: Wed, 02 Jul 2008 12:21:52 -0700

Adding the rxvt-unicode mailing list back in. I'm guessing your thread
had a different title, sorry about the chopped thread, rxvt guys.

David Chanters wrote:
> However, and this is the crucial part (for those of you playing along
> at home :P), if we set the background color of the hardstatus, as in:
> 
> hardstatus alwayslastline '%{= Gb}%-w %{+B}%n %t %+w'
> 
> Then the blinking stops entirely under urxvt.
> 
> Repeating the exact same tests above running under XTerm instead,
> yields correct behaviour; the title and number of all windows flashes.
> 
> Now, i said to you i asked about this on the rxvt-unicode mailing
> list.  the reply i got from the author was quite useful.  a relevant
> part of that conversation is here (my initial question is prefixed
> with ">"):
> 
>     > So my question is:  how does rxvt-unicode and XTerm compare in terms
>     > of how they're told to implement blinking text, and is there anything
>     > i can do to make them the same in order to fix my problem?
> 
>     They implement blinking text effectively identically (i.e. same command
>     sequence etc. but different blinking frequency and of course it is
>     implemented differently, but from a suer standpoint they work identically).
> 
>     Your problem is gnu screen not outputting the sequence, and that's likely
>     a configuration issue.

That's incorrect. GNU Screen does in fact output the correct sequence.

You can test the issue directly by trying the following commands:

  $ tput blink; echo foo; tput sgr0

which blinks, and

  $ tput setab 4; tput blink; echo foo; tput sgr0

which has a blue background, and doesn't blink.

I also checked using the direct escape sequences from ECMA-48, and still
get the same results:

  $ printf '\033[44m\033[5mfoo\033[m\n'
  $ printf '\033[44m\033[6mfoo\033[m\n'

(those use the two different possible blinking frequencies.)

I noticed that my terminfo has the following definitions for rxvt-unicode:

  setab=\E[48;5;%p1%dm

A parameter value of "48" means to set the background color according to
CCITT Recommendation T.416 (aka ISO 8613-6). A "5" as a parameter of SGR
(denoted by the final "m") normally means blinking text, but when it
follows a 48, it means to use a certain indexed color for the background
(given by the parameter that follows).

My first guess was that perhaps rxvt-unicode confuses the "5" that would
activate blinking text:

  Esc [ 5 m
        ^
with the 5 that activates indexed color mode:

  Esc [ 48 ; 5 ; 4 m
             ^

(spaces added for clarity)

But that guess is probably incorrect, as \E[7m doesn't induce blinking
either when a background color is set, and 7 has no meaning in T.416
that I'm aware of.

So, I don't have answers to why this is the case, but it seems quite
clear to me that the problem lies with rxvt-unicode, and not with screen
(screen isn't even involved in any of the above tests).

> There's obviously something gone awry in screen since xterm is the
> only terminal emulator to properly handle the blinking escape
> sequences screen sends it.  Running the same tests above under
> XFCE4-termina, gnome-terminal, rox-terminal, eterm, all yield the same
> result as urxvt does --- change the color of the hardstatus away from
> reverse video and no more blinking text.

gnome-terminal (at least, for me) never respects blinking at all.
xfce4-terminal uses the same terminal emulation code that gnome-terminal
does, so its lack of support doesn't surprise me.

Eterm and rox-terminal I'm not very familiar with, but I suspect that
there is an explicit decision not to support blinking in some terminals,
as it is considered by many to be evil.

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer,
and GNU Wget Project Maintainer.
http://micah.cowan.name/

_______________________________________________
screen-users mailing list
[email-masked]
http://lists.gnu.org/mailman/listinfo/screen-users