Jeorg van den Hoff wrote, quoting Tadziu Hoffmann: >> I don't think it's a bug in xterm. Nroff emits <ESC>[40m codes, >> which normally means "set background color to black", and this >> is exactly what xterm is doing. >> >> Pipe the output through "sed -e 's/40m/41m/g'" before viewing >> (this changes the background from black to red) to illustrate >> this. >> > > thanks. did'nt know enough about the escape sequences to see that > myself. that, too, makes it more understandable that the other > terminal emulators just behaved the same (except, seemingly, > werner's kde `konsole'?).
Well, anyone's KDE Konsole, presumably :-) > so, that's back to square one, then? is it a bug in grotty? werner? Strictly speaking, <ESC>[40m means "set background to the colour specified in slot zero of the colour palette"; on most terminals that happens to be black. If you can remap it to some other colour, then that is what you will get, and that is what Konsole appears to do -- it sets slot zero of the palette to the user's preferred window background colour. On MS-Windows, where SGR handling is pretty pathetic in any case, I normally have to remap the palette, to give me anything resembling sane behaviour, but I also have to disable grotty's SGR mode, because the Win32 console understands only a subset of the SGR codes; one particularly irksome feature is that, while it recognises codes to switch italic and underline modes on, it ignores the complementary codes to switch them off again, (so it makes a complete hash of manpage displays). Regards, Keith.
