0

I connect with PuTTY (with "xterm") to a Debian system running Informix. In all Informix applications (self-written 4GL as well as isql and i4gl) PuTTY switches the background and foreground colors when one hits a key that Informix does not understand (like the Del key) or tries to write to long text into input fields. So, grey text on black background becomes black text on grey background. I then have to manually reset the terminal (with either reset or PuTTY's own reset terminal button) to restore the original colors.

Nothing else happens, just the color change. When the color changed, it does not change back without terminal reset, even when reproducing the first steps that switched colors.

How can I disable this behaviour and what does trigger this? What code is send back to PuTTY from the server to allow color changing of the client?

2 Answers 2

0

After a lot of googling and trial-and-error I found the solution on this very long discussion. Summary:

Informix tries to run a visual bell, but instead of using the BEL code (which is bel=^G in the terminfo file for xterm) it uses flash (which is flash=E[?5h$<100/>\E[?5l in the terminfo file for xterm).

Not sure if this is a PuTTY bug (it knows about visual bells, but maybe not about flashing screens) or an Informix bug that makes the flash "stop halfway" and not changing back.

In order to fix the issue I decompiled the terminfo file into termcap code:

infocmp xterm > xterm.decompiled

This original file came from /lib/terminfo/x/. Then I removed the according entry in xterm.decompiled:

flash=E[?5h$<100/>\E[?5l # remove this entry

And finally recompiled the the file with

tic -s xterm.decompiled

which landed in /etc/terminfo/x/xterm. After relogging into the terminal the issue was gone, because now my terminal does not know about screen flashing at all.

1
  • Informix probably does not understand the mandatory delay $<100/>, since Informix is essentially a termcap application which never fell in line with the mainstream terminfo (see some history). In any case, the issue is not due to PuTTY. May 20, 2015 at 0:12
0

just for the record, it may be better just to run

infocmp > term.decompiled

without any arguments because like this the variable $TERM is evaluated.

In my case the value was "xterm-256color" and "infocmp xterm" would not return the correct setting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .